public class ContextButton
extends org.eclipse.draw2d.Clickable
implements org.eclipse.draw2d.MouseMotionListener, org.eclipse.draw2d.ActionListener
org.eclipse.draw2d.Figure.FigureIterator| Constructor and Description |
|---|
ContextButton(java.lang.String providerId,
PositionedContextButton positionedContextButton,
ContextButtonPad contextButtonPad)
Creates a new ContextButton.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(org.eclipse.draw2d.ActionEvent event)
Performs the command of the context button or opens a context-menu with a
selection of multiple commands to perform.
|
ContextButtonPad |
getContextButtonPad()
Returns the
ContextButtonPad which is used to access the
environment (editor, ...). |
DiagramBehavior |
getDiagramBehavior()
Returns the
IDiagramContainerUI for which the context button is
displayed. |
org.eclipse.gef.EditPart |
getEditPart()
Returns the
EditPart for which the context button is displayed. |
ContextButtonEntry |
getEntry()
Returns the
ContextButtonEntry which contains the logical and
identifying information for the context button (command, name, image,
...). |
PositionedContextButton |
getPositionedContextButton()
Returns the
PositionedContextButton which contains the visual
information for the context button (colors, position, size, opacity, ...) |
double |
getZoomLevel()
Returns the zoom-level for which the context-button shall be painted.
|
void |
handleMouseEntered(org.eclipse.draw2d.MouseEvent event)
Changes the opacity of the context button.
|
void |
handleMouseExited(org.eclipse.draw2d.MouseEvent event)
Changes the opacity of the context button.
|
void |
handleMousePressed(org.eclipse.draw2d.MouseEvent event)
Changes the opacity of the context button.
|
void |
handleMouseReleased(org.eclipse.draw2d.MouseEvent event)
Changes the opacity of the context button.
|
void |
mouseDragged(org.eclipse.draw2d.MouseEvent me)
Creates a connection with the connection-tool when dragging the context
button.
|
void |
mouseEntered(org.eclipse.draw2d.MouseEvent me) |
void |
mouseExited(org.eclipse.draw2d.MouseEvent me) |
void |
mouseHover(org.eclipse.draw2d.MouseEvent me) |
void |
mouseMoved(org.eclipse.draw2d.MouseEvent me) |
addActionListener, addChangeListener, doClick, getModel, isRolloverEnabled, isSelected, isStyle, removeActionListener, removeChangeListener, setEnabled, setEventHandler, setFiringMethod, setModel, setRolloverEnabled, setSelected, setStyleadd, 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, getClippingStrategy, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseHover, handleMouseMoved, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setClippingStrategy, setConstraint, setCursor, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validatepublic ContextButton(java.lang.String providerId,
PositionedContextButton positionedContextButton,
ContextButtonPad contextButtonPad)
providerId - positionedContextButton - The PositionedContextButton contains the visual
information for the context button (colors, position, size,
opacity, ...). It also provides access to the
ContextButtonEntry.contextButtonPad - The ContextButtonPad is used to access the environment
(editor, ...).public final PositionedContextButton getPositionedContextButton()
PositionedContextButton which contains the visual
information for the context button (colors, position, size, opacity, ...)PositionedContextButton which contains the visual
information for the context button (colors, position, size,
opacity, ...)public final ContextButtonEntry getEntry()
ContextButtonEntry which contains the logical and
identifying information for the context button (command, name, image,
...). It is set in the constructor.ContextButtonEntry which contains the logical and
identifying information for the context button (command, name,
image, ...). It is set in the constructor.public final ContextButtonPad getContextButtonPad()
ContextButtonPad which is used to access the
environment (editor, ...).ContextButtonPad which is used to access the
environment (editor, ...).public final double getZoomLevel()
public final DiagramBehavior getDiagramBehavior()
IDiagramContainerUI for which the context button is
displayed.IDiagramContainerUI for which the context button is
displayed.public final org.eclipse.gef.EditPart getEditPart()
EditPart for which the context button is displayed.EditPart for which the context button is displayed.public void handleMouseEntered(org.eclipse.draw2d.MouseEvent event)
handleMouseEntered in interface org.eclipse.draw2d.IFigurehandleMouseEntered in class org.eclipse.draw2d.Figurepublic void handleMouseExited(org.eclipse.draw2d.MouseEvent event)
handleMouseExited in interface org.eclipse.draw2d.IFigurehandleMouseExited in class org.eclipse.draw2d.Figurepublic void handleMousePressed(org.eclipse.draw2d.MouseEvent event)
Additionally it disables the tooltip. Especially in the middle of the drag & drop procedure no tooltip shall appear.
handleMousePressed in interface org.eclipse.draw2d.IFigurehandleMousePressed in class org.eclipse.draw2d.Figurepublic void handleMouseReleased(org.eclipse.draw2d.MouseEvent event)
Additionally it enables the tooltip again.
handleMouseReleased in interface org.eclipse.draw2d.IFigurehandleMouseReleased in class org.eclipse.draw2d.Figurepublic void mouseDragged(org.eclipse.draw2d.MouseEvent me)
mouseDragged in interface org.eclipse.draw2d.MouseMotionListenerpublic void mouseEntered(org.eclipse.draw2d.MouseEvent me)
mouseEntered in interface org.eclipse.draw2d.MouseMotionListenerpublic void mouseExited(org.eclipse.draw2d.MouseEvent me)
mouseExited in interface org.eclipse.draw2d.MouseMotionListenerpublic void mouseHover(org.eclipse.draw2d.MouseEvent me)
mouseHover in interface org.eclipse.draw2d.MouseMotionListenerpublic void mouseMoved(org.eclipse.draw2d.MouseEvent me)
mouseMoved in interface org.eclipse.draw2d.MouseMotionListenerpublic void actionPerformed(org.eclipse.draw2d.ActionEvent event)
actionPerformed in interface org.eclipse.draw2d.ActionListener