org.jgraph.plaf.basic

Class BasicGraphUI

public class BasicGraphUI extends GraphUI implements Serializable

The basic L&F for a graph data structure.
Nested Class Summary
classBasicGraphUI.CellEditorHandler
Listener responsible for getting cell editing events and updating the graph accordingly.
classBasicGraphUI.ComponentHandler
Updates the preferred size when scrolling (if necessary).
classBasicGraphUI.GraphDropTargetListener
Graph Drop Target Listener
classBasicGraphUI.GraphIncrementAction
GraphIncrementAction is used to handle up/down actions.
classBasicGraphUI.GraphLayoutCacheHandler
Listens for changes in the graph view and updates the size accordingly.
classBasicGraphUI.GraphModelHandler
Listens for changes in the graph model and updates the view accordingly.
classBasicGraphUI.GraphSelectionHandler
Listens for changes in the selection model and updates the display accordingly.
classBasicGraphUI.KeyHandler
This is used to get mutliple key down events to appropriately generate events.
classBasicGraphUI.MouseHandler
TreeMouseListener is responsible for updating the selection based on mouse events.
classBasicGraphUI.MouseInputHandler
MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with.
classBasicGraphUI.PropertyChangeHandler
PropertyChangeListener for the graph.
classBasicGraphUI.RootHandle
Field Summary
protected GraphCellEditorcellEditor
Current editor for the graph.
protected CellEditorListenercellEditorListener
Listens for CellEditor events.
protected ComponentListenercomponentListener
Listens for Component events.
protected BasicGraphUI.GraphDropTargetListenerdefaultDropTargetListener
The default DropTargetListener.
protected TransferHandlerdefaultTransferHandler
The default TransferHandler.
protected intdropAction
Needed to exchange information between DropTargetHandler and TransferHandler.
protected DropTargetdropTarget
The drop target where the default listener was last installed.
static booleanDNDPREVIEW
Controls live-preview in dragEnabled mode.
protected ObjecteditingCell
Path that is being edited.
protected ComponenteditingComponent
When editing, this will be the Component that is doing the actual editing.
protected booleaneditorHasDifferentSize
Set to true if the editor has a different size than the renderer.
protected CellViewfocus
The focused cell under the mousepointer and the last focused cell.
protected JGraphgraph
Component that we're going to be drawing into.
protected GraphLayoutCachegraphLayoutCache
Reference to the graph's view (geometric pattern).
protected GraphLayoutCacheListenergraphLayoutCacheListener
Updates the display when the view has changed.
protected GraphModelgraphModel
Used to determine what to display.
protected GraphModelListenergraphModelListener
Is responsible for updating the view based on model events.
protected GraphSelectionListenergraphSelectionListener
Updates the display when the selection changes.
protected GraphSelectionModelgraphSelectionModel
Model maintaining the selection.
protected CellHandlehandle
Handle that we are going to use.
protected PointinsertionLocation
Needed to exchange information between Transfer- and MouseListener.
protected KeyListenerkeyListener
Listens for KeyListener events.
protected CellViewlastFocus
The focused cell under the mousepointer and the last focused cell.
protected BasicMarqueeHandlermarquee
Marquee that we are going to use.
protected MouseListenermouseListener
Listens for Mouse events.
static intMAXCELLS
The maximum number of cells to paint when dragging.
static intMAXCLIPCELLS
Maximum number of cells to compute clipping bounds for.
static intMAXHANDLES
The maximum number of handles to paint individually.
protected DimensionpreferredMinSize
Minimum preferred size.
protected DimensionpreferredSize
Size needed to completely display all the cells.
protected PropertyChangeListenerpropertyChangeListener
Listens for JGraph property changes and updates display.
protected CellRendererPanerendererPane
Used to paint the CellRenderer.
protected booleansnapSelectedView
If ture, a the view under mousepointer will be snapped to the grid lines during a drag operation.
protected booleanstopEditingInCompleteEditing
Set to false when editing and shouldSelectCell() returns true meaning the node should be selected before editing, used in completeEditing.
static intSCROLLBORDER
Border in pixels to scroll if marquee or dragging are active.
static floatSCROLLSTEP
Multiplicator for width and height when autoscrolling (=stepsize).
protected booleanvalidCachedPreferredSize
Is the preferredSize valid?
Constructor Summary
BasicGraphUI()
Method Summary
static voidautoscroll(JGraph graph, Point p)
Scroll the graph for an event at p.
voidcancelEditing(JGraph graph)
Cancels all current editing sessions.
protected voidcompleteEditing()
Messages to stop the editing session.
protected voidcompleteEditing(boolean messageStop, boolean messageCancel, boolean messageGraph)
Stops the editing session.
protected voidcompleteUIInstall()
Invoked from installUI after all the defaults/listeners have been installed.
protected voidcompleteUIUninstall()
protected CellEditorListenercreateCellEditorListener()
Creates a listener to handle events from the current editor.
protected CellRendererPanecreateCellRendererPane()
Returns the renderer pane that renderer components are placed in.
protected ComponentListenercreateComponentListener()
Creates and returns a new ComponentHandler.
protected GraphContextcreateContext(JGraph graph, Object[] cells)
protected GraphLayoutCacheListenercreateGraphLayoutCacheListener()
Returns a listener that can update the graph when the view changes.
protected GraphModelListenercreateGraphModelListener()
Returns a listener that can update the graph when the model changes.
protected GraphSelectionListenercreateGraphSelectionListener()
Creates the listener that updates the display based on selection change methods.
CellHandlecreateHandle(GraphContext context)
Constructs the "root handle" for context.
protected KeyListenercreateKeyListener()
Creates the listener reponsible for getting key events from the graph.
protected MouseListenercreateMouseListener()
Creates the listener responsible for calling the correct handlers based on mouse events, and to select invidual cells.
protected PropertyChangeListenercreatePropertyChangeListener()
Creates a listener that is responsible to update the UI based on how the graph's bounds properties change.
protected TransferHandlercreateTransferHandler()
Creates an instance of TransferHandler.
static ComponentUIcreateUI(JComponent x)
voiddrawGraph(Graphics g, Rectangle2D clipBounds)
Draws the graph to the specified graphics object within the specified clip bounds, if any
intgetDropAction()
Returns the current drop action.
ObjectgetEditingCell(JGraph graph)
Returns the element that is being edited.
protected Point2DgetEditorLocation(Object cell, Dimension2D editorSize, Point2D pt)
Subclassers may override this to provide a better location for the in-place editing of edges (if you do not inherit from the EdgeRenderer class).
protected ObjectgetFocusedCell()
Returns the cell that has the focus.
CellHandlegetHandle()
Returns the handle that is currently active, or null, if no handle is currently active.
PointgetInsertionLocation()
Returns the current location of the Drag-and-Drop activity.
DimensiongetMaximumSize(JComponent c)
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JGraph, or 0, 0.
DimensiongetMinimumSize(JComponent c)
Returns the minimum size for this component.
DimensiongetPreferredMinSize()
Returns the minimum preferred size.
Dimension2DgetPreferredSize(JGraph graph, CellView view)
Get the preferred Size for a cell view.
DimensiongetPreferredSize(JComponent c)
Returns the preferred size to properly display the graph.
protected voidinstallComponents()
Intalls the subcomponents of the graph, which is the renderer pane.
protected voidinstallDefaults()
Invoked as part from the boilerplate install block.
protected voidinstallKeyboardActions()
Invoked as part from the boilerplate install block.
protected voidinstallListeners()
Invoked as part from the boilerplate install block.
voidinstallUI(JComponent c)
booleanisAddToSelectionEvent(MouseEvent e)
Returning true signifies that cells are added to the selection.
booleanisConstrainedMoveEvent(MouseEvent event)
Returning true signifies a move should only be applied to one direction.
booleanisEditing(JGraph graph)
Returns true if the graph is being edited.
booleanisForceMarqueeEvent(MouseEvent event)
Returning true signifies the marquee handler has precedence over other handlers, and is receiving subsequent mouse events.
booleanisSnapSelectedView()
booleanisToggleSelectionEvent(MouseEvent e)
Returning true signifies a mouse event on the cell should toggle the selection of only the cell under mouse.
voidpaint(Graphics g, JComponent c)
Main painting routine.
protected voidpaintBackground(Graphics g)
Paint the background of this graph.
protected voidpaintBackgroundComponent(Graphics g, Component component)
Requests that the component responsible for painting the background paint itself
protected voidpaintBackgroundComponent(Graphics g, Component component, Rectangle clip)
Requests that the component responsible for painting the background paint itself
protected voidpaintBackgroundImage(Graphics g, Rectangle clip)
Hook for subclassers to paint the background image.
voidpaintCell(Graphics g, CellView view, Rectangle2D bounds, boolean preview)
Paints the renderer of view to g at bounds.
protected voidpaintCells(Graphics g, Rectangle2D realClipBounds)
Hook method to allow subclassers to alter just the cell painting functionality
protected voidpaintForeground(Graphics g)
Paint the foreground of this graph.
protected voidpaintGrid(double gs, Graphics g, Rectangle2D clipBounds)
Paint the grid.
protected voidpaintOverlay(Graphics g)
Hook method to paints the overlay
voidpaintPorts(Graphics g, CellView[] ports)
Paint ports.
protected voidprepareForUIInstall()
Invoked after the graph instance variable has been set, but before any defaults/listeners have been installed.
voidselectCellForEvent(Object cell, MouseEvent event)
Messaged to update the selection based on a MouseEvent over a particular cell.
voidselectCellsForEvent(JGraph graph, Object[] cells, MouseEvent event)
From GraphUI interface.
voidselectCellsForEvent(Object[] cells, MouseEvent event)
Messaged to update the selection based on a MouseEvent for a group of cells.
protected voidsetGraphLayoutCache(GraphLayoutCache cache)
Sets the GraphLayoutCache (geometric pattern).
voidsetInsertionLocation(Point p)
Sets the current location for Drag-and-Drop activity.
protected voidsetMarquee(BasicMarqueeHandler marqueeHandler)
Sets the marquee handler.
protected voidsetModel(GraphModel model)
Sets the GraphModel.
voidsetPreferredMinSize(Dimension newSize)
Sets the preferred minimum size.
protected voidsetSelectionModel(GraphSelectionModel newLSM)
Resets the selection model.
voidsetSnapSelectedView(boolean snapSelectedView)
Sets the mode of the snapSelectedView drag operation.
protected booleanstartEditing(Object cell, MouseEvent event)
Will start editing for cell if there is a cellEditor and shouldSelectCell returns true.
voidstartEditingAtCell(JGraph graph, Object cell)
Selects the cell and tries to edit it.
booleanstopEditing(JGraph graph)
Stops the current editing session.
protected voidtoggleSelectionCellForEvent(Object cell, MouseEvent event)
Messaged to update the selection based on a toggle selection event, which means the cell's selection state is inverted.
protected voiduninstallComponents()
Uninstalls the renderer pane.
protected voiduninstallKeyboardActions()
protected voiduninstallListeners()
voiduninstallUI(JComponent c)
protected voidupdateCachedPreferredSize()
Updates the preferredSize instance variable, which is returned from getPreferredSize().
voidupdateHandle()
Update the handle using createHandle.
voidupdateSize()
Messages the Graph with graphDidChange.

Field Detail

cellEditor

protected GraphCellEditor cellEditor
Current editor for the graph.

cellEditorListener

protected CellEditorListener cellEditorListener
Listens for CellEditor events.

componentListener

protected ComponentListener componentListener
Listens for Component events.

defaultDropTargetListener

protected BasicGraphUI.GraphDropTargetListener defaultDropTargetListener
The default DropTargetListener.

defaultTransferHandler

protected TransferHandler defaultTransferHandler
The default TransferHandler.

dropAction

protected int dropAction
Needed to exchange information between DropTargetHandler and TransferHandler.

dropTarget

protected DropTarget dropTarget
The drop target where the default listener was last installed.

DNDPREVIEW

public static final boolean DNDPREVIEW
Controls live-preview in dragEnabled mode. This is used to disable live-preview in dragEnabled mode on Java 1.4.0 to workaround a bug that cause the VM to hang during concurrent DnD and repaints. Is this still required?

editingCell

protected Object editingCell
Path that is being edited.

editingComponent

protected Component editingComponent
When editing, this will be the Component that is doing the actual editing.

editorHasDifferentSize

protected boolean editorHasDifferentSize
Set to true if the editor has a different size than the renderer.

focus

protected CellView focus
The focused cell under the mousepointer and the last focused cell.

graph

protected JGraph graph
Component that we're going to be drawing into.

graphLayoutCache

protected GraphLayoutCache graphLayoutCache
Reference to the graph's view (geometric pattern).

graphLayoutCacheListener

protected GraphLayoutCacheListener graphLayoutCacheListener
Updates the display when the view has changed.

graphModel

protected GraphModel graphModel
Used to determine what to display.

graphModelListener

protected GraphModelListener graphModelListener
Is responsible for updating the view based on model events.

graphSelectionListener

protected GraphSelectionListener graphSelectionListener
Updates the display when the selection changes.

graphSelectionModel

protected GraphSelectionModel graphSelectionModel
Model maintaining the selection.

handle

protected CellHandle handle
Handle that we are going to use.

insertionLocation

protected Point insertionLocation
Needed to exchange information between Transfer- and MouseListener.

keyListener

protected KeyListener keyListener
Listens for KeyListener events.

lastFocus

protected CellView lastFocus
The focused cell under the mousepointer and the last focused cell.

marquee

protected BasicMarqueeHandler marquee
Marquee that we are going to use.

mouseListener

protected MouseListener mouseListener
Listens for Mouse events.

MAXCELLS

public static int MAXCELLS
The maximum number of cells to paint when dragging.

MAXCLIPCELLS

public static int MAXCLIPCELLS
Maximum number of cells to compute clipping bounds for.

MAXHANDLES

public static int MAXHANDLES
The maximum number of handles to paint individually.

preferredMinSize

protected Dimension preferredMinSize
Minimum preferred size.

preferredSize

protected Dimension preferredSize
Size needed to completely display all the cells.

propertyChangeListener

protected PropertyChangeListener propertyChangeListener
Listens for JGraph property changes and updates display.

rendererPane

protected CellRendererPane rendererPane
Used to paint the CellRenderer.

snapSelectedView

protected boolean snapSelectedView
If ture, a the view under mousepointer will be snapped to the grid lines during a drag operation. If snap-to-grid mode is disabled, views are moved by a snap increment.

stopEditingInCompleteEditing

protected boolean stopEditingInCompleteEditing
Set to false when editing and shouldSelectCell() returns true meaning the node should be selected before editing, used in completeEditing.

SCROLLBORDER

public static int SCROLLBORDER
Border in pixels to scroll if marquee or dragging are active.

SCROLLSTEP

public static float SCROLLSTEP
Multiplicator for width and height when autoscrolling (=stepsize).

validCachedPreferredSize

protected boolean validCachedPreferredSize
Is the preferredSize valid?

Constructor Detail

BasicGraphUI

public BasicGraphUI()

Method Detail

autoscroll

public static void autoscroll(JGraph graph, Point p)
Scroll the graph for an event at p.

cancelEditing

public void cancelEditing(JGraph graph)
Cancels all current editing sessions.

completeEditing

protected void completeEditing()
Messages to stop the editing session. If the UI the receiver is providing the look and feel for returns true from getInvokesStopCellEditing, stopCellEditing will invoked on the current editor. Then completeEditing will be messaged with false, true, false to cancel any lingering editing.

completeEditing

protected void completeEditing(boolean messageStop, boolean messageCancel, boolean messageGraph)
Stops the editing session. If messageStop is true the editor is messaged with stopEditing, if messageCancel is true the editor is messaged with cancelEditing. If messageGraph is true the graphModel is messaged with valueForCellChanged.

completeUIInstall

protected void completeUIInstall()
Invoked from installUI after all the defaults/listeners have been installed.

completeUIUninstall

protected void completeUIUninstall()

createCellEditorListener

protected CellEditorListener createCellEditorListener()
Creates a listener to handle events from the current editor.

createCellRendererPane

protected CellRendererPane createCellRendererPane()
Returns the renderer pane that renderer components are placed in.

createComponentListener

protected ComponentListener createComponentListener()
Creates and returns a new ComponentHandler.

createContext

protected GraphContext createContext(JGraph graph, Object[] cells)

createGraphLayoutCacheListener

protected GraphLayoutCacheListener createGraphLayoutCacheListener()
Returns a listener that can update the graph when the view changes.

createGraphModelListener

protected GraphModelListener createGraphModelListener()
Returns a listener that can update the graph when the model changes.

createGraphSelectionListener

protected GraphSelectionListener createGraphSelectionListener()
Creates the listener that updates the display based on selection change methods.

createHandle

public CellHandle createHandle(GraphContext context)
Constructs the "root handle" for context.

Parameters: context reference to the context of the current selection.

createKeyListener

protected KeyListener createKeyListener()
Creates the listener reponsible for getting key events from the graph.

createMouseListener

protected MouseListener createMouseListener()
Creates the listener responsible for calling the correct handlers based on mouse events, and to select invidual cells.

createPropertyChangeListener

protected PropertyChangeListener createPropertyChangeListener()
Creates a listener that is responsible to update the UI based on how the graph's bounds properties change.

createTransferHandler

protected TransferHandler createTransferHandler()
Creates an instance of TransferHandler. Used for subclassers to provide different TransferHandler.

createUI

public static ComponentUI createUI(JComponent x)

drawGraph

public void drawGraph(Graphics g, Rectangle2D clipBounds)
Draws the graph to the specified graphics object within the specified clip bounds, if any

Parameters: g the graphics object to draw the graph to clipBounds the bounds within graph cells must intersect to be redrawn

getDropAction

public int getDropAction()
Returns the current drop action.

getEditingCell

public Object getEditingCell(JGraph graph)
Returns the element that is being edited.

getEditorLocation

protected Point2D getEditorLocation(Object cell, Dimension2D editorSize, Point2D pt)
Subclassers may override this to provide a better location for the in-place editing of edges (if you do not inherit from the EdgeRenderer class).

getFocusedCell

protected Object getFocusedCell()
Returns the cell that has the focus.

getHandle

public CellHandle getHandle()
Returns the handle that is currently active, or null, if no handle is currently active. Typically, the returned objects are instances of the RootHandle inner class.

getInsertionLocation

public Point getInsertionLocation()
Returns the current location of the Drag-and-Drop activity.

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Returns the maximum size for this component, which will be the preferred size if the instance is currently in a JGraph, or 0, 0.

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Returns the minimum size for this component. Which will be the min preferred size or 0, 0.

getPreferredMinSize

public Dimension getPreferredMinSize()
Returns the minimum preferred size.

getPreferredSize

public Dimension2D getPreferredSize(JGraph graph, CellView view)
Get the preferred Size for a cell view.

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Returns the preferred size to properly display the graph.

installComponents

protected void installComponents()
Intalls the subcomponents of the graph, which is the renderer pane.

installDefaults

protected void installDefaults()
Invoked as part from the boilerplate install block. This sets the look and feel specific variables in JGraph.

installKeyboardActions

protected void installKeyboardActions()
Invoked as part from the boilerplate install block.

installListeners

protected void installListeners()
Invoked as part from the boilerplate install block. This installs the listeners from BasicGraphUI in the graph.

installUI

public void installUI(JComponent c)

isAddToSelectionEvent

public boolean isAddToSelectionEvent(MouseEvent e)
Returning true signifies that cells are added to the selection.

isConstrainedMoveEvent

public boolean isConstrainedMoveEvent(MouseEvent event)
Returning true signifies a move should only be applied to one direction.

isEditing

public boolean isEditing(JGraph graph)
Returns true if the graph is being edited. The item that is being edited can be returned by getEditingPath().

isForceMarqueeEvent

public boolean isForceMarqueeEvent(MouseEvent event)
Returning true signifies the marquee handler has precedence over other handlers, and is receiving subsequent mouse events.

isSnapSelectedView

public boolean isSnapSelectedView()

Returns: true if snapSelectedView mode is enabled during the drag operation. If it is enabled, the view, that is returned by the findViewForPoint(Point pt), will be snapped to the grid lines.
By default, findViewForPoint() returns the first view from the GraphContext whose bounds intersect with snap proximity of a mouse pointer. If snap-to-grid mode is disabled, views are moved by a snap increment.

isToggleSelectionEvent

public boolean isToggleSelectionEvent(MouseEvent e)
Returning true signifies a mouse event on the cell should toggle the selection of only the cell under mouse.

paint

public void paint(Graphics g, JComponent c)
Main painting routine.

paintBackground

protected void paintBackground(Graphics g)
Paint the background of this graph. Calls paintGrid.

paintBackgroundComponent

protected void paintBackgroundComponent(Graphics g, Component component)
Requests that the component responsible for painting the background paint itself

Parameters: g The graphics object to paint the image on. component the component to be painted onto the background image

paintBackgroundComponent

protected void paintBackgroundComponent(Graphics g, Component component, Rectangle clip)
Requests that the component responsible for painting the background paint itself

