de.uni_leipzig.cvk.visual
Class AggregatePanel

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 de.uni_leipzig.cvk.visual.AggregatePanel
All Implemented Interfaces:
ClusterTableSettings, GraphReaderSettings, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible

public class AggregatePanel
extends javax.swing.JPanel
implements java.util.Observer, GraphReaderSettings, ClusterTableSettings

Is a JPanel class and uses a Visualization instance m_vis and a Display instance m_display. It shows a visualization with the help of a ForceDirectedLayout instance m_forceLayout and a AggregateLayout instance m_aggregateLayout. Builds a JForcePanel gui for force configurations and a Display overview instance with the getForceTab() method.

The addGraph(Graph) method adds a new Graph instance and updates all necessary data. The addAggregate(Table) method adds cluster data to a AggregateTable instance m_aTable, the Table parameter instance should have a column with ClusterTableSettings.CLUSTER_COLUMN_NAME header field and ClusterTableSettings.CLUSTER_COLUMN_NAME_TYPE data type, which contains the cluster data.

The parameters of update(Observable, Object) method are a Model instance as Observable object and arguments as String objects from the Model instance to update used data.

Author:
rspeck
See Also:
Serialized Form
 

Nested Class Summary
protected static class AggregatePanel.Actions
          Action group names for Visualization.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String AGGR_DECORATORS
          decorator id
static java.lang.String AGGRS
          prefuse default id
protected static java.lang.String AGGRS_ID
          visual aggr id
protected  java.awt.Color BACKGROUND
           
protected  int DEFAULT_HOPS
          default filter values
static java.lang.String EDGES
          prefuse default id
static java.lang.String GRAPH
          prefuse default id
 java.lang.String INIT_ID
           
protected  AggregateLayout m_aggregateLayout
          Layout for aggregates
protected  prefuse.Display m_display
          Display instance
protected  prefuse.Visualization m_vis
          Visualization instance
protected  int MAX_HOPS
          default filter values
static java.lang.String NODES
          prefuse default id
 
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 de.uni_leipzig.cvk.data.GraphReaderSettings
EDGE_WEIGHT, MAX_EDGE_WEIGHT, NODE_NAME
 
Fields inherited from interface de.uni_leipzig.cvk.data.cluster.ClusterTableSettings
CLUSTER_COLUMN_ID, CLUSTER_COLUMN_ID_TYPE, CLUSTER_COLUMN_NAME, CLUSTER_COLUMN_NAME_TYPE, CLUSTER_COLUMN_SIZE, CLUSTER_COLUMN_SIZE_TYPE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AggregatePanel(int width, int height)
          Constructs a new AggregatePanel.
 
Method Summary
 void addAggregate(prefuse.data.Table clusterTable)
          Adds the sorted data of column ClusterTableSettings.CLUSTER_COLUMN_NAME from clusterTable parameter to the AggregateTable instance m_aTable, sets a Decorator with the setDecorators() method.
protected  void addGraph(prefuse.data.Graph graph)
          Adds a Graph, refreshes search items and removes aggregates.
 prefuse.Display getDisplay()
          Gets the Display to export an image in File.
 javax.swing.JPanel getForceTab()
          Builds a JPanel with elements for force settings, an overview and a distance filter.
protected  void init()
          This is a template method and used by constructors to initializes some data.
protected  void setActions()
          Initializes colors, force, ...
protected  void setDecorators()
          Refreshes AGGR_DECORATORS for every new AGGRS
protected  void setListeners()
          Adds ControlAdapter instances to m_display
protected  void setRendererFactory()
          Sets renderers for NODES,EDGES, AGGRS and AGGR_DECORATORS group.
 void setSeedLabel(javax.swing.JLabel seedLabel)
          This method is used to set a JLabel instance for clicked nodes.
 void update(java.util.Observable model, java.lang.Object arg)
          This method updates this Observer by arguments and data from Model instance.
 
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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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, 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

AGGR_DECORATORS

public static final java.lang.String AGGR_DECORATORS
decorator id

See Also:
Constant Field Values

AGGRS

public static final java.lang.String AGGRS
prefuse default id

See Also:
Constant Field Values

AGGRS_ID

protected static final java.lang.String AGGRS_ID
visual aggr id

See Also:
Constant Field Values

BACKGROUND

protected java.awt.Color BACKGROUND

DEFAULT_HOPS

protected int DEFAULT_HOPS
default filter values


EDGES

public static final java.lang.String EDGES
prefuse default id

See Also:
Constant Field Values

GRAPH

public static final java.lang.String GRAPH
prefuse default id

See Also:
Constant Field Values

INIT_ID

public final java.lang.String INIT_ID
See Also:
Constant Field Values

m_aggregateLayout

protected AggregateLayout m_aggregateLayout
Layout for aggregates


m_display

protected prefuse.Display m_display
Display instance


m_vis

protected prefuse.Visualization m_vis
Visualization instance


MAX_HOPS

protected int MAX_HOPS
default filter values


NODES

public static final java.lang.String NODES
prefuse default id

See Also:
Constant Field Values
Constructor Detail

AggregatePanel

public AggregatePanel(int width,
                      int height)
Constructs a new AggregatePanel. Initializes the Visualization, Display, AggregateTable and AggregateLayout. Calls the init() method.

Method Detail

addAggregate

public void addAggregate(prefuse.data.Table clusterTable)
Adds the sorted data of column ClusterTableSettings.CLUSTER_COLUMN_NAME from clusterTable parameter to the AggregateTable instance m_aTable, sets a Decorator with the setDecorators() method.

Parameters:
clusterTable -

addGraph

protected void addGraph(prefuse.data.Graph graph)
Adds a Graph, refreshes search items and removes aggregates.

Parameters:
graph -

getDisplay

public prefuse.Display getDisplay()
Gets the Display to export an image in File.


getForceTab

public javax.swing.JPanel getForceTab()
Builds a JPanel with elements for force settings, an overview and a distance filter.

Returns:
The force JPanel.

init

protected final void init()
This is a template method and used by constructors to initializes some data. The protected methods setRendererFactory(), setActions(), setListeners() are called in this order, feel free to override these.


setActions

protected void setActions()
Initializes colors, force, ... Actions.


setDecorators

protected void setDecorators()
Refreshes AGGR_DECORATORS for every new AGGRS


setListeners

protected void setListeners()
Adds ControlAdapter instances to m_display


setRendererFactory

protected void setRendererFactory()
Sets renderers for NODES,EDGES, AGGRS and AGGR_DECORATORS group.


setSeedLabel

public void setSeedLabel(javax.swing.JLabel seedLabel)
This method is used to set a JLabel instance for clicked nodes.


update

public void update(java.util.Observable model,
                   java.lang.Object arg)
This method updates this Observer by arguments and data from Model instance.

Specified by:
update in interface java.util.Observer