de.cau.cs.kieler.kvid.visual
Class GmfDrawer

java.lang.Object
  extended by de.cau.cs.kieler.kvid.visual.GmfDrawer
All Implemented Interfaces:
IDataListener, IDrawer

public final class GmfDrawer
extends Object
implements IDrawer, IDataListener

Drawer class implementation for GMF.

Rating red

Method Summary
 Point centerFigureOnPoint(Point thepoint, IFigure thefigure)
          Use this to center a figure on a certain Point.
 void clearDrawing()
          Removes KViD drawings from the UI.
 void draw(HashMap<KvidUri,DataObject> dataSet)
          Draws the given data to the UI.
static GmfDrawer getInstance()
          Gives the single instance of the GmfDrawer.
 void triggerDataChanged(boolean isHistoryValue)
          Method to be called when the data relvant ot the listener is changed.
 void triggerWrapup()
          Method to be called when the visualization is finished.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GmfDrawer getInstance()
Gives the single instance of the GmfDrawer.

Returns:
The single instance of the GmfDrawer

draw

public void draw(HashMap<KvidUri,DataObject> dataSet)
Draws the given data to the UI.

Specified by:
draw in interface IDrawer
Parameters:
dataSet - The data to visualize on the UI

clearDrawing

public void clearDrawing()
Removes KViD drawings from the UI.

Specified by:
clearDrawing in interface IDrawer

centerFigureOnPoint

public Point centerFigureOnPoint(Point thepoint,
                                 IFigure thefigure)
Use this to center a figure on a certain Point. Otherwise, the figure will be placed with it's upper left corner on the Point.

Parameters:
thepoint - The Point to center on
thefigure - The IFigure to center
Returns:
A Point where to put the IFigure so that the figure is centered on the given point

triggerDataChanged

public void triggerDataChanged(boolean isHistoryValue)
Method to be called when the data relvant ot the listener is changed.

Specified by:
triggerDataChanged in interface IDataListener
Parameters:
isHistoryValue - Shows whether this is a new value or we a browsing in the past

triggerWrapup

public void triggerWrapup()
Method to be called when the visualization is finished.

Specified by:
triggerWrapup in interface IDataListener