Class Ampermeter
java.lang.Object
|
+----Element
|
+----Ampermeter
- public class Ampermeter
- extends Element
Ampermeter
-
Ampermeter()
- Constructs default Ampermeter.
-
Ampermeter(Ampermeter)
- Constructs new Ampermeter from given one.
-
connect()
- This function runs once, when the graph for the simulation was built,
but the simulation hasn't started yet.
-
getCurrent(int, double)
- Main function for calculations.
-
getCurrentForPaint()
-
-
getInfo(int)
-
Returns information for this element, such as voltage, current etc.
-
getProperties()
- This method is called to get values of element.
-
paint(Graphics, int, Dimension, boolean, boolean)
-
Paints the element on the given graphic context.
-
parseString(String)
- This method is called to load new values to element from string.
-
setProperties(String[])
- This method is called to set new values to element.
Ampermeter
public Ampermeter()
- Constructs default Ampermeter.
Ampermeter
public Ampermeter(Ampermeter e)
- Constructs new Ampermeter from given one.
- Parameters:
- e - Ampermemter to copy.
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
getCurrentForPaint
public double getCurrentForPaint()
getCurrent
public Polynom getCurrent(int dir,
double timeStep)
- Main function for calculations.
- Overrides:
- getCurrent in class Element
getInfo
public String[] getInfo(int angle)
- Returns information for this element, such as voltage, current etc.
- Overrides:
- getInfo in class Element
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
getProperties
public Object[] getProperties()
- This method is called to get values of element. Six Objects for each parameter:
- Name of parameter
- Value
- Minimal valid order
- Maximal valid order
- Current order
- Units
- Returns:
- array of Objects.
- Overrides:
- getProperties in class Element
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
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