Parameters: g The graphics object to paint the image on. component the component to be painted onto the background image clip The clipping region to draw into

paintBackgroundImage

protected void paintBackgroundImage(Graphics g, Rectangle clip)
Hook for subclassers to paint the background image.

Parameters: g The graphics object to paint the image on. clip The clipping region to draw into

paintCell

public void paintCell(Graphics g, CellView view, Rectangle2D bounds, boolean preview)
Paints the renderer of view to g at bounds. Recursive implementation that paints the children first.

The reciever should NOT modify clipBounds, or insets. The preview flag is passed to the renderer, and is not used here.

paintCells

protected void paintCells(Graphics g, Rectangle2D realClipBounds)
Hook method to allow subclassers to alter just the cell painting functionality

Parameters: g the graphics object to paint to realClipBounds the bounds of the region being repainted

paintForeground

protected void paintForeground(Graphics g)
Paint the foreground of this graph. Calls paintPorts.

paintGrid

protected void paintGrid(double gs, Graphics g, Rectangle2D clipBounds)
Paint the grid.

paintOverlay

protected void paintOverlay(Graphics g)
Hook method to paints the overlay

Parameters: g the graphics object to paint the overlay to

paintPorts

public void paintPorts(Graphics g, CellView[] ports)
Paint ports.

prepareForUIInstall

protected void prepareForUIInstall()
Invoked after the graph instance variable has been set, but before any defaults/listeners have been installed.

selectCellForEvent

public void selectCellForEvent(Object cell, MouseEvent event)
Messaged to update the selection based on a MouseEvent over a particular cell. If the event is a toggle selection event, the cell is either selected, or deselected. Otherwise the cell is selected.

selectCellsForEvent

public void selectCellsForEvent(JGraph graph, Object[] cells, MouseEvent event)
From GraphUI interface.

selectCellsForEvent

public void selectCellsForEvent(Object[] cells, 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.

setGraphLayoutCache

protected void setGraphLayoutCache(GraphLayoutCache cache)
Sets the GraphLayoutCache (geometric pattern). This invokes updateSize.

setInsertionLocation

public void setInsertionLocation(Point p)
Sets the current location for Drag-and-Drop activity. Should be set to null after a drop. Used from within DropTargetListener.

setMarquee

protected void setMarquee(BasicMarqueeHandler marqueeHandler)
Sets the marquee handler.

setModel

protected void setModel(GraphModel model)
Sets the GraphModel. This invokes updateSize.

setPreferredMinSize

public void setPreferredMinSize(Dimension newSize)
Sets the preferred minimum size.

setSelectionModel

protected void setSelectionModel(GraphSelectionModel newLSM)
Resets the selection model. The appropriate listeners are installed on the model.

setSnapSelectedView

public void setSnapSelectedView(boolean snapSelectedView)
Sets the mode of the snapSelectedView drag operation.

Parameters: snapSelectedView specifies if the snap-to-grid mode should be applied during a drag operation. If it is enabled, the view, that is returned by the findViewForPoint(Point pt), will be snapped to the grid lines.
By default, findViewForPoint() returns the first view from the GraphContext whose bounds intersect with snap proximity of a mouse pointer. If snap-to-grid mode is disabled, views are moved by a snap increment.

startEditing

protected boolean startEditing(Object cell, MouseEvent event)
Will start editing for cell if there is a cellEditor and shouldSelectCell returns true.

This assumes that cell is valid and visible.

startEditingAtCell

public void startEditingAtCell(JGraph graph, Object cell)
Selects the cell and tries to edit it. Editing will fail if the CellEditor won't allow it for the selected item.

stopEditing

public 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.

toggleSelectionCellForEvent

protected void toggleSelectionCellForEvent(Object cell, MouseEvent event)
Messaged to update the selection based on a toggle selection event, which means the cell's selection state is inverted.

uninstallComponents

protected void uninstallComponents()
Uninstalls the renderer pane.

uninstallKeyboardActions

protected void uninstallKeyboardActions()

uninstallListeners

protected void uninstallListeners()

uninstallUI

public void uninstallUI(JComponent c)

updateCachedPreferredSize

protected void updateCachedPreferredSize()
Updates the preferredSize instance variable, which is returned from getPreferredSize().

updateHandle

public void updateHandle()
Update the handle using createHandle.

updateSize

public void updateSize()
Messages the Graph with graphDidChange.
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.