EVolve.visualization
Class Visualization

java.lang.Object
  |
  +--EVolve.visualization.Visualization
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
TableViz, XYVisualization

public abstract class Visualization
extends java.lang.Object
implements java.lang.Cloneable


Field Summary
protected  javax.swing.JComboBox[] comboDimension
           
protected  javax.swing.JComboBox comboSubject
           
protected  DataFilter[][][] dataFilter
           
protected  int dataSourceId
           
protected  VisualizationDefinition definition
           
protected  javax.swing.JDialog dialog
           
protected  Dimension[] dimension
           
protected  ElementDefinition[] elementDefinition
           
protected  boolean freezed
           
protected  javax.swing.JMenuItem[][] itemSort
           
protected  int mouseX
           
protected  int mouseY
           
protected  java.lang.String name
           
protected  java.awt.Component panel
           
protected  javax.swing.JPanel panelConfiguration
           
protected  javax.swing.JPopupMenu popup
           
static int SELECT_ALL_ENTITIES
           
static int SELECT_ALL_X_AXIS
           
static int SELECT_ALL_Y_AXIS
           
static int SELECT_OCCURRED_ENTITIES
           
static int SELECT_TIME_FRAME
           
static int SELECT_X_AXIS
           
static int SELECT_Y_AXIS
           
protected  ElementDefinition subjectDefinition
           
protected  javax.swing.JTextField textName
           
protected  Window window
           
 
Constructor Summary
Visualization()
           
 
Method Summary
protected  void addPopupTrigger(java.awt.Component component)
           
 void autoSave(java.lang.String path, java.lang.String dataFn)
           
 void autoUpdateConfiguration(java.util.HashMap config)
          following are all interfaces needed for predefined viz
 void cleanup()
           
 java.lang.Object clone()
           
 void configure()
          Configures the visualization.
protected  javax.swing.JPanel createConfigurationPanel()
          Gets the additional configuration panel.
protected  void createDialog()
          Creates the configuration dialog.
abstract  Dimension[] createDimension()
          Creates the dimensions.
protected  void createMenu()
           
protected  java.util.ArrayList createOptionalMenu()
           
protected abstract  java.awt.Component createPanel()
          Creates the panel.
abstract  javax.swing.JMenuItem[] createSelectionMenuItem()
          Creates available selection menu items.
protected  void dialogApply()
          Button "Apply" is clicked.
protected  void dialogCancel()
          Button "Cancel" is clicked.
 void enableSortMenu()
           
 java.util.HashMap getCurrentConfigure()
           
 int getDataSourceId()
           
 VisualizationDefinition getDefinition()
           
 Dimension[] getDimension()
           
 VisualizationFactory getFactory()
           
 AutoImage getImage()
           
abstract  ReferenceDimension getLinkableDimension(int dim)
          following methods are used in unify/overlap viz
 java.lang.String getName()
           
 java.awt.Component getPanel()
          Gets the panel of the visualization.
 ElementDefinition getSubjectDefinition()
          Gets the definition of the subject.
 int getVisualizationID()
           
 Window getWindow()
           
 long getxMax()
           
 boolean isFreezed()
           
abstract  void makeSelection()
          according to user selectiong, get a data subset
abstract  void preVisualize()
          Gets ready for receiving data.
protected abstract  void receiveElement(Element element)
          Receives data.
protected  void reset()
           
 void save()
          Save visualizations as disk file
 void selectComparator(java.awt.event.ActionEvent e)
           
 void setDataSourceId(int dataSourceId)
           
 void setDefinition(VisualizationDefinition definition)
          Sets the definition of the visualization, called by visualization manager after the visualization is created.
 void setFactory(VisualizationFactory factory)
           
 void setImage(AutoImage image)
           
 void setName(java.lang.String name)
          Sets the name of the visualization.
 void setWindow(Window window)
          Sets the window of the visualization.
abstract  void sort()
          sorting the visualization with selected comparator
protected  int switchOption(boolean turn_on, int option, int add_on_option)
           
protected  void updateComboDimension()
          Updates the dimension combo-boxes.
protected  void updateComboSubject()
          Updates the subject combo-box.
protected abstract  void updateConfiguration()
          Updates the configuration.
 void updateMenu()
           
abstract  void visualize()
          Visualizes after receiving data.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECT_TIME_FRAME

public static final int SELECT_TIME_FRAME
See Also:
Constant Field Values

SELECT_OCCURRED_ENTITIES

public static final int SELECT_OCCURRED_ENTITIES
See Also:
Constant Field Values

SELECT_ALL_ENTITIES

public static final int SELECT_ALL_ENTITIES
See Also:
Constant Field Values

SELECT_X_AXIS

public static final int SELECT_X_AXIS
See Also:
Constant Field Values

SELECT_Y_AXIS

public static final int SELECT_Y_AXIS
See Also:
Constant Field Values

