info.aduna.clustermap.panel
Class GraphPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by info.aduna.clustermap.panel.GraphPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class GraphPanel
extends JPanel

GraphPanel is a JPanel derivative that displays the contents of a ClusterMap. GraphPanel optionally renders the transition from one cluster graph to the other as an animation.

See Also:
Serialized Form

Nested Class Summary
static class GraphPanel.SelectionMode
           
 
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
static String ALLOWED_ANIMATION_DURATION_PROPERTY
           
static String ANIMATION_ENABLED_PROPERTY
           
static long DEFAULT_ALLOWED_ANIMATION_DURATION
           
static boolean DEFAULT_ANIMATION_ENABLED
           
static GraphPanel.SelectionMode DEFAULT_VERTEX_SELECTION_MODE
           
static String FRAME_RATE_PROPERTY
           
static String VERTEX_SELECTION_MODE_PROPERTY
           
 
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.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
GraphPanel()
           
GraphPanel(ClusterMap map)
           
 
Method Summary
 void dispose()
           
 long getAllowedAnimationDuration()
           
 AnimationHandler getAnimationHandler()
           
 ClusterMap getClusterMap()
           
 int getFrameRate()
           
 Dimension getPreferredSize()
           
 ArrayList<VertexRenderer> getPressedRenderers()
           
 RequestHandler getRequestHandler()
           
 GraphPanel.SelectionMode getVertexSelectionMode()
           
 boolean isAnimationEnabled()
           
 boolean isIgnoringMouseEvents()
           
 boolean isOptimizedDrawingEnabled()
           
 void paintComponent(Graphics g)
           
 void paintGraph(Graphics2D g, boolean determineProgress)
           
 Classification resolveClassification(int x, int y)
          Returns the Classification at the specified (x, y) coordinate.
 Cluster resolveCluster(int x, int y)
          Returns the Cluster at the specified (x, y) coordinate.
 Object resolveObject(int x, int y)
          Returns the Object at the specified (x, y) coordinate.
 void setAllowedAnimationDuration(long duration)
           
 void setAnimationEnabled(boolean enabled)
           
 void setFrameRate(int frameRate)
           
 void setIgnoringMouseEvents(boolean ignore)
          Temporarily disables processing mouse events.
 void setVertexSelectionMode(GraphPanel.SelectionMode mode)
           
 
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, update
 
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, 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, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERTEX_SELECTION_MODE_PROPERTY

public static final String VERTEX_SELECTION_MODE_PROPERTY
See Also:
Constant Field Values

ANIMATION_ENABLED_PROPERTY

public static final String ANIMATION_ENABLED_PROPERTY
See Also:
Constant Field Values

ALLOWED_ANIMATION_DURATION_PROPERTY

public static final String ALLOWED_ANIMATION_DURATION_PROPERTY
See Also:
Constant Field Values

FRAME_RATE_PROPERTY

public static final String FRAME_RATE_PROPERTY
See Also:
Constant Field Values

DEFAULT_ANIMATION_ENABLED

public static final boolean DEFAULT_ANIMATION_ENABLED
See Also:
Constant Field Values

DEFAULT_ALLOWED_ANIMATION_DURATION

public static final long DEFAULT_ALLOWED_ANIMATION_DURATION
See Also:
Constant Field Values

DEFAULT_VERTEX_SELECTION_MODE

public static final GraphPanel.SelectionMode DEFAULT_VERTEX_SELECTION_MODE
Constructor Detail

GraphPanel

public GraphPanel()

GraphPanel

public GraphPanel(ClusterMap map)
Method Detail

getClusterMap

public ClusterMap getClusterMap()

getRequestHandler

public RequestHandler getRequestHandler()

dispose

public void dispose()

setVertexSelectionMode

public void setVertexSelectionMode(GraphPanel.SelectionMode mode)

getVertexSelectionMode

public GraphPanel.SelectionMode getVertexSelectionMode()

setIgnoringMouseEvents

public void setIgnoringMouseEvents(boolean ignore)
Temporarily disables processing mouse events. Only meant to be used by Cluster Map-internal classes. No events, repaints etc. are being sent when invoking this method.


isIgnoringMouseEvents

public boolean isIgnoringMouseEvents()

setAnimationEnabled

public void setAnimationEnabled(boolean enabled)

isAnimationEnabled

public boolean isAnimationEnabled()

setFrameRate

public void setFrameRate(int frameRate)
                  throws IllegalArgumentException
Throws:
IllegalArgumentException

getFrameRate

public int getFrameRate()

setAllowedAnimationDuration

public void setAllowedAnimationDuration(long duration)
                                 throws IllegalArgumentException
Throws:
IllegalArgumentException

getAllowedAnimationDuration

public long getAllowedAnimationDuration()

getAnimationHandler

public AnimationHandler getAnimationHandler()

getPressedRenderers

public ArrayList<VertexRenderer> getPressedRenderers()

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
Overrides:
isOptimizedDrawingEnabled in class JComponent

resolveObject

public Object resolveObject(int x,
                            int y)
Returns the Object at the specified (x, y) coordinate. This applies only to Objects contained in a Cluster. Returns null in case there is no Object displayed at that location.


resolveClassification

public Classification resolveClassification(int x,
                                            int y)
Returns the Classification at the specified (x, y) coordinate. Returns null in case there is no Classification displayed at that location.


resolveCluster

public Cluster resolveCluster(int x,
                              int y)
Returns the Cluster at the specified (x, y) coordinate. Returns null in case there is no Cluster displayed at that location.


getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class JComponent

paintComponent

public void paintComponent(Graphics g)
Overrides:
paintComponent in class JComponent

paintGraph

public void paintGraph(Graphics2D g,
                       boolean determineProgress)


Copyright © 1997-2008 Aduna. All Rights Reserved.