Class mxSelectionCellsHandler
java.lang.Object
com.mxgraph.swing.handler.mxSelectionCellsHandler
- All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RectangleReference to the enclosing graph component.static intDefines the default value for maxHandlers.protected booleanSpecifies if this handler is enabled.protected mxGraphComponentReference to the enclosing graph component.protected LinkedHashMap<Object, mxCellHandler> Maps from cells to handlers in the order of the selection cells.protected PropertyChangeListenerprotected intDefines the maximum number of handlers to paint individually.protected mxEventSource.mxIEventListenerprotected booleanSpecifies if this handler is visible. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddGraphListeners(mxGraph graph) Installs the listeners to update the handles after any changes.getHandler(Object cell) intRedirects 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.booleanbooleanvoidmouseClicked(MouseEvent arg0) voidvoidmouseEntered(MouseEvent arg0) voidmouseExited(MouseEvent arg0) voidvoidDispatches the mousepressed event to the subhandles.voidvoidvoidrefresh()protected voidremoveGraphListeners(mxGraph graph) Removes all installed listeners.voidreset()voidsetEnabled(boolean value) voidsetMaxHandlers(int value) voidsetVisible(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:
mousePressedin interfaceMouseListener
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
mouseReleased
- Specified by:
mouseReleasedin 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:
mouseClickedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-