SELECT_ALL_X_AXIS

public static final int SELECT_ALL_X_AXIS
See Also:
Constant Field Values

SELECT_ALL_Y_AXIS

public static final int SELECT_ALL_Y_AXIS
See Also:
Constant Field Values

name

protected java.lang.String name

window

protected Window window

definition

protected VisualizationDefinition definition

subjectDefinition

protected ElementDefinition subjectDefinition

dimension

protected Dimension[] dimension

panel

protected java.awt.Component panel

dialog

protected javax.swing.JDialog dialog

panelConfiguration

protected javax.swing.JPanel panelConfiguration

comboSubject

protected javax.swing.JComboBox comboSubject

comboDimension

protected javax.swing.JComboBox[] comboDimension

textName

protected javax.swing.JTextField textName

popup

protected javax.swing.JPopupMenu popup

itemSort

protected javax.swing.JMenuItem[][] itemSort

dataSourceId

protected int dataSourceId

elementDefinition

protected ElementDefinition[] elementDefinition

dataFilter

protected DataFilter[][][] dataFilter

mouseX

protected int mouseX

mouseY

protected int mouseY

freezed

protected boolean freezed
Constructor Detail

Visualization

public Visualization()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)
Sets the name of the visualization.

Parameters:
name - name of the visualization

setWindow

public void setWindow(Window window)
Sets the window of the visualization.

Parameters:
window - window of the visualization

getPanel

public java.awt.Component getPanel()
Gets the panel of the visualization.

Returns:
panel of the visualization

createConfigurationPanel

protected javax.swing.JPanel createConfigurationPanel()
Gets the additional configuration panel.

Returns:
the additional configuration panel, null if not necessary

createMenu

protected void createMenu()

setDefinition

public void setDefinition(VisualizationDefinition definition)
Sets the definition of the visualization, called by visualization manager after the visualization is created.

Parameters:
definition - definition of the visualization

getSubjectDefinition

public ElementDefinition getSubjectDefinition()
Gets the definition of the subject.

Returns:
definition of the subject

configure

public void configure()
Configures the visualization.


save

public void save()
Save visualizations as disk file


createDialog

protected void createDialog()
Creates the configuration dialog.


updateComboSubject

protected void updateComboSubject()
Updates the subject combo-box.


updateComboDimension

protected void updateComboDimension()
Updates the dimension combo-boxes.


dialogApply

protected void dialogApply()
Button "Apply" is clicked.


dialogCancel

protected void dialogCancel()
Button "Cancel" is clicked.


updateMenu

public void updateMenu()

createOptionalMenu

protected java.util.ArrayList createOptionalMenu()

selectComparator

public void selectComparator(java.awt.event.ActionEvent e)

addPopupTrigger

protected void addPopupTrigger(java.awt.Component component)

enableSortMenu

public void enableSortMenu()

createDimension

public abstract Dimension[] createDimension()
Creates the dimensions.

Returns:
the dimensions

createSelectionMenuItem

public abstract javax.swing.JMenuItem[] createSelectionMenuItem()
Creates available selection menu items.

Returns:
the array of menu items

createPanel

protected abstract java.awt.Component createPanel()
Creates the panel.

Returns:
the panel

updateConfiguration

protected abstract void updateConfiguration()
Updates the configuration.


preVisualize

public abstract void preVisualize()
Gets ready for receiving data.


receiveElement

protected abstract void receiveElement(Element element)
Receives data.


visualize

public abstract void visualize()
Visualizes after receiving data.


sort

public abstract void sort()
sorting the visualization with selected comparator


makeSelection

public abstract void makeSelection()
according to user selectiong, get a data subset


getCurrentConfigure

public java.util.HashMap getCurrentConfigure()
Returns:
a Hash map contains all current visualization's configure

autoUpdateConfiguration

public void autoUpdateConfiguration(java.util.HashMap config)
following are all interfaces needed for predefined viz


getWindow

public Window getWindow()

setFactory

public void setFactory(VisualizationFactory factory)

getFactory

public VisualizationFactory getFactory()

autoSave

public void autoSave(java.lang.String path,
                     java.lang.String dataFn)

getLinkableDimension

public abstract ReferenceDimension getLinkableDimension(int dim)
following methods are used in unify/overlap viz


getVisualizationID

public int getVisualizationID()

getDimension

public Dimension[] getDimension()

getDefinition

public VisualizationDefinition getDefinition()

getxMax

public long getxMax()

getImage

public AutoImage getImage()

setImage

public void setImage(AutoImage image)

cleanup

public void cleanup()

switchOption

protected int switchOption(boolean turn_on,
                           int option,
                           int add_on_option)

setDataSourceId

public void setDataSourceId(int dataSourceId)

getDataSourceId

public int getDataSourceId()

reset

protected void reset()

isFreezed

public boolean isFreezed()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object