zeus.gui.graph
Class Graph
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
zeus.gui.graph.SelectPanel
zeus.gui.graph.MovePanel
zeus.gui.graph.Graph
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.util.EventListener, GraphIconListener, GraphModelListener, GraphNodeEditorListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable
- public class Graph
- extends MovePanel
- implements GraphIconListener, GraphModelListener, GraphNodeEditorListener
- See Also:
- Serialized Form
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class javax.swing.JPanel |
|
| 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.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
|
Method Summary |
protected void |
addNode(GraphNode node)
|
void |
addNotify()
|
protected boolean |
centerView(GraphNode self,
java.util.Vector aList)
|
void |
collapse()
|
protected void |
collapseNode(GraphNode node,
java.util.Vector doneList)
|
protected boolean |
computeCircularPosition(GraphNode self,
java.util.Vector doneList,
java.awt.Point p)
|
boolean |
computeHorizontalPosition(GraphNode self,
java.util.Vector doneList,
java.awt.Point p)
|
boolean |
computeVerticalPosition(GraphNode self,
java.util.Vector doneList,
java.awt.Point p)
|
protected void |
drawEdge(java.awt.Color color,
java.awt.Point p1,
java.awt.Point p2,
java.awt.Graphics g)
|
protected void |
drawLinks(java.awt.Graphics graphics)
|
protected void |
drawLinks(GraphNode node,
java.awt.Graphics graphics)
|
void |
expand()
|
protected void |
expandNode(GraphNode node,
java.util.Vector doneList)
|
protected GraphIcon |
findIcon(java.awt.Point pt)
|
java.awt.Rectangle |
getBounds(GraphNode node)
|
protected void |
getConnection(java.awt.Rectangle bb,
int edge,
java.awt.Point p)
|
protected boolean |
getConnections(GraphNode node1,
GraphNode node2,
java.awt.Point p1,
java.awt.Point p2)
|
protected java.awt.Rectangle |
getDrawArea(java.util.Vector doneList)
|
GraphModel |
getModel()
|
GraphNodeEditor |
getNodeEditor()
|
GraphNodeRenderer |
getNodeRenderer()
|
protected void |
getRelations(java.util.Vector doList,
java.util.Vector doneList)
|
GraphNode[] |
getSelectedNodes()
|
void |
graphNodeAdded(GraphModelEvent evt)
|
void |
graphNodeEditingCancelled(GraphNodeEditorEvent evt)
|
void |
graphNodeEditingStopped(GraphNodeEditorEvent evt)
|
void |
graphNodeRemoved(GraphModelEvent evt)
|
void |
graphNodeStateChanged(GraphModelEvent evt)
|
void |
graphStructureChanged(GraphModelEvent evt)
|
void |
hide()
|
boolean |
isVisible(GraphNode node)
|
void |
locationChanged(GraphIconEvent evt)
|
void |
paintComponent(java.awt.Graphics g)
|
void |
performLeftMouseAction(GraphIconEvent evt)
|
void |
performLeftMouseDClickAction(GraphIconEvent evt)
|
void |
performMiddleMouseAction(GraphIconEvent evt)
|
void |
performRightMouseAction(GraphIconEvent evt)
|
void |
recompute()
|
void |
redraw()
|
protected void |
removeNode(GraphNode node)
|
protected void |
reset()
|
void |
select()
|
void |
selectAll()
|
void |
setModel(GraphModel model)
|
void |
setNodeEditor(GraphNodeEditor nodeEditor)
|
void |
setNodeRenderer(GraphNodeRenderer nodeRenderer)
|
void |
setViewMode(int mode)
|
void |
show()
|
protected void |
updateNode(GraphNode node)
|
| Methods inherited from class zeus.gui.graph.SelectPanel |
boundedItems, clearRegion, currentBounds, drawLast, drawNext, drawRegion, findItems, getAnchor, getEnd, getLast, getStretched, lastBounds, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VERTICAL_PARENT_CHILD
public static final int VERTICAL_PARENT_CHILD
- See Also:
- Constant Field Values
VERTICAL_CHILD_PARENT
public static final int VERTICAL_CHILD_PARENT
- See Also:
- Constant Field Values
HORIZONTAL_PARENT_CHILD
public static final int HORIZONTAL_PARENT_CHILD
- See Also:
- Constant Field Values
HORIZONTAL_CHILD_PARENT
public static final int HORIZONTAL_CHILD_PARENT
- See Also:
- Constant Field Values
CENTRED
public static final int CENTRED
- See Also:
- Constant Field Values
CIRCLES
public static final int CIRCLES
- See Also:
- Constant Field Values
ORG_DX
protected static final int ORG_DX
- See Also:
- Constant Field Values
ORG_DY
protected static final int ORG_DY
- See Also:
- Constant Field Values
HEIGHT_FACTOR
protected static final double HEIGHT_FACTOR
- See Also:
- Constant Field Values
BETA
protected static final int BETA
- See Also:
- Constant Field Values
GAMMA
protected static final int GAMMA
- See Also:
- Constant Field Values
BOTTOM_EDGE
protected static final int BOTTOM_EDGE
- See Also:
- Constant Field Values
TOP_EDGE
protected static final int TOP_EDGE
- See Also:
- Constant Field Values
LEFT_EDGE
protected static final int LEFT_EDGE
- See Also:
- Constant Field Values
RIGHT_EDGE
protected static final int RIGHT_EDGE
- See Also:
- Constant Field Values
ViewList
protected java.util.Hashtable ViewList
model
protected GraphModel model
nodeRenderer
protected GraphNodeRenderer nodeRenderer
nodeEditor
protected GraphNodeEditor nodeEditor
nodeEditorComponent
protected java.awt.Component nodeEditorComponent
pane
protected javax.swing.JLayeredPane pane
isNodeEditable
protected boolean isNodeEditable
isLinkEditable
protected boolean isLinkEditable
viewMode
protected int viewMode
startPoint
private java.awt.Point startPoint
lastPoint
private java.awt.Point lastPoint
stretchedPoint
private java.awt.Point stretchedPoint
sourceIcon
private GraphIcon sourceIcon
destIcon
private GraphIcon destIcon
Graph
public Graph(int viewMode,
GraphModel model,
boolean isNodeEditable,
boolean isLinkEditable)
Graph
public Graph(GraphModel model,
boolean isNodeEditable,
boolean isLinkEditable)
Graph
public Graph(GraphModel model)
setModel
public void setModel(GraphModel model)
getModel
public GraphModel getModel()
setViewMode
public void setViewMode(int mode)
getNodeRenderer
public GraphNodeRenderer getNodeRenderer()
setNodeRenderer
public void setNodeRenderer(GraphNodeRenderer nodeRenderer)
getNodeEditor
public GraphNodeEditor getNodeEditor()
setNodeEditor
public void setNodeEditor(GraphNodeEditor nodeEditor)
addNotify
public void addNotify()
isVisible
public boolean isVisible(GraphNode node)
getBounds
public java.awt.Rectangle getBounds(GraphNode node)
reset
protected void reset()
addNode
protected void addNode(GraphNode node)
removeNode
protected void removeNode(GraphNode node)
updateNode
protected void updateNode(GraphNode node)
hide
public void hide()
show
public void show()
collapse
public void collapse()
expand
public void expand()
getSelectedNodes
public GraphNode[] getSelectedNodes()
collapseNode
protected void collapseNode(GraphNode node,
java.util.Vector doneList)
expandNode
protected void expandNode(GraphNode node,
java.util.Vector doneList)
select
public void select()
selectAll
public void selectAll()
recompute
public void recompute()
getDrawArea
protected java.awt.Rectangle getDrawArea(java.util.Vector doneList)
redraw
public void redraw()
paintComponent
public void paintComponent(java.awt.Graphics g)
drawLinks
protected void drawLinks(java.awt.Graphics graphics)
getRelations
protected void getRelations(java.util.Vector doList,
java.util.Vector doneList)
computeCircularPosition
protected boolean computeCircularPosition(GraphNode self,
java.util.Vector doneList,
java.awt.Point p)
centerView
protected boolean centerView(GraphNode self,
java.util.Vector aList)
computeHorizontalPosition
public boolean computeHorizontalPosition(GraphNode self,
java.util.Vector doneList,
java.awt.Point p)
computeVerticalPosition
public boolean computeVerticalPosition(GraphNode self,
java.util.Vector doneList,
java.awt.Point p)
drawLinks
protected void drawLinks(GraphNode node,
java.awt.Graphics graphics)
getConnection
protected void getConnection(java.awt.Rectangle bb,
int edge,
java.awt.Point p)
getConnections
protected boolean getConnections(GraphNode node1,
GraphNode node2,
java.awt.Point p1,
java.awt.Point p2)
drawEdge
protected void drawEdge(java.awt.Color color,
java.awt.Point p1,
java.awt.Point p2,
java.awt.Graphics g)
findIcon
protected GraphIcon findIcon(java.awt.Point pt)
locationChanged
public void locationChanged(GraphIconEvent evt)
- Specified by:
locationChanged in interface GraphIconListener
performLeftMouseDClickAction
public void performLeftMouseDClickAction(GraphIconEvent evt)
- Specified by:
performLeftMouseDClickAction in interface GraphIconListener
performLeftMouseAction
public void performLeftMouseAction(GraphIconEvent evt)
- Specified by:
performLeftMouseAction in interface GraphIconListener
performRightMouseAction
public void performRightMouseAction(GraphIconEvent evt)
- Specified by:
performRightMouseAction in interface GraphIconListener
performMiddleMouseAction
public void performMiddleMouseAction(GraphIconEvent evt)
- Specified by:
performMiddleMouseAction in interface GraphIconListener
graphNodeEditingStopped
public void graphNodeEditingStopped(GraphNodeEditorEvent evt)
- Specified by:
graphNodeEditingStopped in interface GraphNodeEditorListener
graphNodeEditingCancelled
public void graphNodeEditingCancelled(GraphNodeEditorEvent evt)
- Specified by:
graphNodeEditingCancelled in interface GraphNodeEditorListener
graphStructureChanged
public void graphStructureChanged(GraphModelEvent evt)
- Specified by:
graphStructureChanged in interface GraphModelListener
graphNodeAdded
public void graphNodeAdded(GraphModelEvent evt)
- Specified by:
graphNodeAdded in interface GraphModelListener
graphNodeRemoved
public void graphNodeRemoved(GraphModelEvent evt)
- Specified by:
graphNodeRemoved in interface GraphModelListener
graphNodeStateChanged
public void graphNodeStateChanged(GraphModelEvent evt)
- Specified by:
graphNodeStateChanged in interface GraphModelListener
Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.