|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcarmetal.objects.ConstructionObject
carmetal.objects.ExpressionObject
public class ExpressionObject
Build a mathematical expression
| Field Summary | |
|---|---|
double |
C
|
protected double |
CurrentValue
|
protected boolean |
CurrentValueValid
|
carmetal.rene.zirkel.expression.Expression |
E
|
protected carmetal.rene.zirkel.expression.Expression |
EX
|
protected carmetal.rene.zirkel.expression.Expression |
EY
|
protected boolean |
Fixed
|
double |
H
|
double |
R
|
double |
SC
|
double |
SD
|
double |
SH
|
protected boolean |
Slider
|
protected carmetal.rene.zirkel.expression.Expression |
SMax
|
protected carmetal.rene.zirkel.expression.Expression |
SMin
|
double |
SR
|
double |
SW
|
double |
SX
|
double |
SY
|
double |
W
|
protected double |
X
|
protected double |
Y
|
| Fields inherited from class carmetal.objects.ConstructionObject |
|---|
Back, Bold, Break, BreakHide, Cn, ColorIndex, ColorType, Conditionals, Count, DescriptionState, DisplaysText, DL, Flag, FormulaState, gotNCount, HasZ, Hidden, HideBreak, inConstruction, Indicated, INVISIBLE, IsDrawn, JobTarget, Keep, KeepClose, LabelSelected, Large, MainParameter, Name, NCount, NeedsRecompute, NORMAL, Obtuse, Parameter, RekFlag, RekValidating, Scratch, Selectable, Selected, ShowIndicatedName, ShowName, ShowValue, SizeState, Solid, SpecialColor, SpecialParameter, StrongSelected, SuperHidden, Target, Text, THICK, THIN, Tracked, Translation, TX1, TX2, TY1, TY2, Unit, Valid, Value, VRek, XcOffset, YcOffset |
| Constructor Summary | |
|---|---|
ExpressionObject(carmetal.construction.Construction c,
double x,
double y)
|
|
| Method Summary | |
|---|---|
void |
addDepending(carmetal.rene.zirkel.expression.Expression EE)
|
void |
clearChanges()
|
ConstructionObject |
copy(double x,
double y)
This clones the object for macro construction. |
Enumeration |
depending()
Return an enumeration of objects, that this object depends on. |
void |
dragTo(double x,
double y)
|
boolean |
equals(ConstructionObject o)
|
boolean |
fixed()
|
String |
getDisplayValue()
To be overridden by the objects. |
String |
getEquation()
|
String |
getEX()
|
carmetal.rene.zirkel.expression.Expression |
getExp()
|
String |
getExpression()
|
String |
getEY()
|
String |
getMax()
|
double |
getMaxValue()
|
String |
getMin()
|
double |
getMinValue()
|
int |
getN()
|
double |
getOldX()
|
double |
getOldY()
|
String |
getPrompt()
|
double |
getSliderPosition()
Compute the relative position, the slider must be on according to CurrentValue |
String |
getTag()
|
double |
getValue()
Get the value of an object or throw an exception (e.g. |
double |
getX()
|
double |
getY()
|
boolean |
isDriverObject()
|
boolean |
isOwnedByControl()
|
boolean |
isSlider()
|
void |
move(double x,
double y)
|
boolean |
moveable()
|
boolean |
nearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
Test, if this object is chosen with coordinates x,y |
void |
paint(carmetal.rene.zirkel.graphics.MyGraphics g,
carmetal.rene.zirkel.ZirkelCanvas zc)
Paint the expression. |
void |
printArgs(carmetal.rene.util.xml.XmlWriter xml)
|
void |
reset()
|
void |
resetSimulationValue()
Reset the old value. |
void |
round()
|
void |
setCurrentValue(double x)
|
void |
setDefaults()
|
void |
setExpression(String expr,
carmetal.construction.Construction c)
|
void |
setFixed(boolean flag)
|
void |
setFixed(String expr)
|
void |
setFixed(String x,
String y)
|
void |
setOwnedByControl(boolean b)
|
void |
setPrompt(String prompt)
|
void |
setSimulationValue(double x)
Set the simulation value, remember the old value. |
void |
setSlider(boolean flag)
Set or clear the slider. |
void |
setSlider(String smin,
String smax)
Set the slider to min, max und step values. |
void |
setSliderPosition(double d)
Set the expression according to the relative value the slider is on. |
void |
setTargetDefaults()
|
void |
snap(carmetal.rene.zirkel.ZirkelCanvas zc)
|
boolean |
somethingChanged()
|
void |
startDrag(double x,
double y)
|
void |
translate()
Override in children! This translates the mother items. |
void |
updateText()
|
void |
validate()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double X
protected double Y
public carmetal.rene.zirkel.expression.Expression E
protected carmetal.rene.zirkel.expression.Expression EX
protected carmetal.rene.zirkel.expression.Expression EY
protected boolean Fixed
protected double CurrentValue
protected boolean CurrentValueValid
protected boolean Slider
protected carmetal.rene.zirkel.expression.Expression SMin
protected carmetal.rene.zirkel.expression.Expression SMax
public double C
public double R
public double W
public double H
public double SC
public double SR
public double SW
public double SH
public double SX
public double SY
public double SD
| Constructor Detail |
|---|
public ExpressionObject(carmetal.construction.Construction c,
double x,
double y)
| Method Detail |
|---|
public void setDefaults()
setDefaults in class ConstructionObjectpublic void setTargetDefaults()
setTargetDefaults in class ConstructionObjectpublic String getTag()
getTag in class ConstructionObjectpublic int getN()
getN in class ConstructionObjectpublic void updateText()
updateText in class ConstructionObject
public void paint(carmetal.rene.zirkel.graphics.MyGraphics g,
carmetal.rene.zirkel.ZirkelCanvas zc)
paint in class ConstructionObjectpublic double getSliderPosition()
public void setSliderPosition(double d)
d -
public boolean nearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
ConstructionObject
nearto in class ConstructionObjectpublic double getX()
getX in class ConstructionObjectpublic double getY()
getY in class ConstructionObjectpublic carmetal.rene.zirkel.expression.Expression getExp()
public void move(double x,
double y)
move in interface MoveableObjectmove in class ConstructionObjectpublic void snap(carmetal.rene.zirkel.ZirkelCanvas zc)
snap in class ConstructionObjectpublic void round()
round in class ConstructionObjectpublic void printArgs(carmetal.rene.util.xml.XmlWriter xml)
printArgs in class ConstructionObjectpublic boolean equals(ConstructionObject o)
equals in class ConstructionObject
public void setExpression(String expr,
carmetal.construction.Construction c)
throws carmetal.construction.ConstructionException
setExpression in class ConstructionObjectcarmetal.construction.ConstructionExceptionpublic void setFixed(String expr)
setFixed in class ConstructionObjectpublic String getExpression()
getExpression in class ConstructionObjectpublic Enumeration depending()
ConstructionObject
depending in class ConstructionObjectpublic void addDepending(carmetal.rene.zirkel.expression.Expression EE)
public double getValue()
throws carmetal.construction.ConstructionException
ConstructionObject
getValue in class ConstructionObjectcarmetal.construction.ConstructionExceptionpublic String getPrompt()
getPrompt in class ConstructionObjectpublic void setPrompt(String prompt)
setPrompt in class ConstructionObjectpublic void translate()
ConstructionObject
translate in class ConstructionObjectpublic void validate()
validate in class ConstructionObjectpublic void setFixed(boolean flag)
setFixed in class ConstructionObject
public void setFixed(String x,
String y)
setFixed in class ConstructionObject
public ConstructionObject copy(double x,
double y)
ConstructionObject
copy in class ConstructionObjectpublic boolean moveable()
moveable in interface MoveableObjectpublic void reset()
public boolean fixed()
fixed in class ConstructionObjectpublic String getEX()
getEX in class ConstructionObjectpublic String getEY()
getEY in class ConstructionObjectpublic void setCurrentValue(double x)
public void setSimulationValue(double x)
setSimulationValue in interface SimulationObjectpublic void resetSimulationValue()
resetSimulationValue in interface SimulationObject
public void setSlider(String smin,
String smax)
setSlider in class ConstructionObjectsmin - smax - sstep - public void setSlider(boolean flag)
setSlider in class ConstructionObjectflag -
public void startDrag(double x,
double y)
startDrag in interface MoveableObject
public void dragTo(double x,
double y)
dragTo in interface MoveableObjectpublic double getOldX()
getOldX in interface MoveableObjectpublic double getOldY()
getOldY in interface MoveableObjectpublic boolean isSlider()
isSlider in class ConstructionObjectpublic double getMinValue()
public double getMaxValue()
public String getMin()
getMin in class ConstructionObjectpublic String getMax()
getMax in class ConstructionObjectpublic String getDisplayValue()
ConstructionObject
getDisplayValue in class ConstructionObjectpublic String getEquation()
getEquation in class ConstructionObjectpublic boolean isDriverObject()
isDriverObject in interface DriverObjectisDriverObject in class ConstructionObjectpublic boolean somethingChanged()
somethingChanged in interface DriverObjectpublic void clearChanges()
clearChanges in interface DriverObjectpublic boolean isOwnedByControl()
isOwnedByControl in class ConstructionObjectpublic void setOwnedByControl(boolean b)
setOwnedByControl in class ConstructionObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||