com.jgraph.plaf
Class GraphUI

java.lang.Object
  |
  +--javax.swing.plaf.ComponentUI
        |
        +--com.jgraph.plaf.GraphUI
Direct Known Subclasses:
BasicGraphUI

public abstract class GraphUI
extends javax.swing.plaf.ComponentUI

Pluggable look and feel interface for JGraph.


Constructor Summary
GraphUI()
          Paints the renderer of view to g at bounds.
 
Method Summary
abstract  void cancelEditing(JGraph jgraph)
          The abstract method cancelEditing
abstract  java.lang.Object getEditingCell(JGraph jgraph)
          The abstract method getEditingCell
abstract  CellHandle getHandle(JGraph jgraph)
          The abstract method getHandle
abstract  java.awt.Dimension getPreferredSize(JGraph jgraph, CellView cellview)
          The abstract method getPreferredSize
abstract  boolean isEditing(JGraph jgraph)
          The abstract method isEditing
abstract  void paintCell(java.awt.Graphics g, CellView cellview, java.awt.Rectangle rectangle, boolean flag)
          The abstract method paintCell
abstract  void paintPorts(java.awt.Graphics g, PortView[] aportview)
          The abstract method paintPorts
abstract  void selectCellsForEvent(JGraph jgraph, java.lang.Object[] aobj, java.awt.event.MouseEvent mouseevent)
          The abstract method selectCellsForEvent
abstract  void startEditingAtCell(JGraph jgraph, java.lang.Object obj)
          The abstract method startEditingAtCell
abstract  boolean stopEditing(JGraph jgraph)
          The abstract method stopEditing
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphUI

public GraphUI()
Paints the renderer of view to g at bounds.

Method Detail

paintCell

public abstract void paintCell(java.awt.Graphics g,
                               CellView cellview,
                               java.awt.Rectangle rectangle,
                               boolean flag)
The abstract method paintCell

Parameters:
g - This is the Graphics object for the cell(s) you want to paint.
cellview - This is the object holding the selected cell(s).
rectangle - This is the Rectangle object holding the information such as x, y, width, and height.
flag - This will be passed as the fourth parameter to Cellview.getRendererComponent

paintPorts

public abstract void paintPorts(java.awt.Graphics g,
                                PortView[] aportview)
The abstract method paintPorts

Parameters:
g - This is the Graphics object for the port(s) you want to paint.
aportview - This is the object holding the selected port(s).

selectCellsForEvent

public abstract void selectCellsForEvent(JGraph jgraph,
                                         java.lang.Object[] aobj,
                                         java.awt.event.MouseEvent mouseevent)
The abstract method selectCellsForEvent

Parameters:
jgraph - This is the JGraph object with which you are working.
aobj - This is an array of Objects that will be affected by the MouseEvent.
mouseevent - either AddToSelectionEvent or ToggleSelectionEvent

getPreferredSize

public abstract java.awt.Dimension getPreferredSize(JGraph jgraph,
                                                    CellView cellview)
The abstract method getPreferredSize

Parameters:
jgraph - This is the JGraph object with which you are working.
cellview - This is the object that you wish to get the size of.
Returns:
Returns the size of the CellView object

getHandle

public abstract CellHandle getHandle(JGraph jgraph)
The abstract method getHandle

Parameters:
jgraph - This is the JGraph object with which you are working.
Returns:
Returns the handle of the JGraph object.

isEditing

public abstract boolean isEditing(JGraph jgraph)
The abstract method isEditing

Parameters:
jgraph - This is the JGraph object with which you are working.
Returns:
Returns true if editingComponent != null

stopEditing

public abstract boolean stopEditing(JGraph jgraph)
The abstract method stopEditing

Parameters:
jgraph - This is the JGraph object with which you are working.
Returns:
Returns true if it is time to stop the cell editing.

cancelEditing

public abstract void cancelEditing(JGraph jgraph)
The abstract method cancelEditing

Parameters:
jgraph - This is the JGraph object with which you are working.

startEditingAtCell

public abstract void startEditingAtCell(JGraph jgraph,
                                        java.lang.Object obj)
The abstract method startEditingAtCell

Parameters:
jgraph - This is the JGraph object with which you are working.
obj - This is the cell at which to start editing.

getEditingCell

public abstract java.lang.Object getEditingCell(JGraph jgraph)
The abstract method getEditingCell

Parameters:
jgraph - This is the JGraph object with which you are working.
Returns:
Returns the Object associated with the cell that is being edited.