Class WrappableTextFigure

java.lang.Object
org.eclipse.draw2d.Figure
org.csstudio.swt.widgets.figures.TextFigure
org.csstudio.swt.widgets.figures.WrappableTextFigure
All Implemented Interfaces:
ITextFigure, Introspectable, org.eclipse.draw2d.IFigure

public class WrappableTextFigure extends TextFigure
A text figure which is able to wrap text automatically and show scrollbar if necessary. *
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.csstudio.swt.widgets.figures.TextFigure

    TextFigure.H_ALIGN, TextFigure.V_ALIGN

    Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure

    org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch

    Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure

    org.eclipse.draw2d.IFigure.NoInsets
  • Field Summary

    Fields inherited from class org.csstudio.swt.widgets.figures.TextFigure

    horizontalAlignment, runMode, selectable, verticalAlignment

    Fields inherited from class org.eclipse.draw2d.Figure

    bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip

    Fields inherited from interface org.eclipse.draw2d.IFigure

    MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    WrappableTextFigure(boolean runMode)
    Creates a text figure with a flowPage containing a TextFlow with the style WORD_WRAP_SOFT.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    containsPoint(int x, int y)
     
    org.eclipse.draw2d.geometry.Dimension
     
     
    Returns the text inside the TextFlow.
    protected void
     
    void
     
    void
     
    void
    setOpaque(boolean opaque)
     
    void
    setSelectable(boolean selectable)
     
    void
    setShowScrollbar(boolean showScrollbar)
     
    void
    setText(String newText)
    Sets the text of the TextFlow to the given value.
    void
    setWrapWords(boolean wrapWords)
     

    Methods inherited from class org.eclipse.draw2d.Figure

    add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setFlag, setFocusTraversable, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclipse.draw2d.IFigure

    add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getParent, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setClippingStrategy, setConstraint, setCursor, setFocusTraversable, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setParent, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
  • Constructor Details

    • WrappableTextFigure

      public WrappableTextFigure()
    • WrappableTextFigure

      public WrappableTextFigure(boolean runMode)
      Creates a text figure with a flowPage containing a TextFlow with the style WORD_WRAP_SOFT.
  • Method Details

    • setHorizontalAlignment

      public void setHorizontalAlignment(TextFigure.H_ALIGN hAlignment)
      Overrides:
      setHorizontalAlignment in class TextFigure
    • setSelectable

      public void setSelectable(boolean selectable)
      Overrides:
      setSelectable in class TextFigure
      Parameters:
      selectable - the selectable to set
    • containsPoint

      public boolean containsPoint(int x, int y)
      Specified by:
      containsPoint in interface org.eclipse.draw2d.IFigure
      Overrides:
      containsPoint in class TextFigure
    • getAutoSizeDimension

      public org.eclipse.draw2d.geometry.Dimension getAutoSizeDimension()
      Overrides:
      getAutoSizeDimension in class TextFigure
    • getText

      public String getText()
      Returns the text inside the TextFlow.
      Specified by:
      getText in interface ITextFigure
      Overrides:
      getText in class TextFigure
      Returns:
      the text flow inside the text.
    • layout

      protected void layout()
      Overrides:
      layout in class org.eclipse.draw2d.Figure
    • setFont

      public void setFont(Font f)
      Specified by:
      setFont in interface org.eclipse.draw2d.IFigure
      Overrides:
      setFont in class TextFigure
    • setOpaque

      public void setOpaque(boolean opaque)
      Specified by:
      setOpaque in interface org.eclipse.draw2d.IFigure
      Overrides:
      setOpaque in class org.eclipse.draw2d.Figure
    • setWrapWords

      public void setWrapWords(boolean wrapWords)
    • setShowScrollbar

      public void setShowScrollbar(boolean showScrollbar)
    • setText

      public void setText(String newText)
      Sets the text of the TextFlow to the given value.
      Overrides:
      setText in class TextFigure
      Parameters:
      newText - the new text value.
    • getBeanInfo

      public BeanInfo getBeanInfo() throws IntrospectionException
      Specified by:
      getBeanInfo in interface Introspectable
      Overrides:
      getBeanInfo in class TextFigure
      Throws:
      IntrospectionException