org.simBio.sim.analyzer.graph.simple
Class Viewer

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.graph.simple.Viewer
All Implemented Interfaces:
Node, IViewer, ICanvas
Direct Known Subclasses:
RateGraph, RateGraph_KA

public class Viewer
extends Analyzer
implements ICanvas, IViewer

graph viewer.

Version:
$Log: Viewer.java,v $ Revision 1.1 2005/11/01 06:32:39 mikaelwing First version of simBio hosted on sourceforge, version 0.3 Revision 1.1 2005/09/12 04:57:07 sarai rearrenge folder structure as a Maven style Revision 1.3 2005/08/23 03:06:52 sarai implements IViewer to work with new GUI.
Author:
Nobuaki Sarai

Field Summary
 double referenceHeight
           
 double referenceWidth
           
 
Fields inherited from class org.simBio.core.Parameter
value
 
Constructor Summary
Viewer()
           
 
Method Summary
protected  void analyze(double t)
          do nothing
 void drawBar(int x, int y, int width, int height, int c)
           
 void drawPoint(int x, int y, int size, int c)
           
 double getScaleHeight()
          scaling factor = reference height (0.01 mm) / physical height (pixel)
 double getScaleWidth()
          scaling factor = reference width (0.01 mm) / physical width (pixel)
 double getWHratio()
           
 void paintComponent(java.awt.Graphics graphic)
          Viewerの画面用描画を行う.
 void plotAxises(Axis XA, Axis YA)
          plot axses and grids
 void printComponent(java.awt.Graphics graphic)
           
protected  void quit()
          dispose graphics and OnScreen.
 void reset()
          get graphics and clear.
 void setContainer(java.awt.Container container)
          Sets the container.
 void setContainer(javax.swing.JPanel panel)
           
 void setFileName(java.lang.String string)
          XMLファイル名を設定する.
protected  void setLinks()
          When there are no container, construct OnScreen, and clear.
 void setPrintableRect(java.awt.Rectangle rectPrintableArea)
           
 void setPrintRect(java.awt.Rectangle rectImageArea)
           
 
Methods inherited from class org.simBio.core.Composite
accept, getLink, getNode, getNodesIterator, getNodesSize
 
Methods inherited from class org.simBio.core.Parameter
addValue, getValue, getValueString, prepare, 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
 
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
 

Field Detail

referenceWidth

public double referenceWidth

referenceHeight

public double referenceHeight
Constructor Detail

Viewer

public Viewer()
Method Detail

setContainer

public void setContainer(java.awt.Container container)
Sets the container.

Specified by:
setContainer in interface IViewer
Parameters:
container - The container to set

reset

public void reset()
get graphics and clear.

Specified by:
reset in interface ICanvas

setLinks

protected void setLinks()
When there are no container, construct OnScreen, and clear.

Overrides:
setLinks in class Component
See Also:
OnScreen, Component.setLinks()

quit

protected void quit()
dispose graphics and OnScreen.

Overrides:
quit in class Component
See Also:
OnScreen, Component.quit()

analyze

protected void analyze(double t)
do nothing

Specified by:
analyze in class Analyzer
Parameters:
t - time
See Also:
Analyzer.analyze(double)

getScaleWidth

public double getScaleWidth()
scaling factor = reference width (0.01 mm) / physical width (pixel)

Specified by:
getScaleWidth in interface ICanvas
Returns:
reference width / physical width

getScaleHeight

public double getScaleHeight()
scaling factor = reference height (0.01 mm) / physical height (pixel)

Specified by:
getScaleHeight in interface ICanvas
Returns:
reference height / physical height

plotAxises

public void plotAxises(Axis XA,
                       Axis YA)
plot axses and grids

Specified by:
plotAxises in interface ICanvas
Parameters:
XA - x axis
YA - y axis

drawBar

public void drawBar(int x,
                    int y,
                    int width,
                    int height,
                    int c)
Specified by:
drawBar in interface ICanvas

drawPoint

public void drawPoint(int x,
                      int y,
                      int size,
                      int c)
Specified by:
drawPoint in interface ICanvas

getWHratio

public double getWHratio()
Specified by:
getWHratio in interface IViewer
Returns:
referenceWidth / target.referenceHeight
See Also:
IViewer.getWHratio()

setFileName

public void setFileName(java.lang.String string)
XMLファイル名を設定する.

Specified by:
setFileName in interface IViewer
Parameters:
string - XMLファイル名

paintComponent

public void paintComponent(java.awt.Graphics graphic)
Viewerの画面用描画を行う.

Specified by:
paintComponent in interface IViewer
Parameters:
graphic - 描画対象のGraphics

printComponent

public void printComponent(java.awt.Graphics graphic)
Specified by:
printComponent in interface IViewer

setPrintRect

public void setPrintRect(java.awt.Rectangle rectImageArea)
Specified by:
setPrintRect in interface IViewer

setPrintableRect

public void setPrintableRect(java.awt.Rectangle rectPrintableArea)
Specified by:
setPrintableRect in interface IViewer

setContainer

public void setContainer(javax.swing.JPanel panel)


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