carmetal.objects
Class UserFunctionObject

java.lang.Object
  extended by carmetal.objects.ConstructionObject
      extended by carmetal.objects.UserFunctionObject
All Implemented Interfaces:
DriverObject, Evaluator, MoveableObject, carmetal.rene.lister.Element, carmetal.rene.util.sort.SortObject, Cloneable

public class UserFunctionObject
extends ConstructionObject
implements MoveableObject, DriverObject, Evaluator


Field Summary
 boolean EditAborted
           
protected  carmetal.rene.zirkel.expression.Expression EXpos
           
protected  carmetal.rene.zirkel.expression.Expression EYpos
           
protected  boolean Fixed
           
protected  double Xpos
           
protected  double Ypos
           
 
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
UserFunctionObject(carmetal.construction.Construction c)
           
 
Method Summary
 void addDepending(carmetal.rene.zirkel.expression.Expression E)
           
 boolean canDisplayName()
           
 void clearChanges()
           
 Enumeration depending()
          Return an enumeration of objects, that this object depends on.
 void dragTo(double x, double y)
           
 boolean equals(ConstructionObject o)
           
 double evaluateF(double x)
           
 double evaluateF(double[] x)
           
 double evaluateF(double x, double y)
           
 boolean fixed()
           
 String getDisplayValue()
          To be overridden by the objects.
 String getEXpos()
           
 String getEY()
           
 String getEYpos()
           
 int getN()
           
 double getOldX()
           
 double getOldY()
           
 String getTag()
           
 double getValue()
          Get the value of an object or throw an exception (e.g.
 double getValue(String var)
           
 String getVar()
           
 double getX()
           
 double getY()
           
 boolean hasUnit()
           
 boolean isDriverObject()
           
 boolean isFilledForSelect()
           
 boolean isValid()
           
 boolean maybeTransparent()
           
 void move(double x, double y)
           
 boolean moveable()
           
 boolean nearto(int cc, int rr, carmetal.rene.zirkel.ZirkelCanvas zc)
          Test, if this object is chosen with coordinates x,y
 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 setDefaults()
           
 void setExpressions(String t, String ey)
           
 void setFixed(boolean flag)
           
 void setFixed(String x, String y)
           
 void setTargetDefaults()
           
 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 carmetal.objects.ConstructionObject
addConditional, addDepInExpressions, canFix, canKeepClose, changedBy, checkConditionals, clearCircleDep, clearConditional, clearConditionals, clearParameter, compare, contains, copy, copyProperties, dependsOn, depset, depset, depset, discardMV, displays, drawCenteredLabel, drawLabel, drawLabel, drawPointLabel, edit, equals, equalsTo, getAlias, getCDPDisplayValue, getCDPSizeDisplay, getColor, getColorIndex, getColorIndex, getColorType, getColorType, getConditional, getConditionalColor, getConstruction, getDepArray, getDescription, getDisplaySize, getDisplayText, getDistance, getE, getElementColor, getElementString, getElementString, getEquation, getEX, getExpression, getIncrement, getLines, getMax, getMin, getName, getNCount, getObtuse, getPointObject, getPrompt, getR, getSpecialColor, getStringLength, getText, getTranslation, getType, getUnit, getVector, getZ, haveConditional, haveConditionals, helpDisplayNumber, helpDisplayValue, indicated, isBack, isBack, isBold, isBreak, isBreakHide, isDragable, isFilled, isFixed, isFlag, isGotNCount, isHidden, isHidden, isHideBreak, isInConstruction, isInside, isJobTarget, isKeep, isKeepClose, isLarge, isMainParameter, isOwnedByControl, isParameter, isPartial, isRekFlag, isSelectable, isSlider, isSolid, isSolid, isSpecial, isSpecialParameter, isStrongSelected, isSuperHidden, isSuperHidden, isTarget, labelSelected, laterBind, laterTranslate, locallyLike, mustHide, nearto, replaceExpressions, round, round, round, roundDisplay, save, secondaryParams, selected, setAlias, setBack, setBold, setBreak, setBreakHide, setcOffset, setColor, setColor, setColorType, setConstruction, setDisplaySize, setDragable, setExpression, setFilled, setFixed, setFixed, setFlag, setFont, setGotNCount, setHidden, setHideBreak, setInConstruction, setIncrement, setIndicated, setIndicated, setInside, setJobTarget, setKeep, setKeepClose, setKeepClose, setLabelSelected, setLarge, setLines, setMainParameter, setName, setName, setNameCheck, setNameWithNumber, setNCount, setObtuse, setOffset, setOwnedByControl, setParameter, setPartial, setPrompt, setRekFlag, setSelectable, setSelected, setShowName, setShowValue, setSlider, setSlider, setSolid, setSpecial, setSpecialColor, setSpecialParameter, setStrongSelected, setSuperHidden, setTarget, setText, setText, setTracked, setTranslation, setType, setUnit, showName, showName, showValue, showValue, snap, testConditional, text1, text2, text3, text4, textAny, textcontains, toggleHidden, tracked, translateConditionals, translateExpressions, translateOffset, updateCircleDep, valid, visible, xcOffset, ycOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Xpos

protected double Xpos

Ypos

protected double Ypos

Fixed

protected boolean Fixed

EXpos

protected carmetal.rene.zirkel.expression.Expression EXpos

EYpos

protected carmetal.rene.zirkel.expression.Expression EYpos

EditAborted

public boolean EditAborted
Constructor Detail

UserFunctionObject

public UserFunctionObject(carmetal.construction.Construction c)
Method Detail

setDefaults

public void setDefaults()
Overrides:
setDefaults in class ConstructionObject

setTargetDefaults

public void setTargetDefaults()
Overrides:
setTargetDefaults in class ConstructionObject

getTag

public String getTag()
Overrides:
getTag in class ConstructionObject

getN

public int getN()
Overrides:
getN in class ConstructionObject

updateText

public void updateText()
Overrides:
updateText in class ConstructionObject

isValid

public boolean isValid()

validate

public void validate()
Overrides:
validate in class ConstructionObject

setExpressions

public void setExpressions(String t,
                           String ey)

getEY

public String getEY()
Overrides:
getEY in class ConstructionObject

paint

public void paint(carmetal.rene.zirkel.graphics.MyGraphics g,
                  carmetal.rene.zirkel.ZirkelCanvas zc)
Overrides:
paint in class ConstructionObject

getValue

public double getValue()
                throws carmetal.construction.ConstructionException
Description copied from class: ConstructionObject
Get the value of an object or throw an exception (e.g. if invalid). Not all objects have a value.

Overrides:
getValue in class ConstructionObject
Throws:
carmetal.construction.ConstructionException

getValue

public double getValue(String var)
                throws carmetal.construction.ConstructionException
Throws:
carmetal.construction.ConstructionException

getDisplayValue

public String getDisplayValue()
Description copied from class: ConstructionObject
To be overridden by the objects.

Overrides:
getDisplayValue in class ConstructionObject
Returns:
The string to display the value (length, coordinates) of the object.

nearto

public boolean nearto(int cc,
                      int rr,
                      carmetal.rene.zirkel.ZirkelCanvas zc)
Description copied from class: ConstructionObject
Test, if this object is chosen with coordinates x,y

Overrides:
nearto in class ConstructionObject

printArgs

public void printArgs(carmetal.rene.util.xml.XmlWriter xml)
Overrides:
printArgs in class ConstructionObject

translate

public void translate()
Description copied from class: ConstructionObject
Override in children! This translates the mother items.

Overrides:
translate in class ConstructionObject

setFixed

public void setFixed(boolean flag)
Overrides:
setFixed in class ConstructionObject

setFixed

public void setFixed(String x,
                     String y)
Overrides:
setFixed in class ConstructionObject

fixed

public boolean fixed()
Overrides:
fixed in class ConstructionObject

getEXpos

public String getEXpos()
Overrides:
getEXpos in class ConstructionObject

getEYpos

public String getEYpos()
Overrides:
getEYpos in class ConstructionObject

onlynearto

public boolean onlynearto(int x,
                          int y,
                          carmetal.rene.zirkel.ZirkelCanvas zc)
Description copied from class: ConstructionObject
Test, if this object must be chosen with coordinates x,y, assuming it is near to these coordinates.

Overrides:
onlynearto in class ConstructionObject

equals

public boolean equals(ConstructionObject o)
Overrides:
equals in class ConstructionObject

depending

public Enumeration depending()
Description copied from class: ConstructionObject
Return an enumeration of objects, that this object depends on. This should usually called from children via super.

Overrides:
depending in class ConstructionObject

addDepending

public void addDepending(carmetal.rene.zirkel.expression.Expression E)

hasUnit

public boolean hasUnit()
Overrides:
hasUnit in class ConstructionObject

evaluateF

public double evaluateF(double[] x)
                 throws carmetal.construction.ConstructionException
Throws:
carmetal.construction.ConstructionException

evaluateF

public double evaluateF(double x)
                 throws carmetal.construction.ConstructionException
Specified by:
evaluateF in interface Evaluator
Throws:
carmetal.construction.ConstructionException

evaluateF

public double evaluateF(double x,
                        double y)
                 throws carmetal.construction.ConstructionException
Throws:
carmetal.construction.ConstructionException

maybeTransparent

public boolean maybeTransparent()
Overrides:
maybeTransparent in class ConstructionObject

canDisplayName

public boolean canDisplayName()
Overrides:
canDisplayName in class ConstructionObject

isFilledForSelect

public boolean isFilledForSelect()
Overrides:
isFilledForSelect in class ConstructionObject

getVar

public String getVar()

dragTo

public void dragTo(double x,
                   double y)
Specified by:
dragTo in interface MoveableObject

move

public void move(double x,
                 double y)
Specified by:
move in interface MoveableObject
Overrides:
move in class ConstructionObject

moveable

public boolean moveable()
Specified by:
moveable in interface MoveableObject

startDrag

public void startDrag(double x,
                      double y)
Specified by:
startDrag in interface MoveableObject

getOldX

public double getOldX()
Specified by:
getOldX in interface MoveableObject

getOldY

public double getOldY()
Specified by:
getOldY in interface MoveableObject

getX

public double getX()
Overrides:
getX in class ConstructionObject

getY

public double getY()
Overrides:
getY in class ConstructionObject

isDriverObject

public boolean isDriverObject()
Specified by:
isDriverObject in interface DriverObject
Overrides:
isDriverObject in class ConstructionObject

somethingChanged

public boolean somethingChanged()
Specified by:
somethingChanged in interface DriverObject

clearChanges

public void clearChanges()
Specified by:
clearChanges in interface DriverObject


© Copyright 2005 S.Chekanov. All Rights Reserved.
jHPlot package, a part of jHepWork: is a full-featured multiplatform data-analysis framework