|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcarmetal.objects.ConstructionObject
carmetal.objects.FunctionObject
public class FunctionObject
| Field Summary | |
|---|---|
static int |
CIRCLE
|
static int |
CROSS
|
static int |
DCROSS
|
static int |
DIAMOND
|
static int |
DOT
|
carmetal.rene.zirkel.expression.Expression |
DVar
|
boolean |
EditAborted
|
protected boolean |
Special
|
static int |
SQUARE
|
protected int |
Type
|
Vector |
V
|
String[] |
Var
|
carmetal.rene.zirkel.expression.Expression |
VarMax
|
carmetal.rene.zirkel.expression.Expression |
VarMin
|
| 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 | |
|---|---|
FunctionObject(carmetal.construction.Construction c)
Functions are HeavyObjects which means we always must see if it really neads to recompute. |
|
| Method Summary | |
|---|---|
void |
addDepending(carmetal.rene.zirkel.expression.Expression E)
|
boolean |
canDisplayName()
|
boolean |
canInteresectWith(ConstructionObject o)
|
void |
clearChanges()
|
void |
compute()
Time consuming method which is called only if it's really necessary : |
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. |
boolean |
equals(ConstructionObject o)
|
double |
evaluateF(double x)
|
double |
evaluateF(double[] x)
|
PointObject |
getCenter()
|
String |
getDisplayValue()
To be overridden by the objects. |
int |
getDistance(PointObject P)
|
String |
getEX()
|
String |
getEY()
|
double |
getIntegral()
|
double |
getLength()
|
int |
getN()
|
double |
getSum()
|
String |
getTag()
|
int |
getType()
|
double |
getValue()
Get the value of an object or throw an exception (e.g. |
double |
getValue(String var)
|
String |
getVar()
|
boolean |
hasUnit()
|
boolean |
isCartesian()
|
boolean |
isDriverObject()
|
boolean |
isFilled()
|
boolean |
isFilledForSelect()
|
boolean |
isSpecial()
|
boolean |
maybeTransparent()
|
boolean |
mayHaveDiscontinuityPb()
|
boolean |
nearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
Test, if this object is chosen with coordinates x,y |
boolean |
needsToRecompute()
Check all objects the function depends on. |
boolean |
onlynearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
Test, if this object must be chosen with coordinates x,y, assuming it is near to these coordinates. |
void |
paint(carmetal.rene.zirkel.graphics.MyGraphics g,
carmetal.rene.zirkel.ZirkelCanvas zc)
|
void |
printArgs(carmetal.rene.util.xml.XmlWriter xml)
|
void |
printType(carmetal.rene.util.xml.XmlWriter xml)
|
void |
project(PointObject P)
|
void |
project(PointObject P,
double alpha)
|
void |
recursiveSearchDependencies(ConstructionObject o)
Recursive method called by the searchDependencies method |
void |
repulse(PointObject P)
|
void |
searchDependencies(carmetal.construction.Construction c)
In order to see if the function must be recomputed or not, we have to register, in the DriverObjectList, all objects the function depends on. |
void |
setCenter(String s)
|
void |
setDefaults()
|
void |
setExpressions(String t,
String ex,
String ey)
|
void |
setFilled(boolean flag)
|
void |
setNeedsToRecompte(boolean n)
|
void |
setRange(String min,
String max,
String d)
|
void |
setSpecial(boolean f)
|
void |
setTargetDefaults()
|
void |
setType(int type)
|
boolean |
somethingChanged()
|
void |
updateText()
|
void |
validate()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public carmetal.rene.zirkel.expression.Expression VarMin
public carmetal.rene.zirkel.expression.Expression VarMax
public carmetal.rene.zirkel.expression.Expression DVar
public String[] Var
protected int Type
public static final int SQUARE
public static final int DIAMOND
public static final int CIRCLE
public static final int DOT
public static final int CROSS
public static final int DCROSS
protected boolean Special
public Vector V
public boolean EditAborted
| Constructor Detail |
|---|
public FunctionObject(carmetal.construction.Construction c)
c - | Method Detail |
|---|
public void setDefaults()
setDefaults in class ConstructionObjectpublic void setTargetDefaults()
setTargetDefaults in class ConstructionObjectpublic void searchDependencies(carmetal.construction.Construction c)
searchDependencies in interface HeavyObjectc - public void recursiveSearchDependencies(ConstructionObject o)
o - public void compute()
compute in interface HeavyObjectpublic void setNeedsToRecompte(boolean n)
public boolean needsToRecompute()
needsToRecompute in interface HeavyObjectpublic void setFilled(boolean flag)
setFilled in class ConstructionObjectpublic boolean isFilled()
isFilled in class ConstructionObjectpublic String getTag()
getTag in class ConstructionObjectpublic int getN()
getN in class ConstructionObjectpublic void updateText()
updateText in class ConstructionObjectpublic void validate()
validate in class ConstructionObject
public void setExpressions(String t,
String ex,
String ey)
public boolean isCartesian()
public boolean mayHaveDiscontinuityPb()
public void setRange(String min,
String max,
String d)
public String getEX()
getEX in class ConstructionObjectpublic String getEY()
getEY in class ConstructionObject
public void paint(carmetal.rene.zirkel.graphics.MyGraphics g,
carmetal.rene.zirkel.ZirkelCanvas zc)
paint in class ConstructionObject
public double getValue()
throws carmetal.construction.ConstructionException
ConstructionObject
getValue in class ConstructionObjectcarmetal.construction.ConstructionException
public double getValue(String var)
throws carmetal.construction.ConstructionException
carmetal.construction.ConstructionException
public double getIntegral()
throws carmetal.construction.ConstructionException
carmetal.construction.ConstructionExceptionpublic String getDisplayValue()
ConstructionObject
getDisplayValue in class ConstructionObject
public boolean nearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
ConstructionObject
nearto in class ConstructionObjectpublic void printArgs(carmetal.rene.util.xml.XmlWriter xml)
printArgs in class ConstructionObjectpublic void setType(int type)
setType in class ConstructionObjectpublic int getType()
getType in class ConstructionObjectpublic void printType(carmetal.rene.util.xml.XmlWriter xml)
public ConstructionObject copy(double x,
double y)
ConstructionObject
copy in class ConstructionObject
public boolean onlynearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
ConstructionObject
onlynearto in class ConstructionObjectpublic boolean equals(ConstructionObject o)
equals in class ConstructionObjectpublic Enumeration depending()
ConstructionObject
depending in class ConstructionObjectpublic void addDepending(carmetal.rene.zirkel.expression.Expression E)
public boolean hasUnit()
hasUnit in class ConstructionObject
public double evaluateF(double[] x)
throws carmetal.construction.ConstructionException
carmetal.construction.ConstructionException
public double evaluateF(double x)
throws carmetal.construction.ConstructionException
evaluateF in interface Evaluatorcarmetal.construction.ConstructionExceptionpublic int getDistance(PointObject P)
getDistance in class ConstructionObjectpublic void project(PointObject P)
project in interface PointonObjectpublic double getSum()
public double getLength()
public boolean isSpecial()
isSpecial in class ConstructionObjectpublic void setSpecial(boolean f)
setSpecial in class ConstructionObject
public void project(PointObject P,
double alpha)
project in interface PointonObjectpublic boolean maybeTransparent()
maybeTransparent in class ConstructionObjectpublic boolean canDisplayName()
canDisplayName in class ConstructionObjectpublic void setCenter(String s)
public boolean isFilledForSelect()
isFilledForSelect in class ConstructionObjectpublic PointObject getCenter()
public String getVar()
public boolean canInteresectWith(ConstructionObject o)
canInteresectWith in interface PointonObjectpublic boolean isDriverObject()
isDriverObject in interface DriverObjectisDriverObject in class ConstructionObjectpublic boolean somethingChanged()
somethingChanged in interface DriverObjectpublic void clearChanges()
clearChanges in interface DriverObjectpublic void repulse(PointObject P)
repulse in interface PointonObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||