zugvis
Class LineRenderer

java.lang.Object
  extended by prefuse.render.AbstractShapeRenderer
      extended by zugvis.LineRenderer
All Implemented Interfaces:
prefuse.render.Renderer

public class LineRenderer
extends prefuse.render.AbstractShapeRenderer

This class is responsible for the rendering of visualitems that belong to the connections Table. For each item a line is drawn and at the start and endpoint of the line a small circle is placed indicating that the train stops at the current station. The X-axis represents the time and the Y-axis represents the trainstations.


Field Summary
 
Fields inherited from class prefuse.render.AbstractShapeRenderer
m_manageBounds, m_transform, RENDER_TYPE_DRAW, RENDER_TYPE_DRAW_AND_FILL, RENDER_TYPE_FILL, RENDER_TYPE_NONE
 
Fields inherited from interface prefuse.render.Renderer
DEFAULT_GRAPHICS
 
Constructor Summary
LineRenderer(java.lang.String m_group, prefuse.Visualization vis)
           
 
Method Summary
protected  void drawShape(java.awt.Graphics2D g, prefuse.visual.VisualItem item, java.awt.Shape shape)
          This method draws a given visualitem into a Graphics2D context.
 void drawStations(boolean draw)
          this sets the drawstations flag.
protected  java.awt.Shape getRawShape(prefuse.visual.VisualItem item)
          return the line in the x,y coordinate system of a given visualitem
 java.awt.Shape getShape(prefuse.visual.VisualItem item)
          returns the Boundingbox of a given VisualItem
 java.awt.Shape getTrainLine(prefuse.visual.VisualItem item)
          return the line in the x,y coordinate system of a given visualitem
 void setTimeScale(at.ac.tuwien.cs.timevis.FisheyeTimeScale ts)
           
 
Methods inherited from class prefuse.render.AbstractShapeRenderer
getRenderType, getStroke, getTransform, locatePoint, render, setBounds, setManageBounds, setRenderType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineRenderer

public LineRenderer(java.lang.String m_group,
                    prefuse.Visualization vis)
Method Detail

setTimeScale

public void setTimeScale(at.ac.tuwien.cs.timevis.FisheyeTimeScale ts)

drawStations

public void drawStations(boolean draw)
this sets the drawstations flag. If true stations of a connection will be drawn as small white lines.


getShape

public java.awt.Shape getShape(prefuse.visual.VisualItem item)
returns the Boundingbox of a given VisualItem

Overrides:
getShape in class prefuse.render.AbstractShapeRenderer

getTrainLine

public java.awt.Shape getTrainLine(prefuse.visual.VisualItem item)
return the line in the x,y coordinate system of a given visualitem


getRawShape

protected java.awt.Shape getRawShape(prefuse.visual.VisualItem item)
return the line in the x,y coordinate system of a given visualitem

Specified by:
getRawShape in class prefuse.render.AbstractShapeRenderer

drawShape

protected void drawShape(java.awt.Graphics2D g,
                         prefuse.visual.VisualItem item,
                         java.awt.Shape shape)
This method draws a given visualitem into a Graphics2D context. The getRawShape-method is used to determine the position of the item. Every item is supposed to be a line and at its start and endpoint a small circle is drawn. The color for the line comes from the StrokeColor field of the visualitem and the color for the circles comes from the FillColor field.

Overrides:
drawShape in class prefuse.render.AbstractShapeRenderer