|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprefuse.render.AbstractShapeRenderer
zugvis.BarChartRenderer
public class BarChartRenderer
This is the renderer for both bar chart visualizations.
Field Summary | |
---|---|
protected boolean |
drawStations
Flag if draw stations |
protected int |
m_barHeight
Barheight |
protected java.awt.geom.RectangularShape |
m_bbox
The holder for the currently computed bounding box |
protected java.lang.String |
m_delim
Newline delimiter of text |
protected java.awt.Font |
m_font
Font of labels |
protected int |
m_horizBorder
Horizontal border of barchart |
protected java.lang.String |
m_stationFrom
Stationname of fromstation fo label |
protected java.awt.Dimension |
m_stationFromDim
Dimension of stationfromlabel |
protected java.lang.String |
m_stationFromField
Fieldname of fromstation |
protected java.lang.String |
m_stationTo
Stationname of tostation for label |
protected java.awt.Dimension |
m_stationToDim
Dimension of stationtolabel |
protected java.lang.String |
m_stationToField
Fieldname of tostation |
protected java.lang.String |
m_trainInfo
Text of traininfo for label |
protected java.awt.Dimension |
m_trainInfoDim
Dimension of traininfolabel |
protected java.lang.String |
m_trainInfoField
Fieldname of the traininfo |
protected java.lang.String |
m_trainName
Name of the train for label |
protected java.awt.Dimension |
m_trainNameDim
Dimension of the trainnamelabel |
protected java.lang.String |
m_trainNameField
Fieldname of trainnames |
protected int |
m_vertBorder
Vertical border of barchart |
protected at.ac.tuwien.cs.timevis.FisheyeTimeScale |
timeScale
Timescale of visualisation for calculating pixelposition for a dimension |
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 | |
---|---|
BarChartRenderer()
Create a new LabelRenderer. |
|
BarChartRenderer(java.lang.String trainNameField,
java.lang.String trainInfoField,
java.lang.String stationFromField,
java.lang.String stationToField)
Create a new BarChartRenderer. |
Method Summary | |
---|---|
void |
DrawStations(boolean draw)
This sets the drawstations flag. |
java.lang.String |
getDataField(java.lang.String fieldName)
Get the text of a field |
int |
getHorizontalPadding()
Returns the amount of padding in pixels between the content and the border of this item along the horizontal dimension. |
protected java.awt.Shape |
getRawShape(prefuse.visual.VisualItem item)
Compute the boundingbos of the bar including textlabels |
protected java.lang.String |
getText(prefuse.visual.VisualItem item,
java.lang.String dataField)
Returns the text to draw. |
int |
getVerticalPadding()
Returns the amount of padding in pixels between the content and the border of this item along the vertical dimension. |
void |
render(java.awt.Graphics2D g,
prefuse.visual.VisualItem item)
Renders the barchart (including labels if enough place) |
void |
setHorizontalPadding(int xpad)
Sets the amount of padding in pixels between the content and the border of this item along the horizontal dimension. |
void |
setTimeScale(at.ac.tuwien.cs.timevis.FisheyeTimeScale _timeScale)
Sets the timeScale |
void |
setVerticalPadding(int ypad)
Sets the amount of padding in pixels between the content and the border of this item along the vertical dimension. |
Methods inherited from class prefuse.render.AbstractShapeRenderer |
---|
drawShape, getRenderType, getShape, getStroke, getTransform, locatePoint, setBounds, setManageBounds, setRenderType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String m_delim
protected int m_horizBorder
protected int m_vertBorder
protected int m_barHeight
protected boolean drawStations
protected java.awt.geom.RectangularShape m_bbox
protected java.awt.Font m_font
protected java.lang.String m_trainNameField
protected java.lang.String m_trainName
protected java.awt.Dimension m_trainNameDim
protected java.lang.String m_trainInfoField
protected java.lang.String m_trainInfo
protected java.awt.Dimension m_trainInfoDim
protected java.lang.String m_stationFromField
protected java.lang.String m_stationFrom
protected java.awt.Dimension m_stationFromDim
protected java.lang.String m_stationToField
protected java.lang.String m_stationTo
protected java.awt.Dimension m_stationToDim
protected at.ac.tuwien.cs.timevis.FisheyeTimeScale timeScale
Constructor Detail |
---|
public BarChartRenderer()
public BarChartRenderer(java.lang.String trainNameField, java.lang.String trainInfoField, java.lang.String stationFromField, java.lang.String stationToField)
trainNameField
- Fieldname of trainnamestrainInfoField
- Fieldname of traininfosstationFromField
- Fieldname of startstationnamestationToField
- Fieldname of endstationnameMethod Detail |
---|
public java.lang.String getDataField(java.lang.String fieldName)
fieldName
- Name of the field
public void DrawStations(boolean draw)
draw
- If true stations of a connection will be drawn as small white lines.protected java.lang.String getText(prefuse.visual.VisualItem item, java.lang.String dataField)
dataField
- Text of a specific datafielditem
- the item to represent as a String
String
to drawprotected java.awt.Shape getRawShape(prefuse.visual.VisualItem item)
getRawShape
in class prefuse.render.AbstractShapeRenderer
item
- Visualitem to compute
public void render(java.awt.Graphics2D g, prefuse.visual.VisualItem item)
render
in interface prefuse.render.Renderer
render
in class prefuse.render.AbstractShapeRenderer
g
- Graphics2Ditem
- Visualitem to drawpublic int getHorizontalPadding()
public void setHorizontalPadding(int xpad)
xpad
- the horizontal padding to setpublic int getVerticalPadding()
public void setVerticalPadding(int ypad)
ypad
- the vertical paddingpublic void setTimeScale(at.ac.tuwien.cs.timevis.FisheyeTimeScale _timeScale)
_timeScale
- the timeScale
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |