|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
edu.uci.ics.jung.visualization.GraphDraw
A Swing-only component for drawing graphs. Allows a series of manipulations to access and show graphs, to set their various colors and lines, and to dynamically change values. This is a good starting place for getting a graph up quickly.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
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 | |
GraphDraw(Graph g)
Creates a graph drawing environment that draws this graph object. |
Method Summary | |
void |
addGraphMouseListener(GraphMouseListener gel)
This is the interface for adding a mouse listener. |
javax.swing.JSlider |
addSlider(LevelFilter l,
int low,
int high,
int defaultVal)
Creates a new slider based off of a LevelFilter. |
void |
addStaticFilter(Filter f)
Adds a Filter that doesn't slide. |
void |
addTool(javax.swing.JComponent jc)
Adds a tool to the toolbar. |
void |
callBack(java.lang.String status)
|
Layout |
getGraphLayout()
Returns the currently operative layout. |
SettableRenderer |
getRender()
|
VisualizationViewer |
getVisualizationViewer()
Returns the visualizationviewer that actually does the graph drawing. |
void |
hideStatus()
Hides the status bar at bottom left |
void |
removeAllFilters()
Removes all the filters, deleting the sliders that drive them. |
void |
resetRenderer()
|
void |
restartLayout()
This is the "scramble" button--it resets the layout. |
void |
setBackground(java.awt.Color bg)
|
void |
setBackgroundColor(java.awt.Color bgColor)
|
void |
setEdgeColor(java.awt.Color c)
A passthrough to the function at originalRenderer . |
void |
setEdgeColorFunction(EdgeColorFunction ecf)
A passthrough to the function at originalRenderer . |
void |
setEdgeThickness(int i)
A passthrough to the function at originalRenderer . |
void |
setEdgeThicknessFunction(EdgeThicknessFunction etf)
A passthrough to the function at originalRenderer . |
void |
setGraphLayout(Layout l)
Dynamically chooses a new GraphLayout. |
void |
setRenderer(Renderer r)
A method to set the renderer. |
void |
setVertexBGColor(java.awt.Color vertexColor)
A passthrough to the function at originalRenderer . |
void |
setVertexColorFunction(VertexColorFunction vcf)
A passthrough to the function at originalRenderer . |
void |
setVertexForegroundColor(java.awt.Color vertexColor)
A passthrough to the function at originalRenderer . |
void |
setVertexPickedColor(java.awt.Color vertexColor)
A passthrough to the function at originalRenderer . |
void |
showStatus()
Shows the status bar at bottom left |
void |
stop()
|
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, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, 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, hide, 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, 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, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GraphDraw(Graph g)
g
- Method Detail |
public VisualizationViewer getVisualizationViewer()
public void addGraphMouseListener(GraphMouseListener gel)
gel
- public void showStatus()
public void hideStatus()
public void setBackground(java.awt.Color bg)
public void callBack(java.lang.String status)
callBack
in interface StatusCallback
public void setRenderer(Renderer r)
r
- the new rendererpublic void resetRenderer()
public SettableRenderer getRender()
public void setEdgeColor(java.awt.Color c)
originalRenderer
.
c
- the new edge colorpublic void setEdgeColorFunction(EdgeColorFunction ecf)
originalRenderer
.
ecf
- the new EdgeColorFunction
public void setEdgeThickness(int i)
originalRenderer
.
i
- the thickness of the edgepublic void setEdgeThicknessFunction(EdgeThicknessFunction etf)
originalRenderer
.
etf
- the new EdgeThicknessFunction
public void setVertexForegroundColor(java.awt.Color vertexColor)
originalRenderer
.
vertexColor
- the new foreground color of the verticespublic void setVertexPickedColor(java.awt.Color vertexColor)
originalRenderer
.
vertexColor
- the new picked color of the verticespublic void setVertexBGColor(java.awt.Color vertexColor)
originalRenderer
.
vertexColor
- the background color of the vertex that is to be setpublic void setVertexColorFunction(VertexColorFunction vcf)
originalRenderer
.
vcf
- the new VertexColorFunction
public void setGraphLayout(Layout l)
l
- the new graph layout algorithmpublic void removeAllFilters()
public void addStaticFilter(Filter f)
f
- public javax.swing.JSlider addSlider(LevelFilter l, int low, int high, int defaultVal)
TODO: The situation may not be entirely right until applyFilter has been called.
l
- The Filter to use.low
- The low value on the filter: this will be the low point on
the sliderhigh
- The high value on the filter: this will be the high point on
the sliderdefaultVal
- The starting point on the filter
public void addTool(javax.swing.JComponent jc)
jc
- the tool--any JComponent--to be added to the Toolbar on the
left sidepublic Layout getGraphLayout()
public void restartLayout()
public void stop()
public void setBackgroundColor(java.awt.Color bgColor)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |