Package net.ontopia.topicmaps.viz
Class ExtendedTGPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- com.touchgraph.graphlayout.TGPanel
-
- net.ontopia.topicmaps.viz.ExtendedTGPanel
-
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
public class ExtendedTGPanel extends com.touchgraph.graphlayout.TGPanelTGPanel contains code for drawing the graph, and storing which nodes are selected, and which ones the mouse is over. It houses methods to activate TGLayout, which performs dynamic layout. Whenever the graph is moved, or repainted, TGPanel fires listner methods on associated objects.Parts of this code build upon Sun's Graph Layout example. http://java.sun.com/applets/jdk/1.1/demo/GraphLayout/Graph.java
- Author:
- Alexander Shapiro, Murray Altheim (2001-11-06; 2002-01-14 cleanup)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classExtendedTGPanel.AdjustOriginLensclassExtendedTGPanel.SwitchSelectUI-
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static ColorBACK_COLORprotected net.ontopia.topicmaps.viz.ExtendedTGPanel.BasicMouseMotionListenerbasicMMLImageimageprotected booleanmaintainMouseOverprotected com.touchgraph.graphlayout.EdgemouseOverEprotected com.touchgraph.graphlayout.NodemouseOverNprotected PointmousePosprotected com.touchgraph.graphlayout.Nodeselect-
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors Constructor Description ExtendedTGPanel(String imageSource)Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddEdge(com.touchgraph.graphlayout.Edge e)com.touchgraph.graphlayout.EdgeaddEdge(com.touchgraph.graphlayout.Node f, com.touchgraph.graphlayout.Node t, int tens)voidaddGraphListener(com.touchgraph.graphlayout.GraphListener gl)com.touchgraph.graphlayout.NodeaddNode()Adds a Node, with its ID and label being the current node count plus 1.voidaddNode(com.touchgraph.graphlayout.Node node)Add the Node node to the visibleLocality, checking for ID uniqueness.com.touchgraph.graphlayout.NodeaddNode(String label)Adds a Node, provided its label.com.touchgraph.graphlayout.NodeaddNode(String id, String label)Adds a Node, provided its ID and label.voidaddPaintListener(com.touchgraph.graphlayout.TGPaintListener pl)voidclearAll()voidclearSelect()voidcollapseNode(com.touchgraph.graphlayout.Node collapseNode)voiddeleteEdge(com.touchgraph.graphlayout.Edge edge)voiddeleteEdge(com.touchgraph.graphlayout.Node from, com.touchgraph.graphlayout.Node to)booleandeleteNode(com.touchgraph.graphlayout.Node node)booleandeleteNodeById(String id)Remove the Node object matching the IDid, returning true if the deletion occurred, false if a Node matching the ID does not exist (or if the ID value was null).intedgeNum()Deprecated.this method has been replaced by the visibleEdgeCount() method.voidexpandNode(com.touchgraph.graphlayout.Node node)voidfastFinishAnimation()com.touchgraph.graphlayout.EdgefindEdge(com.touchgraph.graphlayout.Node f, com.touchgraph.graphlayout.Node t)protected voidfindMouseOver()com.touchgraph.graphlayout.NodefindNode(String id)Return the Node whose ID matches the String id, null if no match is found.com.touchgraph.graphlayout.NodefindNodeLabelContaining(String substring)Return the first Nodes whose label contains the String substring, null if no match is found.CollectionfindNodesByLabel(String label)Return a Collection of all Nodes whose label matches the String label, null if no match is found.voidfireResetEvent()com.touchgraph.graphlayout.TGPanel.AdjustOriginLensgetAdjustOriginLens()IteratorgetAllEdges()Returns an Iterator over all edges in the complete graph.IteratorgetAllNodes()Returns an Iterator over all nodes in the complete graph.com.touchgraph.graphlayout.TGPoint2DgetBottomRightDraw()com.touchgraph.graphlayout.TGPoint2DgetCenter()com.touchgraph.graphlayout.NodegetDragNode()com.touchgraph.graphlayout.TGPoint2DgetDrawCenter()intgetEdgeCount()Returns the current edge count in the complete graph.com.touchgraph.graphlayout.graphelements.ImmutableGraphEltSetgetGES()Return the current visible locality.ImagegetImage(String imageSource)com.touchgraph.graphlayout.EdgegetMouseOverE()com.touchgraph.graphlayout.NodegetMouseOverN()PointgetMousePos()intgetNodeCount()Returns the current node count.com.touchgraph.graphlayout.NodegetSelect()com.touchgraph.graphlayout.TGPanel.SwitchSelectUIgetSwitchSelectUI()com.touchgraph.graphlayout.TGPoint2DgetTopLeftDraw()voidhideEdge(com.touchgraph.graphlayout.Edge hideEdge)voidhideNode(com.touchgraph.graphlayout.Node hideNode)static voidmain(String[] args)voidmultiSelect(com.touchgraph.graphlayout.TGPoint2D from, com.touchgraph.graphlayout.TGPoint2D to)intnodeNum()Deprecated.this method has been replaced by the visibleNodeCount() method.voidpaint(Graphics g)voidprocessGraphMove()voidremoveGraphListener(com.touchgraph.graphlayout.GraphListener gl)voidremovePaintListener(com.touchgraph.graphlayout.TGPaintListener pl)voidrepaintAfterMove()voidresetDamper()Makes the graph mobile, and slowly slows it down.voidselectFirstNode()A convenience method that selects the first node of a graph, so that hiding works.voidsetBackColor(Color color)voidsetDragNode(com.touchgraph.graphlayout.Node node)voidsetGraphEltSet(com.touchgraph.graphlayout.graphelements.GraphEltSet ges)voidsetLensSet(com.touchgraph.graphlayout.TGLensSet lensSet)voidsetLocale(com.touchgraph.graphlayout.Node node, int radius)voidsetLocale(com.touchgraph.graphlayout.Node node, int radius, int maxAddEdgeCount, int maxExpandEdgeCount, boolean unidirectional)voidsetMaintainMouseOver(boolean maintain)voidsetMouseOverE(com.touchgraph.graphlayout.Edge edge)voidsetMouseOverN(com.touchgraph.graphlayout.Node node)voidsetSelect(com.touchgraph.graphlayout.Node node)voidsetTGLayout(com.touchgraph.graphlayout.TGLayout tgl)voidstartDamper()Start and stop the damper.voidstopDamper()voidstopMotion()Gently stops the graph from movingvoidupdate(Graphics g)voidupdateDrawPos(com.touchgraph.graphlayout.Node node)voidupdateDrawPositions()voidupdateGraphSize()voidupdateLocalityFromVisibility()voidupdatePosFromDraw(com.touchgraph.graphlayout.Node node)intvisibleEdgeCount()Return the number of Edges in the Locality.intvisibleNodeCount()Returns the current node count within the VisibleLocality.-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
BACK_COLOR
public static Color BACK_COLOR
-
basicMML
protected net.ontopia.topicmaps.viz.ExtendedTGPanel.BasicMouseMotionListener basicMML
-
mouseOverE
protected com.touchgraph.graphlayout.Edge mouseOverE
-
mouseOverN
protected com.touchgraph.graphlayout.Node mouseOverN
-
maintainMouseOver
protected boolean maintainMouseOver
-
select
protected com.touchgraph.graphlayout.Node select
-
mousePos
protected Point mousePos
-
image
public Image image
-
-
Constructor Detail
-
ExtendedTGPanel
public ExtendedTGPanel(String imageSource)
Default constructor.
-
-
Method Detail
-
setLensSet
public void setLensSet(com.touchgraph.graphlayout.TGLensSet lensSet)
- Overrides:
setLensSetin classcom.touchgraph.graphlayout.TGPanel
-
setTGLayout
public void setTGLayout(com.touchgraph.graphlayout.TGLayout tgl)
- Overrides:
setTGLayoutin classcom.touchgraph.graphlayout.TGPanel
-
setGraphEltSet
public void setGraphEltSet(com.touchgraph.graphlayout.graphelements.GraphEltSet ges)
- Overrides:
setGraphEltSetin classcom.touchgraph.graphlayout.TGPanel
-
getAdjustOriginLens
public com.touchgraph.graphlayout.TGPanel.AdjustOriginLens getAdjustOriginLens()
- Overrides:
getAdjustOriginLensin classcom.touchgraph.graphlayout.TGPanel
-
getSwitchSelectUI
public com.touchgraph.graphlayout.TGPanel.SwitchSelectUI getSwitchSelectUI()
- Overrides:
getSwitchSelectUIin classcom.touchgraph.graphlayout.TGPanel
-
setBackColor
public void setBackColor(Color color)
- Overrides:
setBackColorin classcom.touchgraph.graphlayout.TGPanel
-
getAllNodes
public Iterator getAllNodes()
Returns an Iterator over all nodes in the complete graph.- Overrides:
getAllNodesin classcom.touchgraph.graphlayout.TGPanel
-
getGES
public com.touchgraph.graphlayout.graphelements.ImmutableGraphEltSet getGES()
Return the current visible locality.- Overrides:
getGESin classcom.touchgraph.graphlayout.TGPanel
-
getNodeCount
public int getNodeCount()
Returns the current node count.- Overrides:
getNodeCountin classcom.touchgraph.graphlayout.TGPanel
-
nodeNum
public int nodeNum()
Deprecated.this method has been replaced by the visibleNodeCount() method.Returns the current node count within the VisibleLocality.- Overrides:
nodeNumin classcom.touchgraph.graphlayout.TGPanel
-
visibleNodeCount
public int visibleNodeCount()
Returns the current node count within the VisibleLocality.- Overrides:
visibleNodeCountin classcom.touchgraph.graphlayout.TGPanel
-
findNode
public com.touchgraph.graphlayout.Node findNode(String id)
Return the Node whose ID matches the String id, null if no match is found.- Overrides:
findNodein classcom.touchgraph.graphlayout.TGPanel- Parameters:
id- The ID identifier used as a query.- Returns:
- The Node whose ID matches the provided 'id', null if no match is found.
-
findNodesByLabel
public Collection findNodesByLabel(String label)
Return a Collection of all Nodes whose label matches the String label, null if no match is found.- Overrides:
findNodesByLabelin classcom.touchgraph.graphlayout.TGPanel
-
findNodeLabelContaining
public com.touchgraph.graphlayout.Node findNodeLabelContaining(String substring)
Return the first Nodes whose label contains the String substring, null if no match is found.- Overrides:
findNodeLabelContainingin classcom.touchgraph.graphlayout.TGPanel- Parameters:
substring- The Substring used as a query.
-
addNode
public com.touchgraph.graphlayout.Node addNode() throws com.touchgraph.graphlayout.TGExceptionAdds a Node, with its ID and label being the current node count plus 1.- Overrides:
addNodein classcom.touchgraph.graphlayout.TGPanel- Throws:
com.touchgraph.graphlayout.TGException- See Also:
Node
-
addNode
public com.touchgraph.graphlayout.Node addNode(String label) throws com.touchgraph.graphlayout.TGException
Adds a Node, provided its label. The node is assigned a unique ID.- Overrides:
addNodein classcom.touchgraph.graphlayout.TGPanel- Throws:
com.touchgraph.graphlayout.TGException- See Also:
GraphEltSet
-
addNode
public com.touchgraph.graphlayout.Node addNode(String id, String label) throws com.touchgraph.graphlayout.TGException
Adds a Node, provided its ID and label.- Overrides:
addNodein classcom.touchgraph.graphlayout.TGPanel- Throws:
com.touchgraph.graphlayout.TGException- See Also:
Node
-
addNode
public void addNode(com.touchgraph.graphlayout.Node node) throws com.touchgraph.graphlayout.TGExceptionAdd the Node node to the visibleLocality, checking for ID uniqueness.- Overrides:
addNodein classcom.touchgraph.graphlayout.TGPanel- Throws:
com.touchgraph.graphlayout.TGException
-
deleteNodeById
public boolean deleteNodeById(String id)
Remove the Node object matching the IDid, returning true if the deletion occurred, false if a Node matching the ID does not exist (or if the ID value was null).- Overrides:
deleteNodeByIdin classcom.touchgraph.graphlayout.TGPanel- Parameters:
id- The ID identifier used as a query.- Returns:
- true if the deletion occurred.
-
deleteNode
public boolean deleteNode(com.touchgraph.graphlayout.Node node)
- Overrides:
deleteNodein classcom.touchgraph.graphlayout.TGPanel
-
clearAll
public void clearAll()
- Overrides:
clearAllin classcom.touchgraph.graphlayout.TGPanel
-
getSelect
public com.touchgraph.graphlayout.Node getSelect()
- Overrides:
getSelectin classcom.touchgraph.graphlayout.TGPanel
-
getMouseOverN
public com.touchgraph.graphlayout.Node getMouseOverN()
- Overrides:
getMouseOverNin classcom.touchgraph.graphlayout.TGPanel
-
setMouseOverN
public void setMouseOverN(com.touchgraph.graphlayout.Node node)
- Overrides:
setMouseOverNin classcom.touchgraph.graphlayout.TGPanel
-
getAllEdges
public Iterator getAllEdges()
Returns an Iterator over all edges in the complete graph.- Overrides:
getAllEdgesin classcom.touchgraph.graphlayout.TGPanel
-
deleteEdge
public void deleteEdge(com.touchgraph.graphlayout.Edge edge)
- Overrides:
deleteEdgein classcom.touchgraph.graphlayout.TGPanel
-
deleteEdge
public void deleteEdge(com.touchgraph.graphlayout.Node from, com.touchgraph.graphlayout.Node to)- Overrides:
deleteEdgein classcom.touchgraph.graphlayout.TGPanel
-
getEdgeCount
public int getEdgeCount()
Returns the current edge count in the complete graph.- Overrides:
getEdgeCountin classcom.touchgraph.graphlayout.TGPanel
-
edgeNum
public int edgeNum()
Deprecated.this method has been replaced by the visibleEdgeCount() method.Return the number of Edges in the Locality.- Overrides:
edgeNumin classcom.touchgraph.graphlayout.TGPanel
-
visibleEdgeCount
public int visibleEdgeCount()
Return the number of Edges in the Locality.- Overrides:
visibleEdgeCountin classcom.touchgraph.graphlayout.TGPanel
-
findEdge
public com.touchgraph.graphlayout.Edge findEdge(com.touchgraph.graphlayout.Node f, com.touchgraph.graphlayout.Node t)- Overrides:
findEdgein classcom.touchgraph.graphlayout.TGPanel
-
addEdge
public void addEdge(com.touchgraph.graphlayout.Edge e)
- Overrides:
addEdgein classcom.touchgraph.graphlayout.TGPanel
-
addEdge
public com.touchgraph.graphlayout.Edge addEdge(com.touchgraph.graphlayout.Node f, com.touchgraph.graphlayout.Node t, int tens)- Overrides:
addEdgein classcom.touchgraph.graphlayout.TGPanel
-
getMouseOverE
public com.touchgraph.graphlayout.Edge getMouseOverE()
- Overrides:
getMouseOverEin classcom.touchgraph.graphlayout.TGPanel
-
setMouseOverE
public void setMouseOverE(com.touchgraph.graphlayout.Edge edge)
- Overrides:
setMouseOverEin classcom.touchgraph.graphlayout.TGPanel
-
fireResetEvent
public void fireResetEvent()
- Overrides:
fireResetEventin classcom.touchgraph.graphlayout.TGPanel
-
addGraphListener
public void addGraphListener(com.touchgraph.graphlayout.GraphListener gl)
- Overrides:
addGraphListenerin classcom.touchgraph.graphlayout.TGPanel
-
removeGraphListener
public void removeGraphListener(com.touchgraph.graphlayout.GraphListener gl)
- Overrides:
removeGraphListenerin classcom.touchgraph.graphlayout.TGPanel
-
addPaintListener
public void addPaintListener(com.touchgraph.graphlayout.TGPaintListener pl)
- Overrides:
addPaintListenerin classcom.touchgraph.graphlayout.TGPanel
-
removePaintListener
public void removePaintListener(com.touchgraph.graphlayout.TGPaintListener pl)
- Overrides:
removePaintListenerin classcom.touchgraph.graphlayout.TGPanel
-
setMaintainMouseOver
public void setMaintainMouseOver(boolean maintain)
- Overrides:
setMaintainMouseOverin classcom.touchgraph.graphlayout.TGPanel
-
clearSelect
public void clearSelect()
- Overrides:
clearSelectin classcom.touchgraph.graphlayout.TGPanel
-
selectFirstNode
public void selectFirstNode()
A convenience method that selects the first node of a graph, so that hiding works.- Overrides:
selectFirstNodein classcom.touchgraph.graphlayout.TGPanel
-
setSelect
public void setSelect(com.touchgraph.graphlayout.Node node)
- Overrides:
setSelectin classcom.touchgraph.graphlayout.TGPanel
-
multiSelect
public void multiSelect(com.touchgraph.graphlayout.TGPoint2D from, com.touchgraph.graphlayout.TGPoint2D to)- Overrides:
multiSelectin classcom.touchgraph.graphlayout.TGPanel
-
updateLocalityFromVisibility
public void updateLocalityFromVisibility() throws com.touchgraph.graphlayout.TGException- Overrides:
updateLocalityFromVisibilityin classcom.touchgraph.graphlayout.TGPanel- Throws:
com.touchgraph.graphlayout.TGException
-
setLocale
public void setLocale(com.touchgraph.graphlayout.Node node, int radius, int maxAddEdgeCount, int maxExpandEdgeCount, boolean unidirectional) throws com.touchgraph.graphlayout.TGException- Overrides:
setLocalein classcom.touchgraph.graphlayout.TGPanel- Throws:
com.touchgraph.graphlayout.TGException
-
fastFinishAnimation
public void fastFinishAnimation()
- Overrides:
fastFinishAnimationin classcom.touchgraph.graphlayout.TGPanel
-
setLocale
public void setLocale(com.touchgraph.graphlayout.Node node, int radius) throws com.touchgraph.graphlayout.TGException- Overrides:
setLocalein classcom.touchgraph.graphlayout.TGPanel- Throws:
com.touchgraph.graphlayout.TGException
-
expandNode
public void expandNode(com.touchgraph.graphlayout.Node node)
- Overrides:
expandNodein classcom.touchgraph.graphlayout.TGPanel
-
hideNode
public void hideNode(com.touchgraph.graphlayout.Node hideNode)
- Overrides:
hideNodein classcom.touchgraph.graphlayout.TGPanel
-
collapseNode
public void collapseNode(com.touchgraph.graphlayout.Node collapseNode)
- Overrides:
collapseNodein classcom.touchgraph.graphlayout.TGPanel
-
hideEdge
public void hideEdge(com.touchgraph.graphlayout.Edge hideEdge)
- Overrides:
hideEdgein classcom.touchgraph.graphlayout.TGPanel
-
setDragNode
public void setDragNode(com.touchgraph.graphlayout.Node node)
- Overrides:
setDragNodein classcom.touchgraph.graphlayout.TGPanel
-
getDragNode
public com.touchgraph.graphlayout.Node getDragNode()
- Overrides:
getDragNodein classcom.touchgraph.graphlayout.TGPanel
-
getMousePos
public Point getMousePos()
- Overrides:
getMousePosin classcom.touchgraph.graphlayout.TGPanel
-
startDamper
public void startDamper()
Start and stop the damper. Should be placed in the TGPanel too.- Overrides:
startDamperin classcom.touchgraph.graphlayout.TGPanel
-
stopDamper
public void stopDamper()
- Overrides:
stopDamperin classcom.touchgraph.graphlayout.TGPanel
-
resetDamper
public void resetDamper()
Makes the graph mobile, and slowly slows it down.- Overrides:
resetDamperin classcom.touchgraph.graphlayout.TGPanel
-
stopMotion
public void stopMotion()
Gently stops the graph from moving- Overrides:
stopMotionin classcom.touchgraph.graphlayout.TGPanel
-
findMouseOver
protected void findMouseOver()
- Overrides:
findMouseOverin classcom.touchgraph.graphlayout.TGPanel
-
getTopLeftDraw
public com.touchgraph.graphlayout.TGPoint2D getTopLeftDraw()
- Overrides:
getTopLeftDrawin classcom.touchgraph.graphlayout.TGPanel
-
getBottomRightDraw
public com.touchgraph.graphlayout.TGPoint2D getBottomRightDraw()
- Overrides:
getBottomRightDrawin classcom.touchgraph.graphlayout.TGPanel
-
getCenter
public com.touchgraph.graphlayout.TGPoint2D getCenter()
- Overrides:
getCenterin classcom.touchgraph.graphlayout.TGPanel
-
getDrawCenter
public com.touchgraph.graphlayout.TGPoint2D getDrawCenter()
- Overrides:
getDrawCenterin classcom.touchgraph.graphlayout.TGPanel
-
updateGraphSize
public void updateGraphSize()
- Overrides:
updateGraphSizein classcom.touchgraph.graphlayout.TGPanel
-
processGraphMove
public void processGraphMove()
- Overrides:
processGraphMovein classcom.touchgraph.graphlayout.TGPanel
-
repaintAfterMove
public void repaintAfterMove()
- Overrides:
repaintAfterMovein classcom.touchgraph.graphlayout.TGPanel
-
updateDrawPos
public void updateDrawPos(com.touchgraph.graphlayout.Node node)
- Overrides:
updateDrawPosin classcom.touchgraph.graphlayout.TGPanel
-
updatePosFromDraw
public void updatePosFromDraw(com.touchgraph.graphlayout.Node node)
- Overrides:
updatePosFromDrawin classcom.touchgraph.graphlayout.TGPanel
-
updateDrawPositions
public void updateDrawPositions()
- Overrides:
updateDrawPositionsin classcom.touchgraph.graphlayout.TGPanel
-
paint
public void paint(Graphics g)
- Overrides:
paintin classcom.touchgraph.graphlayout.TGPanel
-
update
public void update(Graphics g)
- Overrides:
updatein classcom.touchgraph.graphlayout.TGPanel
-
main
public static void main(String[] args)
-
-