|
||||||||||
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.umd.cs.piccolo.PCanvas
gdl.base.GraphExplorerCanvas
public class GraphExplorerCanvas
A full-features PCanvas that is able to display a graph and calculate the current position of the nodes on the canvas
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
---|
Fields inherited from class edu.umd.cs.piccolo.PCanvas |
---|
CURRENT_ZCANVAS, INTERATING_CHANGED_NOTIFICATION |
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 | |
---|---|
GraphExplorerCanvas(ParsingManager p,
GraphExplorerGui gui,
java.lang.Object curColorConfigSet,
java.lang.Object curSizeConfigSet)
|
Method Summary | |
---|---|
int[] |
calcPositionFromPolar(float r,
float phi)
|
java.lang.String |
getNodeContent(java.lang.String id)
|
int |
getRingOffset()
get the current ring offset value |
void |
hideInfoBox()
hides the infobox panel |
void |
initialize()
initialise all layers and functions of the canvas as well as several event handlers |
void |
initNodeMover()
initialise the nodemover with several class intern parameters like the layers and the node IDs |
void |
move()
invokes the node Mover that moves each node from its current position on the canvas to the position that is stored in its nextPosition member variable |
void |
paint(int _ringOffSet,
boolean justRingOffsetChanged)
redraws the graph on the GraphCanvas, including to reallocate the node positions. |
void |
refresh()
|
void |
sendClosingMessageToGui(boolean isHidden)
invokes the updateInfoBoxMenuItem functions of the GraphExplorerCanvas the gui is in in oder to enable or disable the gui main menu item "show/Hide Infobox" |
void |
setAnimationSpeed(int animationSpeed)
|
void |
setCanvasColor(java.awt.Color newColor)
|
void |
setCurColorConfigSet(SwitchConfigSet curSet)
|
void |
setCurSizeConfigSet(java.lang.Object curSet)
|
void |
setFishEyeFactor(int fishEyeFactor)
The fisheye factor has influence on whether to decrease the ring offset from the inner to the outer, or not. 0 means no fisheye effect, 100 causes a strong fisheye effect. this function can be used by a slider in the gui. |
void |
setGuiSettingsScaleIcons(boolean guiSettingsScaleIcons)
|
void |
setGuiSettingUseIcons(boolean guiSettingUseIcons)
|
void |
setNodeSizeFactor(int nodeSizeFactor)
The node size factor is a multiplier for the node size. the original node sizes are multiplied by this factor. |
void |
setNodeToFocus()
reset the current focus node. |
void |
setNodeToFocus(java.lang.String id)
sets a node to the focus of the graph, including to invoke the nodeMover |
void |
setRingColor(java.awt.Color newColor)
|
void |
showInfoBox()
shows the infobox panel |
void |
updateCrossRefBooleanFlag(boolean value)
|
void |
updateCrossRefTransparancy(float newValue)
set the transparance of cross references |
Methods inherited from class edu.umd.cs.piccolo.PCanvas |
---|
addInputEventListener, createTimer, getAnimating, getCamera, getInteracting, getLayer, getPanEventHandler, getRoot, getZoomEventHandler, paintComponent, paintImmediately, popCursor, pushCursor, removeInputEventListener, repaint, setAnimatingRenderQuality, setBounds, setCamera, setDefaultRenderQuality, setEnabled, setInteracting, setInteractingRenderQuality, setPanEventHandler, setZoomEventHandler |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, 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 GraphExplorerCanvas(ParsingManager p, GraphExplorerGui gui, java.lang.Object curColorConfigSet, java.lang.Object curSizeConfigSet)
p
- the ParsingManager holding several information retreived during the loading of the input sourcegui
- the gui the canvas is incurColorConfigSet
- the color config set to use on initialisationcurSizeConfigSet
- the size config set to use on initialisationMethod Detail |
---|
public void setCanvasColor(java.awt.Color newColor)
newColor
- the new java.awt.Color as the bg color of the canvaspublic void setRingColor(java.awt.Color newColor)
newColor
- the ring color used for the graph ringspublic void initialize()
public void sendClosingMessageToGui(boolean isHidden)
isHidden
- public void hideInfoBox()
public void showInfoBox()
public void paint(int _ringOffSet, boolean justRingOffsetChanged)
_ringOffSet
- the current offset between the rings of the nodejustRingOffsetChanged
- true if no movement is necessary, false, if the nodes should afterward be moved to their new position by the NodeMoverpublic int[] calcPositionFromPolar(float r, float phi)
r
- a poloar coordinate radius valuephi
- a poloar coordinate degree value
public void move()
public void setNodeToFocus(java.lang.String id)
id
- the id of the node that should be set to the focuspublic void setNodeToFocus()
public java.lang.String getNodeContent(java.lang.String id)
id
- the id of the node to obtain the content
public int getRingOffset()
public void initNodeMover()
public void setCurColorConfigSet(SwitchConfigSet curSet)
curSet
- a SwitchConfigSet that determines the current node size evaluationpublic void setCurSizeConfigSet(java.lang.Object curSet)
curSet
- either a RangeConfigSet or a SwitchConfigSet that determines the evaluation and calcuation of node sizespublic void updateCrossRefTransparancy(float newValue)
newValue
- the parameter of the cross referencespublic void updateCrossRefBooleanFlag(boolean value)
value
- true if cross references should be drawn, false if notpublic void setAnimationSpeed(int animationSpeed)
animationSpeed
- the new animation speedpublic void setFishEyeFactor(int fishEyeFactor)
fishEyeFactor
- public void setNodeSizeFactor(int nodeSizeFactor)
nodeSizeFactor
- the new node size factor as an interger between 0 and 100;public void setGuiSettingsScaleIcons(boolean guiSettingsScaleIcons)
public void setGuiSettingUseIcons(boolean guiSettingUseIcons)
public void refresh()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |