Package org.csstudio.swt.widgets.figures
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
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, org.eclipse.draw2d.Figure.ReverseFigureChildrenIterator
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
ConstructorDescriptionWrappableTextFigure
(boolean runMode) Creates a text figure with a flowPage containing a TextFlow with the style WORD_WRAP_SOFT. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsPoint
(int x, int y) org.eclipse.draw2d.geometry.Dimension
getText()
Returns the text inside the TextFlow.protected void
layout()
void
void
setHorizontalAlignment
(TextFigure.H_ALIGN hAlignment) void
setOpaque
(boolean opaque) void
setSelectable
(boolean selectable) void
setShowScrollbar
(boolean showScrollbar) void
Sets the text of the TextFlow to the given value.void
setWrapWords
(boolean wrapWords) Methods inherited from class org.csstudio.swt.widgets.figures.TextFigure
calculateTextLocation, calculateTextSize, clearLocationSize, getHorizontalAlignment, getMinimumSize, getPreferredSize, getRotate, getTextArea, getTextLocation, getTextSize, getVerticalAlignment, invalidate, isRunMode, isSelectable, paintFigure, setEnabled, setFontPixels, setRotate, setRunMode, setVerticalAlignment
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, getChildrenRevIterable, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getListenersIterable, 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, optimizeClip, 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, 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, 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
- Overrides:
setHorizontalAlignment
in classTextFigure
-
setSelectable
public void setSelectable(boolean selectable) - Overrides:
setSelectable
in classTextFigure
- Parameters:
selectable
- the selectable to set
-
containsPoint
public boolean containsPoint(int x, int y) - Specified by:
containsPoint
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
containsPoint
in classTextFigure
-
getAutoSizeDimension
public org.eclipse.draw2d.geometry.Dimension getAutoSizeDimension()- Overrides:
getAutoSizeDimension
in classTextFigure
-
getText
Returns the text inside the TextFlow.- Specified by:
getText
in interfaceITextFigure
- Overrides:
getText
in classTextFigure
- Returns:
- the text flow inside the text.
-
layout
protected void layout()- Overrides:
layout
in classorg.eclipse.draw2d.Figure
-
setFont
- Specified by:
setFont
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setFont
in classTextFigure
-
setOpaque
public void setOpaque(boolean opaque) - Specified by:
setOpaque
in interfaceorg.eclipse.draw2d.IFigure
- Overrides:
setOpaque
in classorg.eclipse.draw2d.Figure
-
setWrapWords
public void setWrapWords(boolean wrapWords) -
setShowScrollbar
public void setShowScrollbar(boolean showScrollbar) -
setText
Sets the text of the TextFlow to the given value.- Overrides:
setText
in classTextFigure
- Parameters:
newText
- the new text value.
-
getBeanInfo
- Specified by:
getBeanInfo
in interfaceIntrospectable
- Overrides:
getBeanInfo
in classTextFigure
- Throws:
IntrospectionException
-