|
|||||||||
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.JSplitPane | +--utilities.Graph
This class encapsulates the display of a graph, using GraphNodes, GraphEdges, and derived classes. It is not an efficient class; there is redundant data storage, things like that, that made certain other things easier. However, any speed loss due to this is negligable compared to the speed loss from swing. We're using java, so what does it matter, anyway?
Inner Class Summary | |
class |
Graph.GraphCanvas
This class encapsulates the placement of nodes and the mouse handling |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
static Graph |
globalhack
|
Fields inherited from class javax.swing.JSplitPane |
BOTTOM, CONTINUOUS_LAYOUT_PROPERTY, DIVIDER, DIVIDER_LOCATION_PROPERTY, DIVIDER_SIZE_PROPERTY, HORIZONTAL_SPLIT, LAST_DIVIDER_LOCATION_PROPERTY, LEFT, ONE_TOUCH_EXPANDABLE_PROPERTY, ORIENTATION_PROPERTY, RESIZE_WEIGHT_PROPERTY, RIGHT, TOP, VERTICAL_SPLIT |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Graph()
blank constructor |
|
Graph(java.lang.String l)
default constructor |
Method Summary | |
void |
addLayer(java.lang.String s)
|
void |
addMenuItem(javax.swing.JMenuItem item)
|
void |
addNode(GraphNode n)
|
void |
addNode(GraphNode n,
javax.swing.JPanel p,
java.lang.String layer)
Adds a node to the graph |
void |
addToLayer(java.lang.String layer,
GraphNode n,
javax.swing.JPanel p)
|
void |
addTree(GraphNode n)
|
java.lang.Object |
clone()
clones the object |
void |
exciseNode(GraphNode n)
Removes a node and excises it from its surrounding connections |
GraphNode |
findNode(GraphNode n)
returns a node matching n |
java.util.Enumeration |
findNodes(GraphNode n)
returns an enumeration of nodes matching n |
java.util.Enumeration |
getAllNodes()
Returns all nodes in the graph |
java.lang.String |
getLabel()
accessors |
GraphLayers |
getLayers()
|
java.util.Enumeration |
getNodes()
returns an enumeration of the nodes contained in the graph note that this will only return the high level nodes, use getAllNodes to return everything in the graph. |
void |
mergeGraph(Graph g)
merges a Graph g into this one |
void |
removeNode(GraphNode n)
Removes a node from the graph |
void |
saveCfg()
saves the information in this object to the proper location in the CfgManager. |
void |
setDefaultLayer(java.lang.String s)
|
void |
setLabel(java.lang.String l)
|
java.lang.String |
toString()
|
void |
unmergeGraph(Graph g)
unmerges a graph based on g from the graph |
void |
updateCfg()
updates the information in this object with information currently in the CfgManager. |
Methods inherited from class javax.swing.JSplitPane |
getAccessibleContext, getBottomComponent, getDividerLocation, getDividerSize, getLastDividerLocation, getLeftComponent, getMaximumDividerLocation, getMinimumDividerLocation, getOrientation, getResizeWeight, getRightComponent, getTopComponent, getUI, getUIClassID, isContinuousLayout, isOneTouchExpandable, isValidateRoot, remove, remove, removeAll, resetToPreferredSizes, setBottomComponent, setContinuousLayout, setDividerLocation, setDividerLocation, setDividerSize, setLastDividerLocation, setLeftComponent, setOneTouchExpandable, setOrientation, setResizeWeight, setRightComponent, setTopComponent, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, removeContainerListener, setLayout, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static Graph globalhack
Constructor Detail |
public Graph(java.lang.String l)
l
- The graph's labelpublic Graph()
Method Detail |
public java.lang.String getLabel()
public void setLabel(java.lang.String l)
public GraphLayers getLayers()
public void setDefaultLayer(java.lang.String s)
public void addNode(GraphNode n)
public void addNode(GraphNode n, javax.swing.JPanel p, java.lang.String layer)
public void addTree(GraphNode n)
public void removeNode(GraphNode n)
public void exciseNode(GraphNode n)
GraphNode.excise()
public java.util.Enumeration getNodes()
public java.util.Enumeration getAllNodes()
public java.util.Enumeration findNodes(GraphNode n)
public GraphNode findNode(GraphNode n)
public void mergeGraph(Graph g)
public void unmergeGraph(Graph g)
public java.lang.Object clone()
public java.lang.String toString()
toString
in class java.awt.Component
public void addLayer(java.lang.String s)
public void addToLayer(java.lang.String layer, GraphNode n, javax.swing.JPanel p)
public void addMenuItem(javax.swing.JMenuItem item)
public void updateCfg()
ConfiguredObject
updateCfg
in interface ConfiguredObject
public void saveCfg()
ConfiguredObject
saveCfg
in interface ConfiguredObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |