Package org.jgraph.plaf
Class GraphUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- org.jgraph.plaf.GraphUI
-
- Direct Known Subclasses:
BasicGraphUI
public abstract class GraphUI extends javax.swing.plaf.ComponentUIPluggable look and feel interface for JGraph.
-
-
Constructor Summary
Constructors Constructor Description GraphUI()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidcancelEditing(JGraph graph)Cancels the current editing session.abstract intgetDropAction()Returns the current drop action.abstract java.lang.ObjectgetEditingCell(JGraph graph)Returns the cell that is being edited.abstract CellHandlegetHandle()Returns theCellHandlethat is currently active, ornullif no handle is active.abstract java.awt.PointgetInsertionLocation()Returns the insertion location for DnD operations.abstract java.awt.geom.Dimension2DgetPreferredSize(JGraph graph, CellView view)Returns the preferred size forview.abstract booleanisEditing(JGraph graph)Returns true if the graph is being edited.abstract voidpaintCell(java.awt.Graphics g, CellView view, java.awt.geom.Rectangle2D bounds, boolean preview)Paints the renderer ofviewtogatbounds.abstract voidpaintPorts(java.awt.Graphics g, CellView[] portViews)Paints the renderers ofportViewstog.abstract voidselectCellsForEvent(JGraph graph, java.lang.Object[] cells, java.awt.event.MouseEvent event)Messaged to update the selection based on a MouseEvent for a group of cells.abstract voidsetInsertionLocation(java.awt.Point p)Sets the current location for Drag-and-Drop activity.abstract voidstartEditingAtCell(JGraph graph, java.lang.Object cell)Selects the cell and tries to edit it.abstract booleanstopEditing(JGraph graph)Stops the current editing session.abstract voidupdateHandle()Updates the handle.
-
-
-
Method Detail
-
paintCell
public abstract void paintCell(java.awt.Graphics g, CellView view, java.awt.geom.Rectangle2D bounds, boolean preview)Paints the renderer ofviewtogatbounds.
-
paintPorts
public abstract void paintPorts(java.awt.Graphics g, CellView[] portViews)Paints the renderers ofportViewstog.
-
selectCellsForEvent
public abstract void selectCellsForEvent(JGraph graph, java.lang.Object[] cells, java.awt.event.MouseEvent event)
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
public abstract java.awt.geom.Dimension2D getPreferredSize(JGraph graph, CellView view)
Returns the preferred size forview.
-
getHandle
public abstract CellHandle getHandle()
Returns theCellHandlethat is currently active, ornullif no handle is active.
-
isEditing
public abstract boolean isEditing(JGraph graph)
Returns true if the graph is being edited. The item that is being edited can be returned by getEditingCell().
-
stopEditing
public abstract boolean stopEditing(JGraph graph)
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
public abstract void cancelEditing(JGraph graph)
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
public abstract void startEditingAtCell(JGraph graph, java.lang.Object cell)
Selects the cell and tries to edit it. Editing will fail if the CellEditor won't allow it for the selected item.
-
getEditingCell
public abstract java.lang.Object getEditingCell(JGraph graph)
Returns the cell that is being edited.
-
setInsertionLocation
public abstract void setInsertionLocation(java.awt.Point p)
Sets the current location for Drag-and-Drop activity. Should be set to null after a drop.
-
getInsertionLocation
public abstract java.awt.Point 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.
-
-