ccvisu
Class ClusterManager

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by ccvisu.ClusterManager
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class ClusterManager
extends java.awt.Dialog

a GUI to manage the clusters define new, remove, ...

Version:
$Revision: 1.3 $; $Date: 2006/11/25 10:41:07 $
Author:
Damien Zufferey
See Also:
Serialized Form

Nested Class Summary
private  class ClusterManager.AddPatternOk
           
private  class ClusterManager.FilterPatternOk
           
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  java.awt.List allNodes
           
private  java.awt.List cltNodes
           
private  java.awt.Choice color
          to choose the color to display
private  Cluster curClt
          cluster curently edited
private  java.awt.Checkbox defaultVisible
          to choose if the default cluster should be diplayed
private  java.awt.Dialog diag
           
private  java.awt.Dialog diag2
           
private  ScreenDisplay display
          notify when significant changes are done
private  java.awt.Button down
          to change the position of a cluster in the rendering order
private  java.awt.Button editCluster
          to edit a cluster
private  java.awt.Button hideLabel
          to choose if the cluster's nodes should be hidden
private  java.awt.Checkbox infoVisible
          to choose if the cluster's info should be diplayed
private  java.awt.Button load
          load clusters
private  java.awt.List lst
          what display the cluster's names
private  java.awt.Choice mode
           
private  java.awt.Choice mode2
           
private  java.awt.Button newCluster
          to add a new cluster
private  java.awt.Label numberOfNode
          display informations
private  WriterDataGraphicsDISP parent
          where the clusters are stocked
private  java.awt.Label radius
          display informations
private  java.awt.Button removeCluster
          to remove a cluster
private  java.awt.Button save
          save clusters
private static long serialVersionUID
           
private  java.awt.Button showLabel
          to choose if the cluster's nodes should be diplayed
private  java.awt.TextField txt
           
private  java.awt.Button up
          to change the position of a cluster in the rendering order
private  java.awt.Checkbox visible
          to choose if the cluster should be diplayed
 
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
ClusterManager(ScreenDisplay disp, WriterDataGraphicsDISP pparent)
          Constructor
 
Method Summary
private  void editDialog(Cluster clt)
          create a dialog to edit the cluster
private  Cluster getClusterFromListIndex(int index)
          return a cluster in function of an integer
private  void intputDialog()
          create a dialog that asks the user for a name and create a new cluster
private  void loadClt()
          Create a fileDialog and try to load the info from the selected file Callback method
 void refresh()
          refresh the list of clusters and closes the dialogs (edit,new,...) method invoqued by ScreenDisplay
private  void refreshCltNodes()
          refresh the list that contains the nodes of the current cluster
private  void refreshInfo()
          refresh the informations of the selected cluster
private  void refreshList()
          refresh the list that contains the clusters WARNING: the order of the list is the inverse of the groups order
private  void saveClt()
          Create a fileDialog and save the info in the selected file Callback method
 
Methods inherited from class java.awt.Dialog
addNotify, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

lst

private java.awt.List lst
what display the cluster's names


color

private java.awt.Choice color
to choose the color to display


visible

private java.awt.Checkbox visible
to choose if the cluster should be diplayed


defaultVisible

private java.awt.Checkbox defaultVisible
to choose if the default cluster should be diplayed


infoVisible

private java.awt.Checkbox infoVisible
to choose if the cluster's info should be diplayed


showLabel

private java.awt.Button showLabel
to choose if the cluster's nodes should be diplayed


hideLabel

private java.awt.Button hideLabel
to choose if the cluster's nodes should be hidden


numberOfNode

private java.awt.Label numberOfNode
display informations


radius

private java.awt.Label radius
display informations


save

private java.awt.Button save
save clusters


load

private java.awt.Button load
load clusters


newCluster

private java.awt.Button newCluster
to add a new cluster


editCluster

private java.awt.Button editCluster
to edit a cluster


removeCluster

private java.awt.Button removeCluster
to remove a cluster


up

private java.awt.Button up
to change the position of a cluster in the rendering order


down

private java.awt.Button down
to change the position of a cluster in the rendering order


diag

private java.awt.Dialog diag

diag2

private java.awt.Dialog diag2

curClt

private Cluster curClt
cluster curently edited


txt

private java.awt.TextField txt

cltNodes

private java.awt.List cltNodes

allNodes

private java.awt.List allNodes

mode

private java.awt.Choice mode

mode2

private java.awt.Choice mode2

parent

private WriterDataGraphicsDISP parent
where the clusters are stocked


display

private ScreenDisplay display
notify when significant changes are done

Constructor Detail

ClusterManager

public ClusterManager(ScreenDisplay disp,
                      WriterDataGraphicsDISP pparent)
Constructor

Parameters:
pparent - - WriterDataGraphicsDISP containing the clusters
disp - - a GraphEventListener charged of the rendering
Method Detail

refreshList

private void refreshList()
refresh the list that contains the clusters WARNING: the order of the list is the inverse of the groups order


getClusterFromListIndex

private Cluster getClusterFromListIndex(int index)
return a cluster in function of an integer

Parameters:
index - the index of the selected list item
Returns:
the selected cluster

refreshCltNodes

private void refreshCltNodes()
refresh the list that contains the nodes of the current cluster


intputDialog

private void intputDialog()
create a dialog that asks the user for a name and create a new cluster


editDialog

private void editDialog(Cluster clt)
create a dialog to edit the cluster

Parameters:
clt - - the cluster to edit

refresh

public void refresh()
refresh the list of clusters and closes the dialogs (edit,new,...) method invoqued by ScreenDisplay


loadClt

private void loadClt()
Create a fileDialog and try to load the info from the selected file Callback method


saveClt

private void saveClt()
Create a fileDialog and save the info in the selected file Callback method


refreshInfo

private void refreshInfo()
refresh the informations of the selected cluster