carmetal.objects
Class FixedAngleObject

java.lang.Object
  extended by carmetal.objects.ConstructionObject
      extended by carmetal.objects.PrimitiveLineObject
          extended by carmetal.objects.FixedAngleObject
All Implemented Interfaces:
InsideObject, MoveableObject, PointonObject, SimulationObject, carmetal.rene.lister.Element, carmetal.rene.util.sort.SortObject, Cloneable

public class FixedAngleObject
extends PrimitiveLineObject
implements MoveableObject, SimulationObject, InsideObject


Field Summary
protected  int DisplaySize
           
static int LARGE
           
static int LARGER
           
static int NORMALSIZE
           
protected  PointObject P2
           
static int RECT
           
static int SMALL
           
 
Fields inherited from class carmetal.objects.PrimitiveLineObject
DX, DY, P1, X1, Y1
 
Fields inherited from class carmetal.objects.ConstructionObject
Back, Bold, Break, BreakHide, C, 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
FixedAngleObject(carmetal.construction.Construction c, PointObject p1, PointObject p2, double x, double y)
           
 
Method Summary
 boolean canFix()
           
 boolean canKeepClose()
           
 boolean contains(double x, double y)
          Test, if the projection of (x,y) to the line contains that point.
 double containsInside(PointObject P)
          Returns 0.5, if the point is on the boundary, and 1, if it is inside.
 Enumeration depending()
          Return an enumeration of objects, that this object depends on.
 void dragTo(double x, double y)
           
 boolean fixedByNumber()
           
 int getDisplaySize()
           
 String getDisplayValue()
          To be overridden by the objects.
 String getE()
           
 boolean getInverse()
           
 double getLength()
           
 int getN()
           
 double getOldX()
           
 double getOldY()
           
 String getTag()
           
 double getValue()
          Get the value of an object or throw an exception (e.g.
 void init(carmetal.construction.Construction c, double x, double y)
           
 void init(carmetal.construction.Construction c, double x, double y, boolean invert)
           
 boolean isDragable()
           
 boolean isEditAborted()
           
 boolean isFilled()
           
 boolean isFilledForSelect()
           
 boolean isFixed()
           
 boolean isReduced()
           
 boolean keepInside(PointObject P)
           
 void move(double x, double y)
           
 boolean moveable()
           
 boolean nearto(int c, int r, 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)
           
 Enumeration points()
           
 void printArgs(carmetal.rene.util.xml.XmlWriter xml)
           
 double project(double x, double y)
           
 void resetSimulationValue()
          Reset the old value.
 void round()
           
 void setDefaults()
           
 void setDisplaySize(int i)
           
 void setDragable(boolean f)
           
 void setEditFixed(String s)
           
 void setFilled(boolean flag)
           
 void setFixed(String s)
           
 void setInverse(boolean inverse)
           
 void setKeepClose(double x, double y)
           
 void setReduced(boolean f)
           
 void setSimulationValue(double x)
          Set the simulation value, remember the old value.
 void setTargetDefaults()
           
 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.PrimitiveLineObject
addDep, canInteresectWith, clearCircleDep, equals, getDistance, getDX, getDY, getEquation, getP1, getX, getY, intersect, intersect, intersect, isPartial, locallyLike, onlynearto, project, project, repulse, setP1DXDY, setPartial
 
Methods inherited from class carmetal.objects.ConstructionObject
addConditional, addDepInExpressions, canDisplayName, changedBy, checkConditionals, clearConditional, clearConditionals, clearParameter, compare, contains, copy, copyProperties, dependsOn, depset, depset, depset, discardMV, displays, drawCenteredLabel, drawLabel, drawLabel, drawPointLabel, edit, equals, equalsTo, fixed, getAlias, getCDPDisplayValue, getCDPSizeDisplay, getColor, getColorIndex, getColorIndex, getColorType, getColorType, getConditional, getConditionalColor, getConstruction, getDepArray, getDescription, getDisplayText, getElementColor, getElementString, getElementString, getEX, getEXpos, getExpression, getEY, getEYpos, getIncrement, getLines, getMax, getMin, getName, getNCount, getObtuse, getPointObject, getPrompt, getR, getSpecialColor, getStringLength, getText, getTranslation, getType, getUnit, getVector, getZ, hasUnit, haveConditional, haveConditionals, helpDisplayNumber, helpDisplayValue, indicated, isBack, isBack, isBold, isBreak, isBreakHide, isDriverObject, isFlag, isGotNCount, isHidden, isHidden, isHideBreak, isInConstruction, isInside, isJobTarget, isKeep, isKeepClose, isLarge, isMainParameter, isOwnedByControl, isParameter, isRekFlag, isSelectable, isSlider, isSolid, isSolid, isSpecial, isSpecialParameter, isStrongSelected, isSuperHidden, isSuperHidden, isTarget, labelSelected, laterBind, laterTranslate, maybeTransparent, mustHide, nearto, replaceExpressions, round, round, roundDisplay, save, secondaryParams, selected, setAlias, setBack, setBold, setBreak, setBreakHide, setcOffset, setColor, setColor, setColorType, setConstruction, setExpression, setFixed, setFixed, setFixed, setFlag, setFont, setGotNCount, setHidden, setHideBreak, setInConstruction, setIncrement, setIndicated, setIndicated, setInside, setJobTarget, setKeep, setKeepClose, setLabelSelected, setLarge, setLines, setMainParameter, setName, setName, setNameCheck, setNameWithNumber, setNCount, setObtuse, setOffset, setOwnedByControl, setParameter, 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

P2

protected PointObject P2

NORMALSIZE

public static final int NORMALSIZE
See Also:
Constant Field Values

SMALL

public static final int SMALL
See Also:
Constant Field Values

LARGER

public static final int LARGER
See Also:
Constant Field Values

LARGE

public static final int LARGE
See Also:
Constant Field Values

RECT

public static final int RECT
See Also:
Constant Field Values

DisplaySize

protected int DisplaySize
Constructor Detail

FixedAngleObject

public FixedAngleObject(carmetal.construction.Construction c,
                        PointObject p1,
                        PointObject p2,
                        double x,
                        double y)
Method Detail

setDefaults

public void setDefaults()
Overrides:
setDefaults in class PrimitiveLineObject

setTargetDefaults

public void setTargetDefaults()
Overrides:
setTargetDefaults in class PrimitiveLineObject

init

public void init(carmetal.construction.Construction c,
                 double x,
                 double y,
                 boolean invert)

init

public void init(carmetal.construction.Construction c,
                 double x,
                 double y)

paint

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

canKeepClose

public boolean canKeepClose()
Overrides:
canKeepClose in class PrimitiveLineObject

setKeepClose

public void setKeepClose(double x,
                         double y)
Overrides:
setKeepClose in class PrimitiveLineObject

getTag

public String getTag()
Overrides:
getTag in class PrimitiveLineObject

getN

public int getN()
Overrides:
getN in class ConstructionObject

updateText

public void updateText()
Overrides:
updateText in class ConstructionObject

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.

validate

public void validate()
Overrides:
validate in class ConstructionObject

getLength

public double getLength()

setFixed

public void setFixed(String s)
Overrides:
setFixed in class ConstructionObject

round

public void round()
Overrides:
round in class ConstructionObject

setEditFixed

public void setEditFixed(String s)

canFix

public boolean canFix()
Overrides:
canFix in class ConstructionObject

printArgs

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

nearto

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

Overrides:
nearto in class PrimitiveLineObject

setDisplaySize

public void setDisplaySize(int i)
Overrides:
setDisplaySize in class ConstructionObject

getDisplaySize

public int getDisplaySize()
Overrides:
getDisplaySize 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

translate

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

Overrides:
translate in class ConstructionObject

getE

public String getE()
Overrides:
getE 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

setFilled

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

isFilled

public boolean isFilled()
Overrides:
isFilled in class ConstructionObject

isFilledForSelect

public boolean isFilledForSelect()
Overrides:
isFilledForSelect in class ConstructionObject

contains

public boolean contains(double x,
                        double y)
Description copied from class: PrimitiveLineObject
Test, if the projection of (x,y) to the line contains that point.

Overrides:
contains in class PrimitiveLineObject

project

public double project(double x,
                      double y)
Overrides:
project in class PrimitiveLineObject

points

public Enumeration points()
Overrides:
points in class PrimitiveLineObject

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

isFixed

public boolean isFixed()
Overrides:
isFixed in class ConstructionObject

getInverse

public boolean getInverse()

setInverse

public void setInverse(boolean inverse)

isEditAborted

public boolean isEditAborted()

isDragable

public boolean isDragable()
Overrides:
isDragable in class ConstructionObject

setDragable

public void setDragable(boolean f)
Overrides:
setDragable in class ConstructionObject

isReduced

public boolean isReduced()

setReduced

public void setReduced(boolean f)

fixedByNumber

public boolean fixedByNumber()

setSimulationValue

public void setSimulationValue(double x)
Set the simulation value, remember the old value.

Specified by:
setSimulationValue in interface SimulationObject

resetSimulationValue

public void resetSimulationValue()
Reset the old value.

Specified by:
resetSimulationValue in interface SimulationObject

startDrag

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

dragTo

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

getOldX

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

getOldY

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

containsInside

public double containsInside(PointObject P)
Description copied from interface: InsideObject
Returns 0.5, if the point is on the boundary, and 1, if it is inside.

Specified by:
containsInside in interface InsideObject

keepInside

public boolean keepInside(PointObject P)
Specified by:
keepInside in interface InsideObject


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