|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--uci.gef.JGraph
JGraph is a Swing component that displays a connected graph and allows interactive editing. In many ways this class serves as a simple front-end to class Editor, and other classes which do the real work.
| Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Field Summary | |
protected uci.gef.JGraphInternalPane |
_drawingPane
|
protected Editor |
_editor
The Editor object that is being shown in this panel |
protected JScrollPane |
_scroll
|
| Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
| Constructor Summary | |
JGraph()
Make a new JGraph with a new DefaultGraphModel. |
|
JGraph(Diagram d)
Make a new JGraph with a the GraphModel and Layer from the given Diagram. |
|
JGraph(Editor ed)
Make a new JGraph with the given Editor. |
|
JGraph(GraphModel gm)
Make a new JGraph with the given GraphModel |
|
| Method Summary | |
void |
addGraphSelectionListener(GraphSelectionListener listener)
Add listener to the objects to notify whenever the Editor changes its current selection. |
void |
addKeyListener(KeyListener listener)
|
void |
addModeChangeListener(ModeChangeListener listener)
|
void |
addMouseListener(MouseListener listener)
|
void |
addMouseMotionListener(MouseMotionListener listener)
|
void |
bindKey(ActionListener action,
int keyCode,
int modifiers)
Utility function to bind a keystroke to a Swing Action. |
Object |
clone()
Make a copy of this JGraph so that it can be shown in another window. |
void |
deselect(Fig f)
Remove the given item from this editors selections. |
void |
deselectAll()
Deslect everything that is currently selected. |
Editor |
getEditor()
Get the Editor that is being displayed |
GraphEdgeRenderer |
getGraphEdgeRenderer()
|
GraphModel |
getGraphModel()
|
GraphNodeRenderer |
getGraphNodeRenderer()
|
void |
initKeys()
|
boolean |
isFocusTraversable()
Tell Swing/AWT that JGraph can be tabbed into. |
boolean |
isManagingFocus()
Tell Swing/AWT that JGraph handles tab-order itself. |
void |
layoutGraph()
|
void |
removeGraphSelectionListener(GraphSelectionListener listener)
|
void |
removeModeChangeListener(ModeChangeListener listener)
|
void |
select(Fig f)
Add the given item to this Editor's selections. |
void |
select(Vector items)
Select a collection of Figs. |
void |
selectByOwner(Object owner)
Find the Fig that owns the given item and select it. |
void |
selectByOwnerOrFig(Object owner)
Find Fig that owns the given item, or the item if it is a Fig, and select it. |
void |
selectByOwnerOrNoChange(Object owner)
Add the Fig that owns the given item to this Editor's selections. |
Vector |
selectedFigs()
reply a Vector of all selected Figs. |
void |
setDiagram(Diagram d)
Set the Diagram that should be displayed by setting the GraphModel and Layer that the Editor is using. |
void |
setDrawingSize(int width,
int height)
|
void |
setGraphEdgeRenderer(GraphEdgeRenderer r)
Get and set the Renderer used to make FigEdges for edges in the GraphModel. |
void |
setGraphModel(GraphModel gm)
Get and set the GraphModel the Editor is using. |
void |
setGraphNodeRenderer(GraphNodeRenderer r)
Get and set the Renderer used to make FigNodes for nodes in the GraphModel. |
void |
setVisible(boolean b)
When the JGraph is hidden, hide its internal pane |
void |
toggleItem(Fig f)
Select the given item if it was not already selected, and vis-a-versa. |
void |
toggleItems(Vector items)
Toggle the selection of a collection of Figs. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
| Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate,
validateTree |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected Editor _editor
protected uci.gef.JGraphInternalPane _drawingPane
protected JScrollPane _scroll
| Constructor Detail |
public JGraph()
DefaultGraphModelpublic JGraph(Diagram d)
public JGraph(GraphModel gm)
public JGraph(Editor ed)
| Method Detail |
public void addMouseListener(MouseListener listener)
public void addMouseMotionListener(MouseMotionListener listener)
public void addKeyListener(KeyListener listener)
public Object clone()
public void initKeys()
public void bindKey(ActionListener action,
int keyCode,
int modifiers)
public Editor getEditor()
public void setDiagram(Diagram d)
public void setDrawingSize(int width,
int height)
public void setGraphModel(GraphModel gm)
public GraphModel getGraphModel()
public void setGraphNodeRenderer(GraphNodeRenderer r)
public GraphNodeRenderer getGraphNodeRenderer()
public void setGraphEdgeRenderer(GraphEdgeRenderer r)
public GraphEdgeRenderer getGraphEdgeRenderer()
public void setVisible(boolean b)
public boolean isManagingFocus()
public boolean isFocusTraversable()
public void addGraphSelectionListener(GraphSelectionListener listener)
public void removeGraphSelectionListener(GraphSelectionListener listener)
public void addModeChangeListener(ModeChangeListener listener)
public void removeModeChangeListener(ModeChangeListener listener)
public void layoutGraph()
public void select(Fig f)
public void selectByOwner(Object owner)
public void selectByOwnerOrFig(Object owner)
public void selectByOwnerOrNoChange(Object owner)
public void deselect(Fig f)
public void toggleItem(Fig f)
public void deselectAll()
public void select(Vector items)
public void toggleItems(Vector items)
public Vector selectedFigs()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||