|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ajc.esim.core.Data
public class Data
Stores all information for the program, written to file for program persistance.
Field Summary | |
---|---|
java.awt.Color |
backgroundColor
|
int |
chargeScale
|
boolean |
fieldLinesOn
|
double |
gradMax
|
double |
gradMin
|
java.awt.Color |
gridColor
|
boolean |
gridOn
|
java.awt.Color |
infoBack
|
int |
MainWinHeight
|
int |
mainWinWidth
|
java.awt.Color |
negColor
|
int |
peRes
|
int |
pLines
|
java.awt.Color |
posColor
|
java.awt.Color |
potentialColor
|
boolean |
potentialLinesOn
|
long |
potOffset
|
long |
potspacing
|
static Prefix[] |
prefixes
Array of Prefixes used for a feature still in devlopment. |
int |
prefixIndex
|
double |
siFactor
|
java.awt.Color |
text
|
java.awt.Color |
tickColor
|
boolean |
ticksOn
|
int |
tickSpacing
|
double |
totalPositiveCharge
|
Constructor Summary | |
---|---|
Data()
Creates new Data object. |
Method Summary | |
---|---|
void |
addCharge(Charge c)
Adds a charge to the Charges ArrayList |
void |
flushCharges()
Clears all charges from the Charges ArrayList and then calls the System garbage collector |
Charge |
getCharge(int index)
Gets the charge from the Charges array list at the given index. |
Charge[] |
getChargeArray()
|
int |
getChargeIndex(Charge c)
Gets the index of Charge c. |
int |
getChargeLength()
Returns the length of the Charges ArrayList |
java.util.ArrayList<Charge> |
getCharges()
|
int |
getNumLines()
Gets the Charge density |
int |
getPeRes()
Gets the potential line resolution |
Prefix |
getPrefix(int POT)
Gets the prefix corrsponding to the specificed power of ten Currently returns only the 4th prefix (0) |
int |
getPrefixIndex()
Gets the index of the current Prefix |
double |
getScale()
Gets the Scale of the current prefix |
java.awt.Color |
negate(java.awt.Color in)
Inverts the inverted color. |
void |
rebuildAllShapes()
Calls reBuildShape on all charges. |
void |
removeCharge(Charge c)
Removes a charge from the Charges ArrayList |
void |
removeCharge(int index)
Removes a charge from the Charges ArrayList based on the index number |
void |
resetAll()
Resets program variables to original values |
void |
setNumLines(int numLines)
Sets the Charge Density |
void |
setPeRes(int peRes)
Sets the Potential Resolution |
void |
setPrefix(int x)
Sets the current prefix index. |
void |
setupColors()
Sets all colors to defaults. |
void |
setupPrefixArray()
initalizes the prefix array |
void |
updateScales()
Updates the potential offset and spacing, field line color scale and field line distrobution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Prefix[] prefixes
setupPrefixArray()
,
Prefix
public java.awt.Color backgroundColor
public java.awt.Color gridColor
public java.awt.Color infoBack
public java.awt.Color negColor
public java.awt.Color posColor
public java.awt.Color potentialColor
public java.awt.Color text
public java.awt.Color tickColor
public boolean fieldLinesOn
public boolean gridOn
public boolean potentialLinesOn
public boolean ticksOn
public double siFactor
public double totalPositiveCharge
public int MainWinHeight
public int chargeScale
public int mainWinWidth
public int pLines
public int peRes
public int prefixIndex
public int tickSpacing
public double gradMax
public double gradMin
public long potOffset
public long potspacing
Constructor Detail |
---|
public Data()
Method Detail |
---|
public void addCharge(Charge c)
c
- Charge to add to listCharges
public void flushCharges()
Charges
public Charge getCharge(int index)
index
- Charges ArrayList item to return
Charge
,
Charges
public int getChargeIndex(Charge c)
c
- Charge to find the index of
Charges
public int getChargeLength()
Charges
public java.util.ArrayList<Charge> getCharges()
public int getNumLines()
numLines
public int getPeRes()
peRes
public Prefix getPrefix(int POT)
POT
- Power Of Ten
Prefix
public int getPrefixIndex()
prefixes
public double getScale()
Prefix.mult()
public java.awt.Color negate(java.awt.Color in)
in
- Inital color
public void rebuildAllShapes()
Charge.reBuildShape()
public void removeCharge(Charge c)
c
- Charge to be removedCharges
public void removeCharge(int index)
index
- Index of charge to be removedCharges
public void resetAll()
setupColors()
,
updateScales()
public void setNumLines(int numLines)
numLines
- New charge densitynumLines
public void setPeRes(int peRes)
peRes
- New potential resolutionpeRes
public void setPrefix(int x)
x
- new prefix index; must be between 8 and 0 inclusive.public void setupColors()
public void setupPrefixArray()
Prefix
public void updateScales()
public Charge[] getChargeArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |