Package org.jgraph.plaf
Class GraphUI
java.lang.Object
javax.swing.plaf.ComponentUI
org.jgraph.plaf.GraphUI
- Direct Known Subclasses:
BasicGraphUI
Pluggable look and feel interface for JGraph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcancelEditing(JGraph graph) Cancels the current editing session.abstract intReturns the current drop action.abstract ObjectgetEditingCell(JGraph graph) Returns the cell that is being edited.abstract CellHandleReturns theCellHandlethat is currently active, ornullif no handle is active.abstract PointReturns the insertion location for DnD operations.abstract Dimension2DgetPreferredSize(JGraph graph, CellView view) Returns the preferred size forview.abstract booleanReturns true if the graph is being edited.abstract voidpaintCell(Graphics g, CellView view, Rectangle2D bounds, boolean preview) Paints the renderer ofviewtogatbounds.abstract voidpaintPorts(Graphics g, CellView[] portViews) Paints the renderers ofportViewstog.abstract voidselectCellsForEvent(JGraph graph, Object[] cells, MouseEvent event) Messaged to update the selection based on a MouseEvent for a group of cells.abstract voidSets the current location for Drag-and-Drop activity.abstract voidstartEditingAtCell(JGraph graph, Object cell) Selects the cell and tries to edit it.abstract booleanstopEditing(JGraph graph) Stops the current editing session.abstract voidUpdates the handle.Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
-
Constructor Details
-
GraphUI
public GraphUI()
-
-
Method Details
-
paintCell
Paints the renderer ofviewtogatbounds. -
paintPorts
Paints the renderers ofportViewstog. -
selectCellsForEvent
Messaged to update the selection based on a MouseEvent for a group of cells. If the event is a toggle selection event, the cells are either selected, or deselected. Otherwise the cells are selected. -
getPreferredSize
Returns the preferred size forview. -
getHandle
Returns theCellHandlethat is currently active, ornullif no handle is active. -
isEditing
Returns true if the graph is being edited. The item that is being edited can be returned by getEditingCell(). -
stopEditing
Stops the current editing session. This has no effect if the graph isn't being edited. Returns true if the editor allows the editing session to stop. -
cancelEditing
Cancels the current editing session. This has no effect if the graph isn't being edited. Returns true if the editor allows the editing session to stop. -
startEditingAtCell
Selects the cell and tries to edit it. Editing will fail if the CellEditor won't allow it for the selected item. -
getEditingCell
Returns the cell that is being edited. -
setInsertionLocation
Sets the current location for Drag-and-Drop activity. Should be set to null after a drop. -
getInsertionLocation
Returns the insertion location for DnD operations. -
updateHandle
public abstract void updateHandle()Updates the handle. -
getDropAction
public abstract int getDropAction()Returns the current drop action.
-