Class Ampermeter

java.lang.Object
   |
   +----Element
           |
           +----Ampermeter

public class Ampermeter
extends Element
Ampermeter


Constructor Index

 o Ampermeter()
Constructs default Ampermeter.
 o Ampermeter(Ampermeter)
Constructs new Ampermeter from given one.

Method Index

 o connect()
This function runs once, when the graph for the simulation was built, but the simulation hasn't started yet.
 o getCurrent(int, double)
Main function for calculations.
 o getCurrentForPaint()
 o getInfo(int)
Returns information for this element, such as voltage, current etc.
 o getProperties()
This method is called to get values of element.
 o paint(Graphics, int, Dimension, boolean, boolean)
Paints the element on the given graphic context.
 o parseString(String)
This method is called to load new values to element from string.
 o setProperties(String[])
This method is called to set new values to element.

Constructors

 o Ampermeter
 public Ampermeter()
Constructs default Ampermeter.

 o Ampermeter
 public Ampermeter(Ampermeter e)
Constructs new Ampermeter from given one.

Parameters:
e - Ampermemter to copy.

Methods

 o connect
 public void connect()
This function runs once, when the graph for the simulation was built, but the simulation hasn't started yet.

Overrides:
connect in class Element
 o getCurrentForPaint
 public double getCurrentForPaint()
 o getCurrent
 public Polynom getCurrent(int dir,
                           double timeStep)
Main function for calculations.

Overrides:
getCurrent in class Element
 o getInfo
 public String[] getInfo(int angle)
Returns information for this element, such as voltage, current etc.

Overrides:
getInfo in class Element
 o paint
 public void paint(Graphics g,
                   int angle,
                   Dimension size,
                   boolean isSimulating,
                   boolean animated)
Paints the element on the given graphic context.

Overrides:
paint in class Element
 o getProperties
 public Object[] getProperties()
This method is called to get values of element. Six Objects for each parameter:

Returns:
array of Objects.
Overrides:
getProperties in class Element
 o setProperties
 public void setProperties(String props[])
This method is called to set new values to element. Two strings for each parameter:

Parameters:
props - array with pairs of Strings.
Overrides:
setProperties in class Element
 o parseString
 public void parseString(String values) throws ParseException
This method is called to load new values to element from string. String should be like "value,order;value,order;etc.".

Parameters:
values - new values for element in string in format given above.
Throws: ParseException
if string format is incorrect.
Overrides:
parseString in class Element