|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.Figure
org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
org.topcased.draw2d.figures.Label
org.topcased.draw2d.figures.EditableLabel
public class EditableLabel
A customized Label based on the label used in the flow example. Primary selection is denoted by highlight and focus rectangle. Normal selection is denoted by highlight only. Borrowed from the Flow Editor example
Nested Class Summary | |
---|---|
static class |
EditableLabel.TextProvider
A TextProvider class where we define an abstract method getText() where subclasses must define the part of the Text that must be displayed during the editing. |
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.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 |
Fields inherited from interface org.eclipse.draw2d.PositionConstants |
---|
ALWAYS_LEFT, ALWAYS_RIGHT, BOTTOM, CENTER, EAST, EAST_WEST, HORIZONTAL, LEFT, LEFT_CENTER_RIGHT, MIDDLE, NONE, NORTH, NORTH_EAST, NORTH_SOUTH, NORTH_WEST, NSEW, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TOP_MIDDLE_BOTTOM, VERTICAL, WEST |
Constructor Summary | |
---|---|
EditableLabel()
The default Constructor |
|
EditableLabel(EditableLabel.TextProvider txtProvider)
The constructor with a TextProvider parameter |
|
EditableLabel(org.eclipse.swt.graphics.Image img)
Constructor with the initial icon |
|
EditableLabel(org.eclipse.swt.graphics.Image img,
EditableLabel.TextProvider txtProvider)
The constructor with a TextProvider parameter |
|
EditableLabel(java.lang.String text)
The constructor with a String parameter |
Method Summary | |
---|---|
java.lang.String |
getEditableText()
Return the current editable Text |
boolean |
getSelected()
Return the selected value of the widget |
void |
setColorSelectedLabel(org.eclipse.swt.graphics.Color newColor)
Sets the backgroundColor of the Label when it is selected |
void |
setColorUnselectedLabel(org.eclipse.swt.graphics.Color newColor)
Sets the backgroundColor of the Label when it is not selected |
void |
setSelected(boolean b)
Sets the selection state of this EditableLabel |
void |
setText(java.lang.String s)
Sets the new Text of the label |
Methods inherited from class org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel |
---|
calculateLabelSize, calculateSubStringTextSize, calculateTextSize, getEllipse, getIcon, getIcon, getIconAlignment, getIconBounds, getIconLocation, getIconSize, getIconTextGap, getMaximumSize, getMinimumSize, getNumberofIcons, getPreferredSize, getSubStringText, getSubStringTextSize, getText, getTextAlignment, getTextBounds, getTextLocation, getTextPlacement, getTextSize, getTextWrapAlignment, getTotalIconSize, hasFocus, hasIcons, invalidate, isSelected, isTextStrikedThrough, isTextTruncated, isTextUnderlined, isTextWrapped, paintFigure, setFocus, setIcon, setIcon, setIconAlignment, setLabelAlignment, setTextAlignment, setTextPlacement, setTextStrikeThrough, setTextUnderline, setTextWrap, setTextWrapAlignment, setTextWrapWidth |
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, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMinimumSize, getParent, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, internalGetEventDispatcher, intersects, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, 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, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, 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.topcased.draw2d.figures.ILabel |
---|
getText |
Methods inherited from interface org.eclipse.draw2d.IFigure |
---|
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, 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, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate |
Constructor Detail |
---|
public EditableLabel()
public EditableLabel(java.lang.String text)
text
- the value to displaypublic EditableLabel(org.eclipse.swt.graphics.Image img)
img
- the icon displayed in the labelpublic EditableLabel(EditableLabel.TextProvider txtProvider)
txtProvider
- the TextProviderpublic EditableLabel(org.eclipse.swt.graphics.Image img, EditableLabel.TextProvider txtProvider)
img
- the icon displayed in the labeltxtProvider
- the TextProviderMethod Detail |
---|
public void setText(java.lang.String s)
setText
in interface ILabel
setText
in class org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
s
- the new Stringpublic java.lang.String getEditableText()
public void setColorSelectedLabel(org.eclipse.swt.graphics.Color newColor)
newColor
- the new Colorpublic void setColorUnselectedLabel(org.eclipse.swt.graphics.Color newColor)
newColor
- the new Colorpublic void setSelected(boolean b)
setSelected
in class org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel
b
- true will cause the label to appear selectedpublic boolean getSelected()
|
Modelers | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.