org.simBio.sim.analyzer.graph
Class AxisX

java.lang.Object
  extended by org.simBio.core.Component
      extended by org.simBio.core.Parameter
          extended by org.simBio.core.Composite
              extended by org.simBio.core.Analyzer
                  extended by org.simBio.sim.analyzer.VisualizeAnalyzer
                      extended by org.simBio.sim.analyzer.graph.Axis
                          extended by org.simBio.sim.analyzer.graph.AxisX
All Implemented Interfaces:
Node
Direct Known Subclasses:
AxisXFix

public class AxisX
extends Axis

x axis

Version:
$Id: AxisX.java,v 1.2 2007/02/07 03:13:03 nsarai Exp $
Author:
Nobuaki Sarai, misaki

Field Summary
 
Fields inherited from class org.simBio.sim.analyzer.graph.Axis
extendMode, extendModeDefault, extendRateDefault, gridStep, isPlotLabel, labelColor, labelFont, labelInitialized, labelLength, labelStep, length, log, max, min, MODE_AUTOSCALE, MODE_AUTOSCROLL, MODE_FIXED, nextLabelPos, origin, patternString, titleColor, titleFont
 
Fields inherited from class org.simBio.core.Parameter
value
 
Constructor Summary
AxisX()
           
 
Method Summary
protected  void drowDesc(java.awt.Graphics graphics, IPlot plot, java.lang.String str)
          Draws the axis label in graphics.
protected  void drowGrid(java.awt.Graphics graphics, IPlot plot, double value)
          Draws a grid in graphics with a value at the specified position.
protected  void drowLabel(java.awt.Graphics graphics, IPlot plot, double value, java.lang.String str)
          Draws the numerical value of the value parameter in graphics at the specified position.
 java.lang.String getFormatString(double min, double max)
          Get default format string.
 int getFreeSpaceBottom(java.awt.Graphics graphics)
          Get the space for the axis label
 int getFreeSpaceLeft(java.awt.Graphics graphics)
          Gets the space on the left of the screen for displaying the scale. Please override as necessary with a concrete class.
protected  double getLabelLength(java.awt.Graphics graphics, java.lang.String str)
          Display of the axis label
protected  double getPos(double data, IPlot plot)
          Gets the coordinate axis from Plot.
protected  void setLinks()
          Set link to the Viewer to get scale factor later.
 
Methods inherited from class org.simBio.sim.analyzer.graph.Axis
analyze, doRepaint, format, getFreeSpaceRight, getFreeSpaceTop, Log10, plotAxis, prepare, prepareRepaint
 
Methods inherited from class org.simBio.sim.analyzer.VisualizeAnalyzer
getColorParameter, getDouble, getFontParameter, getNodeHierarchically, getNodeRecursive, repaint, resetBuffer
 
Methods inherited from class org.simBio.core.Composite
accept, getLink, getNode, getNodesIterator, getNodesSize
 
Methods inherited from class org.simBio.core.Parameter
addValue, getValue, getValueString, setInitializer, setValue, setValueString, setValueToField
 
Methods inherited from class org.simBio.core.Component
addDydt, end, getIndent, getIndentedShortName, getName, getName, getParent, getRoot, getShortName, getUnits, isNamed, isPrefixed, logIndented, quit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.simBio.core.Node
addDydt, addValue, getValue, setValue
 

Constructor Detail

AxisX

public AxisX()
Method Detail

setLinks

protected void setLinks()
Description copied from class: Axis
Set link to the Viewer to get scale factor later.

Overrides:
setLinks in class Axis
See Also:
Component.setLinks()

getFormatString

public java.lang.String getFormatString(double min,
                                        double max)
Description copied from class: Axis
Get default format string.

Specified by:
getFormatString in class Axis
Parameters:
min - minimum scale value
max - maximum scale value
Returns:
format string

getFreeSpaceBottom

public int getFreeSpaceBottom(java.awt.Graphics graphics)
Get the space for the axis label

Overrides:
getFreeSpaceBottom in class Axis
Parameters:
graphics - Graphics of the drawing target
Returns:
size
See Also:
Axis.getFreeSpaceBottom(java.awt.Graphics)

getFreeSpaceLeft

public int getFreeSpaceLeft(java.awt.Graphics graphics)
Description copied from class: Axis
Gets the space on the left of the screen for displaying the scale. Please override as necessary with a concrete class.

Overrides:
getFreeSpaceLeft in class Axis
Parameters:
graphics - Graphics of the drawing target
Returns:
size

getLabelLength

protected double getLabelLength(java.awt.Graphics graphics,
                                java.lang.String str)
Display of the axis label

Specified by:
getLabelLength in class Axis
Parameters:
graphics - Graphics drawing object
str - display value
See Also:
org.simBio.sim.analyzer.graph.Axis#getLabelLength(org.simBio.sim.analyzer.graph.AbstractGraph, java.awt.Graphics, java.lang.String)

drowGrid

protected void drowGrid(java.awt.Graphics graphics,
                        IPlot plot,
                        double value)
Description copied from class: Axis
Draws a grid in graphics with a value at the specified position.

Specified by:
drowGrid in class Axis
Parameters:
graphics - Graphics drawing object
plot - drawing operation object
value - calculation value

drowLabel

protected void drowLabel(java.awt.Graphics graphics,
                         IPlot plot,
                         double value,
                         java.lang.String str)
Description copied from class: Axis
Draws the numerical value of the value parameter in graphics at the specified position.

Specified by:
drowLabel in class Axis
Parameters:
graphics - Graphics drawing object
plot - drawing operation object
value - calculation value
str - display value

drowDesc

protected void drowDesc(java.awt.Graphics graphics,
                        IPlot plot,
                        java.lang.String str)
Description copied from class: Axis
Draws the axis label in graphics.

Specified by:
drowDesc in class Axis
Parameters:
graphics - Graphics drawing object
plot - drawing operation object
str - display value

getPos

protected double getPos(double data,
                        IPlot plot)
Description copied from class: Axis
Gets the coordinate axis from Plot.

Specified by:
getPos in class Axis
Parameters:
data - calculation value
plot - object that handles drawing
Returns:
screen coordinates


Copyright © 2002-2008 Cell/Biodinamics simulation project. All Rights Reserved.