|
TWE 2.4-1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
org.jgraph.plaf.GraphUI
org.jgraph.plaf.basic.BasicGraphUI
org.enhydra.jawe.components.graph.JaWEGraphUI
This class and it's inner classes controls mouse actions and clipboard. It is addapted to get wanted editing cell behaviour, selection behaviour , to implement cell overlaping, to implement right participant adjustment after cell (or group of cells) is moved, and to implement proper copying and pasting/cloning of cells, as well as pasting at wanted location (along with right participant adjustment).
Nested Class Summary | |
class |
JaWEGraphUI.PEGraphLayoutCacheHandler
This class observes view changes and is adapted to disallow deselection of cells after dragging. |
class |
JaWEGraphUI.PEGraphModelHandler
Listens for changes in the graph model and updates the view accordingly. |
class |
JaWEGraphUI.PEKeyHandler
This is used to get multiple key down events to appropriately generate events. |
class |
JaWEGraphUI.PEMouseHandler
Handles selection in a way that we expect. |
class |
JaWEGraphUI.PERootHandle
Manages selection movement. |
Nested classes inherited from class org.jgraph.plaf.basic.BasicGraphUI |
org.jgraph.plaf.basic.BasicGraphUI.CellEditorHandler, org.jgraph.plaf.basic.BasicGraphUI.ComponentHandler, org.jgraph.plaf.basic.BasicGraphUI.GraphDropTargetListener, org.jgraph.plaf.basic.BasicGraphUI.GraphIncrementAction, org.jgraph.plaf.basic.BasicGraphUI.GraphLayoutCacheHandler, org.jgraph.plaf.basic.BasicGraphUI.GraphModelHandler, org.jgraph.plaf.basic.BasicGraphUI.GraphSelectionHandler, org.jgraph.plaf.basic.BasicGraphUI.KeyHandler, org.jgraph.plaf.basic.BasicGraphUI.MouseHandler, org.jgraph.plaf.basic.BasicGraphUI.MouseInputHandler, org.jgraph.plaf.basic.BasicGraphUI.PropertyChangeHandler, org.jgraph.plaf.basic.BasicGraphUI.RootHandle |
Field Summary | |
protected boolean |
aborted
|
static int |
INSERT_ELEMENT
|
static int |
INSERT_PARTICIPANT
|
static int |
INSERT_SPEC_ELEMENT
|
static int |
INSERT_TRANSITION_POINTS
|
static int |
INSERT_TRANSITION_START
|
static int |
MULTIPLE_SELECTION
|
static int |
SELECTION
|
protected boolean |
selectOnRelease
|
protected int |
status
|
Fields inherited from class org.jgraph.plaf.basic.BasicGraphUI |
cellEditor, cellEditorListener, componentListener, defaultDropTargetListener, defaultTransferHandler, DNDPREVIEW, dropAction, dropTarget, editingCell, editingComponent, editorHasDifferentSize, focus, graph, graphLayoutCache, graphLayoutCacheListener, graphModel, graphModelListener, graphSelectionListener, graphSelectionModel, handle, insertionLocation, keyListener, marquee, MAXCELLS, MAXCLIPCELLS, MAXHANDLES, mouseListener, preferredMinSize, preferredSize, propertyChangeListener, rendererPane, SCROLLBORDER, SCROLLSTEP, snapSelectedView, stopEditingInCompleteEditing, validCachedPreferredSize |
Constructor Summary | |
JaWEGraphUI()
|
Method Summary | |
protected org.jgraph.event.GraphLayoutCacheListener |
createGraphLayoutCacheListener()
Returns a listener that can update the graph when the view changes. |
org.jgraph.graph.CellHandle |
createHandle(org.jgraph.graph.GraphContext context)
Constructs the "root handle" for context . |
protected java.awt.event.KeyListener |
createKeyListener()
Creates the listener reponsible for getting key events from the graph. |
protected java.awt.event.MouseListener |
createMouseListener()
Creates the listener responsible for updating the selection based on mouse events. |
Graph |
getGraph()
Returns graph. |
GraphController |
getGraphController()
|
protected void |
paintBackground(java.awt.Graphics g)
Paint the background of this graph. |
void |
reset()
|
protected boolean |
startEditing(java.lang.Object cell,
java.awt.event.MouseEvent event)
This method is called by EditAction class, as well as by pressing F2 or clicking a mouse on a cell. |
void |
startEditingAtCell(org.jgraph.JGraph pGraph,
java.lang.Object cell)
|
Methods inherited from class org.jgraph.plaf.basic.BasicGraphUI |
autoscroll, cancelEditing, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, createCellEditorListener, createCellRendererPane, createComponentListener, createContext, createGraphModelListener, createGraphSelectionListener, createPropertyChangeListener, createTransferHandler, createUI, getDropAction, getEditingCell, getEditorLocation, getFocusedCell, getHandle, getInsertionLocation, getMaximumSize, getMinimumSize, getPreferredMinSize, getPreferredSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isAddToSelectionEvent, isConstrainedMoveEvent, isEditing, isForceMarqueeEvent, isSnapSelectedView, isToggleSelectionEvent, paint, paintCell, paintForeground, paintGrid, paintPorts, prepareForUIInstall, selectCellForEvent, selectCellsForEvent, selectCellsForEvent, setGraphLayoutCache, setInsertionLocation, setMarquee, setModel, setPreferredMinSize, setSelectionModel, setSnapSelectedView, stopEditing, toggleSelectionCellForEvent, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUI, updateCachedPreferredSize, updateHandle, updateSize |
Methods inherited from class javax.swing.plaf.ComponentUI |
contains, getAccessibleChild, getAccessibleChildrenCount, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SELECTION
public static final int MULTIPLE_SELECTION
public static final int INSERT_ELEMENT
public static final int INSERT_PARTICIPANT
public static final int INSERT_SPEC_ELEMENT
public static final int INSERT_TRANSITION_START
public static final int INSERT_TRANSITION_POINTS
protected int status
protected boolean aborted
protected boolean selectOnRelease
Constructor Detail |
public JaWEGraphUI()
Method Detail |
public Graph getGraph()
public GraphController getGraphController()
protected void paintBackground(java.awt.Graphics g)
protected boolean startEditing(java.lang.Object cell, java.awt.event.MouseEvent event)
public void startEditingAtCell(org.jgraph.JGraph pGraph, java.lang.Object cell)
protected java.awt.event.MouseListener createMouseListener()
public org.jgraph.graph.CellHandle createHandle(org.jgraph.graph.GraphContext context)
context
.
context
- reference to the context of the current selection.protected org.jgraph.event.GraphLayoutCacheListener createGraphLayoutCacheListener()
public void reset()
protected java.awt.event.KeyListener createKeyListener()
|
TWE 2.4-1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |