carmetal.objects
Class ConstructionObject

java.lang.Object
  extended by carmetal.objects.ConstructionObject
All Implemented Interfaces:
carmetal.rene.lister.Element, carmetal.rene.util.sort.SortObject, Cloneable
Direct Known Subclasses:
AngleObject, AreaObject, EquationXYObject, ExpressionObject, FunctionObject, ImageObject, PointObject, PrimitiveCircleObject, PrimitiveLineObject, QuadricObject, TextObject, TrackObject, UserFunctionObject

public class ConstructionObject
extends Object
implements Cloneable, carmetal.rene.util.sort.SortObject, carmetal.rene.lister.Element


Field Summary
protected  boolean Back
           
protected  boolean Bold
           
protected  boolean Break
           
protected  boolean BreakHide
           
protected  Color C
           
protected  carmetal.construction.Construction Cn
           
protected  int ColorIndex
           
protected  int ColorType
          object color and static default color
protected  Vector Conditionals
           
protected static int Count
           
static int DescriptionState
           
protected  boolean DisplaysText
           
static carmetal.construction.DepList DL
           
 boolean Flag
           
static int FormulaState
           
protected  boolean gotNCount
           
 boolean HasZ
           
protected  boolean Hidden
           
protected  boolean HideBreak
           
protected  boolean inConstruction
           
protected  boolean Indicated
           
static int INVISIBLE
           
 boolean IsDrawn
           
protected  boolean JobTarget
           
protected  boolean Keep
           
protected  boolean KeepClose
           
protected  boolean LabelSelected
           
protected  boolean Large
           
protected  boolean MainParameter
           
protected  String Name
           
protected  int NCount
           
 boolean NeedsRecompute
           
static int NORMAL
           
protected  boolean Obtuse
           
protected  boolean Parameter
           
 boolean RekFlag
           
 boolean RekValidating
           
 int Scratch
           
protected  boolean Selectable
           
protected  boolean Selected
           
protected  boolean ShowIndicatedName
           
protected  boolean ShowName
           
protected  boolean ShowValue
           
static int SizeState
           
protected  boolean Solid
           
protected  Color SpecialColor
           
 boolean SpecialParameter
           
protected  boolean StrongSelected
           
protected  boolean SuperHidden
           
protected  boolean Target
           
protected  String Text
           
static int THICK
           
static int THIN
           
protected  boolean Tracked
           
protected  ConstructionObject Translation
           
protected  double TX1
           
protected  double TX2
           
protected  double TY1
           
protected  double TY2
           
protected  String Unit
           
protected  boolean Valid
           
 double Value
           
 carmetal.rene.util.MyVector VRek
          A general workplace for rekursive validation.
protected  double XcOffset
           
protected  double YcOffset
           
 
Constructor Summary
ConstructionObject(carmetal.construction.Construction c)
           
ConstructionObject(carmetal.construction.Construction c, String name)
           
 
Method Summary
 void addConditional(String tag, carmetal.rene.zirkel.expression.Expression expr)
           
 void addDepInExpressions(String s)
          Add the dependencies in expressions in %...% in the string.
 boolean canDisplayName()
           
 boolean canFix()
           
 boolean canKeepClose()
           
 double changedBy()
           
 void checkConditionals()
           
 void clearCircleDep()
           
 void clearConditional(String tag)
           
 void clearConditionals()
           
 void clearParameter()
           
 int compare(carmetal.rene.util.sort.SortObject o)
           
 boolean contains(PointObject p)
           
 ConstructionObject copy(double x, double y)
          This clones the object for macro construction.
 void copyProperties(ConstructionObject origin)
           
 Enumeration depending()
          Return an enumeration of objects, that this object depends on.
 boolean dependsOn(ConstructionObject o)
          Test, if the object directly depends on another object.
 Enumeration depset(ConstructionObject o1)
           
 Enumeration depset(ConstructionObject o1, ConstructionObject o2)
           
 Enumeration depset(ConstructionObject o1, ConstructionObject o2, ConstructionObject o3)
           
 void discardMV()
          MyVector no longer needed.
 boolean displays(carmetal.rene.zirkel.ZirkelCanvas zc)
           
 void drawCenteredLabel(carmetal.rene.zirkel.graphics.MyGraphics g, String s, carmetal.rene.zirkel.ZirkelCanvas zc, double x, double y, double xo, double yo)
          Service routine to draw a string centered at x,y
 void drawLabel(carmetal.rene.zirkel.graphics.MyGraphics g, String s)
          Service routine to draw a string from upper left coordinates.
 void drawLabel(carmetal.rene.zirkel.graphics.MyGraphics g, String s, carmetal.rene.zirkel.ZirkelCanvas zc, double x, double y, double vx, double vy, double xo, double yo)
          Service routine to draw a string at x,y but offset into direction -vy,vx so that it does not intersect the direction vx,vy.
 void drawPointLabel(carmetal.rene.zirkel.graphics.MyGraphics g, String s, carmetal.rene.zirkel.ZirkelCanvas zc, double x, double y, double vx, double vy, double xo, double yo)
          Service routine to draw a string at x,y but offset into direction -vy,vx so that it does not intersect the direction vx,vy.
 void edit(carmetal.rene.zirkel.ZirkelCanvas zc, boolean forcevisible, boolean forcefocus)
           
 boolean equals(ConstructionObject o)
           
 boolean equals(double x, double y)
           
 boolean equalsTo(ConstructionObject o)
           
 boolean fixed()
           
 String getAlias()
           
 String getCDPDisplayValue()
           
 String getCDPSizeDisplay()
           
 Color getColor()
           
 int getColorIndex()
           
 int getColorIndex(boolean original)
          Get the current color index.
 int getColorType()
           
 int getColorType(boolean original)
           
 carmetal.rene.zirkel.expression.Expression getConditional(String tag)
           
 int getConditionalColor()
           
 carmetal.construction.Construction getConstruction()
           
 ConstructionObject[] getDepArray()
           
 String getDescription()
           
 int getDisplaySize()
           
 String getDisplayText()
           
 String getDisplayValue()
          To be overridden by the objects.
 int getDistance(PointObject P)
           
 String getE()
           
 Color getElementColor()
          Get a color for the element in the display color.
 String getElementString()
           
 String getElementString(int state)
          Get a display string for the Lister class.
 String getEquation()
           
 String getEX()
           
 String getEXpos()
           
 String getExpression()
           
 String getEY()
           
 String getEYpos()
           
 double getIncrement()
           
 String getLines()
           
 String getMax()
           
 String getMin()
           
 int getN()
           
 String getName()
           
 int getNCount()
           
 boolean getObtuse()
           
static PointObject getPointObject(carmetal.rene.zirkel.expression.Expression E)
          Service function to extract a point from an expression
 String getPrompt()
           
 double getR()
           
 Color getSpecialColor()
           
 String getStringLength()
           
 String getTag()
           
 String getText()
           
 ConstructionObject getTranslation()
          This is used to define macros and run them.
 int getType()
           
 String getUnit()
           
 double getValue()
          Get the value of an object or throw an exception (e.g.
 carmetal.rene.util.MyVector getVector()
          Get an empty MyVector.
 double getX()
           
 double getY()
           
 double getZ()
          Get the z-buffer for this object.
 boolean hasUnit()
           
 boolean haveConditional(String tag)
           
 boolean haveConditionals()
           
 String helpDisplayNumber(boolean start, double x)
           
 String helpDisplayValue(boolean start, double x, String tag)
           
 boolean indicated()
           
 boolean isBack()
           
 boolean isBack(boolean original)
           
 boolean isBold()
           
 boolean isBreak()
           
 boolean isBreakHide()
           
 boolean isDragable()
           
 boolean isDriverObject()
           
 boolean isFilled()
           
 boolean isFilledForSelect()
           
 boolean isFixed()
           
 boolean isFlag()
           
 boolean isGotNCount()
           
 boolean isHidden()
           
 boolean isHidden(boolean original)
           
 boolean isHideBreak()
           
 boolean isInConstruction()
           
 boolean isInside()
           
 boolean isJobTarget()
           
 boolean isKeep()
           
 boolean isKeepClose()
           
 boolean isLarge()
           
 boolean isMainParameter()
           
 boolean isOwnedByControl()
           
 boolean isParameter()
           
 boolean isPartial()
           
 boolean isRekFlag()
           
 boolean isSelectable()
           
 boolean isSlider()
           
 boolean isSolid()
           
 boolean isSolid(boolean original)
           
 boolean isSpecial()
           
 boolean isSpecialParameter()
           
 boolean isStrongSelected()
           
 boolean isSuperHidden()
           
 boolean isSuperHidden(boolean original)
           
 boolean isTarget()
           
 boolean labelSelected()
           
 void laterBind(carmetal.construction.Construction c)
          This is called after the loading of a construction has been finished.
 void laterTranslate(carmetal.construction.Construction c)
          This is called after macro definition or execution is complete.
 boolean locallyLike(ConstructionObject o)
           
 boolean maybeTransparent()
           
 void move(double x, double y)
           
 boolean mustHide(carmetal.rene.zirkel.ZirkelCanvas zc)
           
 boolean nearto(int x, int y, boolean ignorefill, carmetal.rene.zirkel.ZirkelCanvas zc)
          Test, if this object is chosen with coordinates x,y
 boolean nearto(int x, int y, 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)
           
 String replaceExpressions(String s)
          Replace the expression in %...% by their values
 void round()
           
 double round(double x)
          Service function to round a value.
 double round(double x, double Rounder)
           
 double roundDisplay(double x)
           
 void save(carmetal.rene.util.xml.XmlWriter xml)
          Save the object in XML form.
 Enumeration secondaryParams()
          Return an enumeration of objects, which can be set as secondary parameters, whenever this object is selected as main parameter.
 boolean selected()
           
 void setAlias(String s)
           
 void setBack(boolean flag)
           
 void setBold(boolean bold)
           
 void setBreak(boolean flag)
           
 void setBreakHide(boolean flag)
           
 void setcOffset(double x, double y)
           
 void setColor(int index)
          Set the object color by index.
 void setColor(int index, Color col)
          Set the object color by index.
 void setColorType(int type)
           
 void setConstruction(carmetal.construction.Construction c)
           
 void setDefaults()
           
 void setDisplaySize(int i)
           
 void setDragable(boolean f)
           
 void setExpression(String expr, carmetal.construction.Construction c)
           
 void setFilled(boolean flag)
           
 void setFixed(boolean bool)
           
 void setFixed(boolean bool, String r)
           
 void setFixed(String o)
           
 void setFixed(String x, String y)
           
 void setFlag(boolean flag)
           
 void setFont(carmetal.rene.zirkel.graphics.MyGraphics g)
           
 void setGotNCount(boolean gotNCount)
           
 void setHidden(boolean flag)
           
 void setHideBreak(boolean flag)
           
 void setInConstruction(boolean flag)
           
 void setIncrement(double inc)
           
 void setIndicated(boolean f)
           
 void setIndicated(boolean f, boolean showname)
           
 void setInside(boolean flag)
           
 void setJobTarget(boolean flag)
           
 void setKeep(boolean flag)
           
 void setKeepClose(boolean flag)
           
 void setKeepClose(double x, double y)
           
 void setLabelSelected(boolean flag)
           
 void setLarge(boolean large)
           
 void setLines(String o)
           
 void setMainParameter(boolean b)
           
 void setName()
          Sets a unique name for the object.
 void setName(String n)
           
 void setNameCheck(String n)
           
 void setNameWithNumber(String n)
           
 void setNCount(int count)
           
 void setObtuse(boolean flag)
           
 void setOffset(int x, int y)
           
 void setOwnedByControl(boolean b)
           
 void setParameter(boolean b)
           
 void setPartial(boolean bool)
           
 void setPrompt(String prompt)
           
 void setRekFlag(boolean flag)
           
 void setSelectable(boolean flag)
           
 void setSelected(boolean flag)
           
 void setShowName(boolean f)
           
 void setShowValue(boolean f)
           
 void setSlider(boolean bool)
           
 void setSlider(String smin, String smax)
           
 void setSolid(boolean solid)
           
 void setSpecial(boolean f)
           
 void setSpecialColor(Color c)
           
 void setSpecialParameter(boolean flag)
           
 void setStrongSelected(boolean flag)
           
 void setSuperHidden(boolean flag)
           
 void setTarget(boolean flag)
           
 void setTargetDefaults()
           
 void setText(String s)
           
 void setText(String s, boolean user)
           
 void setTracked(boolean flag)
           
 void setTranslation(ConstructionObject t)
           
 void setType(int i)
           
 void setUnit(String s)
           
 boolean showName()
           
 boolean showName(boolean original)
           
 boolean showValue()
           
 boolean showValue(boolean original)
           
 void snap(carmetal.rene.zirkel.ZirkelCanvas zc)
           
 boolean testConditional(String tag)
          Test if the conditional "tag" evaluates to true.
static String text1(String format, String s1)
          Routines to parse descriptive text in various languages.
static String text2(String format, String s1, String s2)
           
static String text3(String format, String s1, String s2, String s3)
           
static String text4(String format, String s1, String s2, String s3, String s4)
           
static String textAny(String format, String[] ss)
           
 boolean textcontains(int x, int y, carmetal.rene.zirkel.ZirkelCanvas zc)
           
 void toggleHidden()
           
 boolean tracked()
           
 void translate()
          Override in children! This translates the mother items.
 void translateConditionals()
           
 String translateExpressions(String s)
          Replace the expression in %...% by their translated epressions.
 void translateOffset(carmetal.rene.zirkel.ZirkelCanvas zc)
           
 void updateCircleDep()
           
 void updateText()
           
 boolean valid()
           
 void validate()
           
 boolean visible(carmetal.rene.zirkel.ZirkelCanvas zc)
           
 double xcOffset()
           
 double ycOffset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ColorType

protected int ColorType
object color and static default color


NORMAL

public static final int NORMAL
See Also:
Constant Field Values

THICK

public static final int THICK
See Also:
Constant Field Values

THIN

public static final int THIN
See Also:
Constant Field Values

INVISIBLE

public static final int INVISIBLE
See Also:
Constant Field Values

C

protected Color C

SpecialColor

protected Color SpecialColor

ColorIndex

protected int ColorIndex

Tracked

protected boolean Tracked

Selected

protected boolean Selected

StrongSelected

protected boolean StrongSelected

Indicated

protected boolean Indicated

ShowIndicatedName

protected boolean ShowIndicatedName

LabelSelected

protected boolean LabelSelected

Valid

protected boolean Valid

Hidden

protected boolean Hidden

SuperHidden

protected boolean SuperHidden

BreakHide

protected boolean BreakHide

ShowName

protected boolean ShowName

ShowValue

protected boolean ShowValue

Selectable

protected boolean Selectable

Name

protected String Name

Count

protected static int Count

Text

protected String Text

XcOffset

protected double XcOffset

YcOffset

protected double YcOffset

KeepClose

protected boolean KeepClose

DisplaysText

protected boolean DisplaysText

TX1

protected double TX1

TY1

protected double TY1

TX2

protected double TX2

TY2

protected double TY2

Cn

protected carmetal.construction.Construction Cn

MainParameter

protected boolean MainParameter

Parameter

protected boolean Parameter

Target

protected boolean Target

Flag

public boolean Flag

RekFlag

public boolean RekFlag

IsDrawn

public boolean IsDrawn

HasZ

public boolean HasZ

Scratch

public int Scratch

Keep

protected boolean Keep

JobTarget

protected boolean JobTarget

Translation

protected ConstructionObject Translation

Back

protected boolean Back

Obtuse

protected boolean Obtuse

Break

protected boolean Break

HideBreak

protected boolean HideBreak

Solid

protected boolean Solid

inConstruction

protected boolean inConstruction

Unit

protected String Unit

Bold

protected boolean Bold

Large

protected boolean Large

Conditionals

protected Vector Conditionals

NCount

protected int NCount

gotNCount

protected boolean gotNCount

NeedsRecompute

public boolean NeedsRecompute

DL

public static carmetal.construction.DepList DL

Value

public double Value

VRek

public carmetal.rene.util.MyVector VRek
A general workplace for rekursive validation. VRek gets the elements that need to be updated.


RekValidating

public boolean RekValidating

DescriptionState

public static final int DescriptionState
See Also:
Constant Field Values

FormulaState

public static final int FormulaState
See Also:
Constant Field Values

SizeState

public static final int SizeState
See Also:
Constant Field Values

SpecialParameter

public boolean SpecialParameter
Constructor Detail

ConstructionObject

public ConstructionObject(carmetal.construction.Construction c)

ConstructionObject

public ConstructionObject(carmetal.construction.Construction c,
                          String name)
Method Detail

copyProperties

public void copyProperties(ConstructionObject origin)

isGotNCount

public boolean isGotNCount()

setGotNCount

public void setGotNCount(boolean gotNCount)

isDriverObject

public boolean isDriverObject()

setName

public void setName()
Sets a unique name for the object. Should be overriden in all items.


getN

public int getN()

getTag

public String getTag()

getTranslation

public ConstructionObject getTranslation()
This is used to define macros and run them. The items of the construction are translated to macro items.


setTranslation

public void setTranslation(ConstructionObject t)

translate

public void translate()
Override in children! This translates the mother items.


paint

public void paint(carmetal.rene.zirkel.graphics.MyGraphics g,
                  carmetal.rene.zirkel.ZirkelCanvas zc)

nearto

public boolean nearto(int x,
                      int y,
                      carmetal.rene.zirkel.ZirkelCanvas zc)
Test, if this object is chosen with coordinates x,y


nearto

public boolean nearto(int x,
                      int y,
                      boolean ignorefill,
                      carmetal.rene.zirkel.ZirkelCanvas zc)
Test, if this object is chosen with coordinates x,y


onlynearto

public 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.


textcontains

public boolean textcontains(int x,
                            int y,
                            carmetal.rene.zirkel.ZirkelCanvas zc)

setTracked

public void setTracked(boolean flag)

setSelected

public void setSelected(boolean flag)

setStrongSelected

public void setStrongSelected(boolean flag)

isStrongSelected

public boolean isStrongSelected()

selected

public boolean selected()

tracked

public boolean tracked()

setLabelSelected

public void setLabelSelected(boolean flag)

isSelectable

public boolean isSelectable()

validate

public void validate()

valid

public boolean valid()

displays

public boolean displays(carmetal.rene.zirkel.ZirkelCanvas zc)

indicated

public boolean indicated()

setIndicated

public void setIndicated(boolean f)

setIndicated

public void setIndicated(boolean f,
                         boolean showname)

changedBy

public double changedBy()
Returns:
The change of the last validation for points bound to lines, which are defined later.

text1

public static String text1(String format,
                           String s1)
Routines to parse descriptive text in various languages.


text2

public static String text2(String format,
                           String s1,
                           String s2)

text3

public static String text3(String format,
                           String s1,
                           String s2,
                           String s3)

text4

public static String text4(String format,
                           String s1,
                           String s2,
                           String s3,
                           String s4)

textAny

public static String textAny(String format,
                             String[] ss)

setText

public void setText(String s,
                    boolean user)

setText

public void setText(String s)

getText

public String getText()

labelSelected

public boolean labelSelected()

setColor

public void setColor(int index)
Set the object color by index.


setColor

public void setColor(int index,
                     Color col)
Set the object color by index.

Parameters:
index -
col -

getColorIndex

public int getColorIndex(boolean original)
Get the current color index. If there is a conditional for the color, test it and use it.


getConditionalColor

public int getConditionalColor()

getSpecialColor

public Color getSpecialColor()

setSpecialColor

public void setSpecialColor(Color c)

getColorIndex

public int getColorIndex()

getColor

public Color getColor()

mustHide

public boolean mustHide(carmetal.rene.zirkel.ZirkelCanvas zc)

setHidden

public void setHidden(boolean flag)

setSuperHidden

public void setSuperHidden(boolean flag)

toggleHidden

public void toggleHidden()

isHidden

public boolean isHidden(boolean original)

isHidden

public boolean isHidden()

isSuperHidden

public boolean isSuperHidden(boolean original)

isSuperHidden

public boolean isSuperHidden()

getName

public String getName()

setName

public void setName(String n)

setNameCheck

public void setNameCheck(String n)
                  throws carmetal.construction.ConstructionException
Throws:
carmetal.construction.ConstructionException

setNameWithNumber

public void setNameWithNumber(String n)

edit

public void edit(carmetal.rene.zirkel.ZirkelCanvas zc,
                 boolean forcevisible,
                 boolean forcefocus)

drawLabel

public void drawLabel(carmetal.rene.zirkel.graphics.MyGraphics g,
                      String s)
Service routine to draw a string from upper left coordinates. Position is at TX1, TX2.


setFont

public void setFont(carmetal.rene.zirkel.graphics.MyGraphics g)

drawCenteredLabel

public void drawCenteredLabel(carmetal.rene.zirkel.graphics.MyGraphics g,
                              String s,
                              carmetal.rene.zirkel.ZirkelCanvas zc,
                              double x,
                              double y,
                              double xo,
                              double yo)
Service routine to draw a string centered at x,y


drawLabel

public void drawLabel(carmetal.rene.zirkel.graphics.MyGraphics g,
                      String s,
                      carmetal.rene.zirkel.ZirkelCanvas zc,
                      double x,
                      double y,
                      double vx,
                      double vy,
                      double xo,
                      double yo)
Service routine to draw a string at x,y but offset into direction -vy,vx so that it does not intersect the direction vx,vy. r=(vx,vy) is assumed to be normalized.


drawPointLabel

public void drawPointLabel(carmetal.rene.zirkel.graphics.MyGraphics g,
                           String s,
                           carmetal.rene.zirkel.ZirkelCanvas zc,
                           double x,
                           double y,
                           double vx,
                           double vy,
                           double xo,
                           double yo)
Service routine to draw a string at x,y but offset into direction -vy,vx so that it does not intersect the direction vx,vy. r=(vx,vy) is assumed to be normalized.


save

public void save(carmetal.rene.util.xml.XmlWriter xml)
Save the object in XML form.


printArgs

public void printArgs(carmetal.rene.util.xml.XmlWriter xml)

updateText

public void updateText()

setConstruction

public void setConstruction(carmetal.construction.Construction c)

showName

public boolean showName(boolean original)

showName

public boolean showName()

setShowName

public void setShowName(boolean f)

showValue

public boolean showValue(boolean original)

showValue

public boolean showValue()

setShowValue

public void setShowValue(boolean f)

getDisplayText

public String getDisplayText()

replaceExpressions

public String replaceExpressions(String s)
Replace the expression in %...% by their values

Parameters:
s -
zc - may be null (no direct search of object)
Returns:

addDepInExpressions

public void addDepInExpressions(String s)
Add the dependencies in expressions in %...% in the string.

Parameters:
s -
zc - may be null (no direct search of object)

translateExpressions

public String translateExpressions(String s)
Replace the expression in %...% by their translated epressions.

Parameters:
s -
zc - may be null (no direct search of object)
Returns:

getDisplayValue

public String getDisplayValue()
To be overridden by the objects.

Returns:
The string to display the value (length, coordinates) of the object.

getCDPDisplayValue

public String getCDPDisplayValue()

getCDPSizeDisplay

public String getCDPSizeDisplay()

round

public double round(double x)
Service function to round a value.


roundDisplay

public double roundDisplay(double x)

round

public double round(double x,
                    double Rounder)

setcOffset

public void setcOffset(double x,
                       double y)

xcOffset

public double xcOffset()

ycOffset

public double ycOffset()

setOffset

public void setOffset(int x,
                      int y)

isKeepClose

public boolean isKeepClose()

setKeepClose

public void setKeepClose(double x,
                         double y)

setKeepClose

public void setKeepClose(boolean flag)

canKeepClose

public boolean canKeepClose()

translateOffset

public void translateOffset(carmetal.rene.zirkel.ZirkelCanvas zc)

getColorType

public int getColorType(boolean original)

getColorType

public int getColorType()

setColorType

public void setColorType(int type)

isParameter

public boolean isParameter()

isMainParameter

public boolean isMainParameter()

clearParameter

public void clearParameter()

setMainParameter

public void setMainParameter(boolean b)

setParameter

public void setParameter(boolean b)

depending

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


dependsOn

public boolean dependsOn(ConstructionObject o)
Test, if the object directly depends on another object.


secondaryParams

public Enumeration secondaryParams()
Return an enumeration of objects, which can be set as secondary parameters, whenever this object is selected as main parameter.


getDepArray

public ConstructionObject[] getDepArray()

depset

public Enumeration depset(ConstructionObject o1)

depset

public Enumeration depset(ConstructionObject o1,
                          ConstructionObject o2)

depset

public Enumeration depset(ConstructionObject o1,
                          ConstructionObject o2,
                          ConstructionObject o3)

setFlag

public void setFlag(boolean flag)

isFlag

public boolean isFlag()

setRekFlag

public void setRekFlag(boolean flag)

isRekFlag

public boolean isRekFlag()

setTarget

public void setTarget(boolean flag)

isTarget

public boolean isTarget()

setKeep

public void setKeep(boolean flag)

isOwnedByControl

public boolean isOwnedByControl()

setOwnedByControl

public void setOwnedByControl(boolean b)

isKeep

public boolean isKeep()

equalsTo

public boolean equalsTo(ConstructionObject o)

equals

public boolean equals(ConstructionObject o)

equals

public boolean equals(double x,
                      double y)

setJobTarget

public void setJobTarget(boolean flag)

isJobTarget

public boolean isJobTarget()

updateCircleDep

public void updateCircleDep()

clearCircleDep

public void clearCircleDep()

copy

public ConstructionObject copy(double x,
                               double y)
This clones the object for macro construction. NOTE: This must be overriden in all items to translate the mother objects.


getConstruction

public carmetal.construction.Construction getConstruction()

getValue

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

Throws:
carmetal.construction.ConstructionException

setDefaults

public void setDefaults()

setTargetDefaults

public void setTargetDefaults()

contains

public boolean contains(PointObject p)

canFix

public boolean canFix()

setFixed

public void setFixed(String o)

isBack

public boolean isBack(boolean original)

isBack

public boolean isBack()

setBack

public void setBack(boolean flag)

setInConstruction

public void setInConstruction(boolean flag)

isInConstruction

public boolean isInConstruction()

laterBind

public void laterBind(carmetal.construction.Construction c)
This is called after the loading of a construction has been finished. PointObject uses this to bind to a line or circle, which is defined AFTER it.

Parameters:
c - The construction this object is in.

laterTranslate

public void laterTranslate(carmetal.construction.Construction c)
This is called after macro definition or execution is complete. PrimitiveCircleObject uses it to translate the restriction points in its copy.

Parameters:
c - The construction this object is in.

setFilled

public void setFilled(boolean flag)

isFilled

public boolean isFilled()

isFilledForSelect

public boolean isFilledForSelect()

getObtuse

public boolean getObtuse()

setObtuse

public void setObtuse(boolean flag)

getDescription

public String getDescription()

round

public void round()

isFixed

public boolean isFixed()

isBreak

public boolean isBreak()

setBreak

public void setBreak(boolean flag)

isHideBreak

public boolean isHideBreak()

setHideBreak

public void setHideBreak(boolean flag)

isSolid

public boolean isSolid(boolean original)

isSolid

public boolean isSolid()

setSolid

public void setSolid(boolean solid)

maybeTransparent

public boolean maybeTransparent()

locallyLike

public boolean locallyLike(ConstructionObject o)

compare

public int compare(carmetal.rene.util.sort.SortObject o)
Specified by:
compare in interface carmetal.rene.util.sort.SortObject

setSelectable

public void setSelectable(boolean flag)

snap

public void snap(carmetal.rene.zirkel.ZirkelCanvas zc)

getUnit

public String getUnit()

setUnit

public void setUnit(String s)

hasUnit

public boolean hasUnit()

isBreakHide

public boolean isBreakHide()

setBreakHide

public void setBreakHide(boolean flag)

getEquation

public String getEquation()

helpDisplayValue

public String helpDisplayValue(boolean start,
                               double x,
                               String tag)

helpDisplayNumber

public String helpDisplayNumber(boolean start,
                                double x)

visible

public boolean visible(carmetal.rene.zirkel.ZirkelCanvas zc)

isBold

public boolean isBold()

setBold

public void setBold(boolean bold)

isLarge

public boolean isLarge()

setLarge

public void setLarge(boolean large)

addConditional

public void addConditional(String tag,
                           carmetal.rene.zirkel.expression.Expression expr)

getConditional

public carmetal.rene.zirkel.expression.Expression getConditional(String tag)

haveConditional

public boolean haveConditional(String tag)

testConditional

public boolean testConditional(String tag)
Test if the conditional "tag" evaluates to true.

Parameters:
tag -

clearConditionals

public void clearConditionals()

translateConditionals

public void translateConditionals()

haveConditionals

public boolean haveConditionals()

checkConditionals

public void checkConditionals()
                       throws carmetal.construction.ConstructionException
Throws:
carmetal.construction.ConstructionException

getZ

public double getZ()
            throws carmetal.construction.ConstructionException
Get the z-buffer for this object.

Returns:
double value z
Throws:
carmetal.construction.ConstructionException

canDisplayName

public boolean canDisplayName()

getNCount

public int getNCount()

setNCount

public void setNCount(int count)

getAlias

public String getAlias()

setAlias

public void setAlias(String s)

getElementString

public String getElementString(int state)
Get a display string for the Lister class.

Specified by:
getElementString in interface carmetal.rene.lister.Element

getElementString

public String getElementString()
Specified by:
getElementString in interface carmetal.rene.lister.Element

getElementColor

public Color getElementColor()
Get a color for the element in the display color.

Specified by:
getElementColor in interface carmetal.rene.lister.Element

isSpecialParameter

public boolean isSpecialParameter()

setSpecialParameter

public void setSpecialParameter(boolean flag)

getPointObject

public static PointObject getPointObject(carmetal.rene.zirkel.expression.Expression E)
Service function to extract a point from an expression

Parameters:
E -
Returns:
point object or null

getVector

public carmetal.rene.util.MyVector getVector()
Get an empty MyVector.

Returns:
MyVector instance

discardMV

public void discardMV()
MyVector no longer needed.


getX

public double getX()

getY

public double getY()

getR

public double getR()

setType

public void setType(int i)

getType

public int getType()

isPartial

public boolean isPartial()

setPartial

public void setPartial(boolean bool)

setDisplaySize

public void setDisplaySize(int i)

getDisplaySize

public int getDisplaySize()

setExpression

public void setExpression(String expr,
                          carmetal.construction.Construction c)
                   throws carmetal.construction.ConstructionException
Throws:
carmetal.construction.ConstructionException

getExpression

public String getExpression()

fixed

public boolean fixed()

getEX

public String getEX()

getEY

public String getEY()

getEXpos

public String getEXpos()

getEYpos

public String getEYpos()

setFixed

public void setFixed(boolean bool)

setFixed

public void setFixed(String x,
                     String y)

setFixed

public void setFixed(boolean bool,
                     String r)
              throws carmetal.construction.ConstructionException
Throws:
carmetal.construction.ConstructionException

move

public void move(double x,
                 double y)

getPrompt

public String getPrompt()

setPrompt

public void setPrompt(String prompt)

getMin

public String getMin()

getMax

public String getMax()

getDistance

public int getDistance(PointObject P)

setSlider

public void setSlider(String smin,
                      String smax)

setSlider

public void setSlider(boolean bool)

isSlider

public boolean isSlider()

getStringLength

public String getStringLength()

setDragable

public void setDragable(boolean f)

isDragable

public boolean isDragable()

getE

public String getE()

getLines

public String getLines()

setLines

public void setLines(String o)

getIncrement

public double getIncrement()

setIncrement

public void setIncrement(double inc)

isInside

public boolean isInside()

setInside

public void setInside(boolean flag)

isSpecial

public boolean isSpecial()

setSpecial

public void setSpecial(boolean f)

clearConditional

public void clearConditional(String tag)


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