|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.simBio.core.Component org.simBio.core.Parameter org.simBio.core.Composite org.simBio.core.Analyzer org.simBio.sim.analyzer.VisualizeAnalyzer org.simBio.sim.analyzer.graph.AbstractGraph
public abstract class AbstractGraph
Provides a Graph framework. Constructs a framework in this class so that the Graph class which inherits from it can be implemented simply, without providing redrawing functions etc.
Field Summary | |
---|---|
protected AxisX |
axisX
coordinate axis object (horizontal direction) |
protected AxisY |
axisY
coordinate axis object (vertical direction) |
double |
interval
calculation result processing interval |
protected static Log |
log
|
protected double |
maxTime
maximum time until now |
protected double |
nextTime
time of the next process |
protected int |
nTarget
number of Nodes which become the target of management (target X, base) |
protected int |
nTargetOrigin
The basic point of nTarget. Before carrying out super.setLinks(), it is set to 0 with setLinks() in the case of Graph, and 1 in the case of RelationGraph. |
protected Viewer |
page
Viewer that this Graph is placed on |
protected IPlot |
plotDisplay
instance of a screen drawing operation |
protected IPlot |
plotPrinter
instance of a printing operation |
protected Node[] |
target
Nodes which become the drawing target (target X) |
protected java.lang.String[] |
targetName
name of the Node which becomes the drawing target (page.Graph.target X) |
protected double[] |
targetScale
scale of the Node which becomes the drawing target (target X scale) |
protected java.lang.String[] |
targetShortName
short name of the Node which becomes the drawing target (target X) |
protected AbstractGraph |
thisGraph
information for accessing this Graph from a subclass |
protected double[] |
valuesBuffer
buffer for temporary storage of calculation results |
Fields inherited from class org.simBio.core.Parameter |
---|
value |
Constructor Summary | |
---|---|
AbstractGraph()
|
Method Summary | |
---|---|
protected void |
analyze(double t)
Default analyze operation. Called by Conductor on the Simulation thread. |
protected abstract void |
analyzeSub(double t,
double[] valuesBuffer,
IPlot plot)
Analyse operation for giving a description to a subclass. |
void |
changeScale()
Carries out the necessary preparation for redrawing, when the display position/display range has changed. Currently it calls the Viewer method of the same name. |
void |
doRepaint()
再描画を行う. |
void |
drawLine(IPlot plot,
java.awt.Graphics2D graphics2d,
double x1,
double y1,
double x2,
double y2,
int nGraph)
Strikes a point on a graph. When a line is drawn instead of a point in Graph4State, it separates so that it is easy to inherit. |
void |
drawPoint(IPlot plot,
java.awt.Graphics2D graphics2d,
double x,
double y,
int nGraph)
Draws a line on a graph. When a line is drawn instead of a point in Graph4State, it separates so that it is easy to inherit. |
protected void |
paintAxises(java.awt.Graphics2D graphics2d,
IPlot plot)
Initialize graph area, and draw axes and grids. |
protected void |
paintBackground(java.awt.Graphics2D graphics2d,
IPlot plot)
Draw background. |
void |
paintComponent(java.awt.Graphics graphic)
Performs Graph screen drawing. |
protected abstract void |
paintGraph(java.awt.Graphics2D graphics2d,
IPlot plot)
Draw graph. |
protected void |
paintLegend(java.awt.Graphics2D graphics2d,
IPlot plot)
Draw legend. |
protected void |
prepare()
Set link to the targets. |
void |
prepareRepaint()
再描画を準備する. |
protected void |
printAxises(java.awt.Graphics2D graphics2d,
IPlot plot)
Initialize graph area, and draw axes and grids. |
protected void |
printBackground(java.awt.Graphics2D graphics2d,
IPlot plot)
Draw background. |
void |
printComponent(java.awt.Graphics graphic)
Performs drawing for printing the Graph. |
protected void |
printGraph(java.awt.Graphics2D graphics2d,
IPlot plot)
Draw graph. |
protected void |
printLegend(java.awt.Graphics2D graphics2d,
IPlot plot)
Draw legend. |
protected void |
resize(IPlot plot)
Recalculates the Graph size, based on the size of the current parent window. |
void |
setAreaChanged()
Provides notification when the displayed area has changed. For Graph etc, if calculation data is processed and cached, if the display area scrolls, if the resolution changes etc, there are cases where it is necessary to get rid of the cache. In such a case, when this method is called it gets rid of the cache. |
protected void |
setLinks()
Link to the Viewer, AxisX, AxisY and count number of the target, get array. |
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 |
Field Detail |
---|
protected static Log log
public double interval
protected AxisX axisX
protected AxisY axisY
protected double nextTime
protected double maxTime
protected double[] valuesBuffer
protected AbstractGraph thisGraph
protected Viewer page
protected IPlot plotDisplay
protected IPlot plotPrinter
protected Node[] target
protected java.lang.String[] targetName
protected java.lang.String[] targetShortName
protected double[] targetScale
protected int nTarget
protected int nTargetOrigin
Constructor Detail |
---|
public AbstractGraph()
Method Detail |
---|
protected void setLinks()
setLinks
in class Component
Component.setLinks()
protected void prepare()
prepare
in class Parameter
Component.prepare()
public void paintComponent(java.awt.Graphics graphic)
graphic
- Graphics drawing object public void printComponent(java.awt.Graphics graphic)
graphic
- Graphics drawing object public void prepareRepaint()
VisualizeAnalyzer
prepareRepaint
in class VisualizeAnalyzer
public void doRepaint()
VisualizeAnalyzer
doRepaint
in class VisualizeAnalyzer
public void changeScale()
protected final void analyze(double t)
analyze
in class VisualizeAnalyzer
t
- timeConductor.integrate()
protected abstract void analyzeSub(double t, double[] valuesBuffer, IPlot plot)
t
- time valuesBuffer
- array of calculation results plot
- drawing operation object protected void paintBackground(java.awt.Graphics2D graphics2d, IPlot plot)
graphics2d
- drawn Graphics plot
- drawing operation object protected abstract void paintGraph(java.awt.Graphics2D graphics2d, IPlot plot)
graphics2d
- drawn Graphics plot
- drawing operation object protected void paintAxises(java.awt.Graphics2D graphics2d, IPlot plot)
graphics2d
- drawn Graphics plot
- drawing operation object protected void paintLegend(java.awt.Graphics2D graphics2d, IPlot plot)
graphics2d
- drawn Graphics plot
- drawing operation object protected void printBackground(java.awt.Graphics2D graphics2d, IPlot plot)
graphics2d
- Graphics which are drawn plot
- drawing operation object protected void printGraph(java.awt.Graphics2D graphics2d, IPlot plot)
graphics2d
- Graphics which are drawn plot
- drawing operation object protected void printAxises(java.awt.Graphics2D graphics2d, IPlot plot)
graphics2d
- Graphics which are drawn plot
- drawing operation object protected void printLegend(java.awt.Graphics2D graphics2d, IPlot plot)
graphics2d
- Graphics which are drawn plot
- drawing operation object protected void resize(IPlot plot)
plot
- drawing operation object public void drawLine(IPlot plot, java.awt.Graphics2D graphics2d, double x1, double y1, double x2, double y2, int nGraph)
plot
- drawing operation object graphics2d
- Graphics which are drawn x1
- starting X coordinate y1
- starting Y coordinate x2
- finishing X coordinate y2
- finishing Y coordinate nGraph
- series number of the graph (0..n) public void drawPoint(IPlot plot, java.awt.Graphics2D graphics2d, double x, double y, int nGraph)
plot
- drawing operation object graphics2d
- Graphics which are drawn x
- X coordinate y
- Y coordinate nGraph
- series number of a graph (0..n) public void setAreaChanged()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |