Package com.mxgraph.swing.handler
Class mxSelectionCellsHandler
java.lang.Object
com.mxgraph.swing.handler.mxSelectionCellsHandler
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,EventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Rectangle
Reference to the enclosing graph component.static int
Defines the default value for maxHandlers.protected boolean
Specifies if this handler is enabled.protected mxGraphComponent
Reference to the enclosing graph component.protected LinkedHashMap
<Object, mxCellHandler> Maps from cells to handlers in the order of the selection cells.protected PropertyChangeListener
protected int
Defines the maximum number of handlers to paint individually.protected mxEventSource.mxIEventListener
protected boolean
Specifies if this handler is visible. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addGraphListeners
(mxGraph graph) Installs the listeners to update the handles after any changes.getHandler
(Object cell) int
Redirects the tooltip handling of the JComponent to the graph component, which in turn may use getHandleToolTipText in this class to find a tooltip associated with a handle.boolean
boolean
void
mouseClicked
(MouseEvent arg0) void
void
mouseEntered
(MouseEvent arg0) void
mouseExited
(MouseEvent arg0) void
void
Dispatches the mousepressed event to the subhandles.void
void
void
refresh()
protected void
removeGraphListeners
(mxGraph graph) Removes all installed listeners.void
reset()
void
setEnabled
(boolean value) void
setMaxHandlers
(int value) void
setVisible
(boolean value)
-
Field Details
-
DEFAULT_MAX_HANDLERS
public static int DEFAULT_MAX_HANDLERSDefines the default value for maxHandlers. Default is 100. -
graphComponent
Reference to the enclosing graph component. -
enabled
protected boolean enabledSpecifies if this handler is enabled. -
visible
protected boolean visibleSpecifies if this handler is visible. -
bounds
Reference to the enclosing graph component. -
maxHandlers
protected int maxHandlersDefines the maximum number of handlers to paint individually. Default is DEFAULT_MAX_HANDLES. -
handlers
Maps from cells to handlers in the order of the selection cells. -
refreshHandler
-
labelMoveHandler
-
-
Constructor Details
-
mxSelectionCellsHandler
- Parameters:
graphComponent
-
-
-
Method Details
-
addGraphListeners
Installs the listeners to update the handles after any changes. -
removeGraphListeners
Removes all installed listeners. -
getGraphComponent
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean value) -
isVisible
public boolean isVisible() -
setVisible
public void setVisible(boolean value) -
getMaxHandlers
public int getMaxHandlers() -
setMaxHandlers
public void setMaxHandlers(int value) -
getHandler
-
mousePressed
Dispatches the mousepressed event to the subhandles. This is called from the connection handler as subhandles have precedence over the connection handler.- Specified by:
mousePressed
in interfaceMouseListener
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
getToolTipText
Redirects the tooltip handling of the JComponent to the graph component, which in turn may use getHandleToolTipText in this class to find a tooltip associated with a handle. -
reset
public void reset() -
refresh
public void refresh() -
paintHandles
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-