Public Member Functions | Protected Attributes | Package Functions | Private Attributes

jscicalc.graph.Model Class Reference

This class represents the model from which any particular View of a graph is constructed. More...

Collaboration diagram for jscicalc.graph.Model:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Model ()
 Constructor.
void add (Element element)
 Add an element to the list.
void reset (Locus locus)
 Set a unique Locus in the list.
void draw (View view, java.awt.Graphics2D graphics2d)
 Draw the model on the view using the graphics object supplied.
void updatePaths ()
 Update paths in Locus objects.

Protected Attributes

java.util.LinkedList< Elementelements
 The list of elements to be drawn.

Package Functions

Axis getXAxis ()
 Get the x axis.
Axis getYAxis ()
 Get the y axis.

Private Attributes

HAxis xAxis
 An x axis.
VAxis yAxis
 A y axis.

Detailed Description

This class represents the model from which any particular View of a graph is constructed.

We use the model/view architecture so that we can export graph pictures in a variety of formats.

Author:
J. D. Lamb
Version:
Revision:
1.2

Constructor & Destructor Documentation

jscicalc.graph.Model.Model (  ) 

Member Function Documentation

void jscicalc.graph.Model.add ( Element  element  ) 

Add an element to the list.

Parameters:
element The element to add

References jscicalc.graph.Model.elements.

void jscicalc.graph.Model.draw ( View  view,
java.awt.Graphics2D  graphics2d 
)

Draw the model on the view using the graphics object supplied.

Parameters:
view A view
graphics2d A graphics context

References jscicalc.graph.Model.elements.

Referenced by jscicalc.graph.View.paintComponent().

Axis jscicalc.graph.Model.getXAxis (  )  [package]

Get the x axis.

Returns:
The x axis

References jscicalc.graph.Model.xAxis.

Referenced by jscicalc.graph.Menu.Menu().

Axis jscicalc.graph.Model.getYAxis (  )  [package]

Get the y axis.

Returns:
The y axis

References jscicalc.graph.Model.yAxis.

Referenced by jscicalc.graph.Menu.Menu().

void jscicalc.graph.Model.reset ( Locus  locus  ) 

Set a unique Locus in the list.

Parameters:
locus The element to add

References jscicalc.graph.Model.elements, jscicalc.graph.Model.xAxis, and jscicalc.graph.Model.yAxis.

Referenced by jscicalc.graph.Graph.setLocus().

void jscicalc.graph.Model.updatePaths (  ) 

Member Data Documentation

java.util.LinkedList<Element> jscicalc.graph.Model.elements [protected]

The documentation for this class was generated from the following file: