carmetal.objects
Class PrimitiveCircleObject

java.lang.Object
  extended by carmetal.objects.ConstructionObject
      extended by carmetal.objects.PrimitiveCircleObject
All Implemented Interfaces:
InsideObject, PointonObject, carmetal.rene.lister.Element, carmetal.rene.util.sort.SortObject, Cloneable
Direct Known Subclasses:
Circle3Object, CircleObject, FixedCircleObject

public class PrimitiveCircleObject
extends ConstructionObject
implements PointonObject, InsideObject


Field Summary
protected  double R
           
protected  double X
           
protected  double Y
           
 
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
PrimitiveCircleObject(carmetal.construction.Construction c, PointObject p)
           
 
Method Summary
 void addDep(PointObject p)
          Add a point that depends on the circle.
 boolean canInteresectWith(ConstructionObject o)
           
 void clearCircleDep()
           
 void clearRange()
           
 void computeA1A2()
           
 boolean contains(double x, double y)
          Test, if the projection of (x,y) to the arc contains that point.
 double containsInside(PointObject P)
          Returns 0.5, if the point is on the boundary, and 1, if it is inside.
 ConstructionObject copy(double x, double y)
          Need to setup the Dep array.
 Enumeration depending()
          A circle depends on its midpoint at least.
 boolean equals(ConstructionObject o)
           
 double getA1()
           
 double getA2()
           
 boolean getArc()
           
 String getDisplayValue()
          To be overridden by the objects.
 int getDistance(PointObject P)
           
 PointObject getEnd()
           
 String getEquation()
           
 int getN()
           
 PointObject getP1()
           
 double getR()
           
 PointObject getStart()
           
 String getTag()
           
 double getX()
           
 double getY()
           
 boolean hasRange()
           
static carmetal.rene.zirkel.structures.Coordinates intersect(PrimitiveCircleObject c1, PrimitiveCircleObject c2)
           
 boolean isFilled()
           
 boolean isFilledForSelect()
           
 boolean isPartial()
           
 boolean keepInside(PointObject P)
           
 boolean locallyLike(ConstructionObject o)
           
 boolean maybeTransparent()
           
 boolean nearto(int c, int r, boolean ignorefill, carmetal.rene.zirkel.ZirkelCanvas zc)
          Test, if this object is chosen with coordinates x,y
 boolean nearto(int c, int r, carmetal.rene.zirkel.ZirkelCanvas zc)
          Test, if this object is chosen with coordinates x,y
 boolean onlynearto(int c, int r, 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 project(PointObject P)
           
 void project(PointObject P, double alpha)
           
 void repulse(PointObject P)
           
 Enumeration secondaryParams()
          A circle will mark the midpoint as secondary parameter.
 void setArc(boolean flag)
           
 void setDefaults()
           
 void setFilled(boolean flag)
           
 void setMR(PointObject p1, double r)
           
 void setPartial(boolean flag)
           
 void setRange(PointObject p1, PointObject p2)
           
 void setRange(String s1, String s2)
           
 void setTargetDefaults()
           
 void toggleHidden()
           
 void translate()
          Override in children! This translates the mother items.
 
Methods inherited from class carmetal.objects.ConstructionObject
addConditional, addDepInExpressions, canDisplayName, canFix, canKeepClose, changedBy, checkConditionals, clearConditional, clearConditionals, clearParameter, compare, contains, 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, getDisplaySize, getDisplayText, getE, getElementColor, getElementString, getElementString, getEX, getEXpos, getExpression, getEY, getEYpos, getIncrement, getLines, getMax, getMin, getName, getNCount, getObtuse, getPointObject, getPrompt, getSpecialColor, getStringLength, getText, getTranslation, getType, getUnit, getValue, getVector, getZ, hasUnit, haveConditional, haveConditionals, helpDisplayNumber, helpDisplayValue, indicated, isBack, isBack, isBold, isBreak, isBreakHide, isDragable, isDriverObject, isFixed, 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, move, mustHide, replaceExpressions, round, round, round, roundDisplay, save, selected, setAlias, setBack, setBold, setBreak, setBreakHide, setcOffset, setColor, setColor, setColorType, setConstruction, setDisplaySize, setDragable, setExpression, setFixed, setFixed, 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, 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, tracked, translateConditionals, translateExpressions, translateOffset, updateCircleDep, updateText, valid, validate, visible, xcOffset, ycOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X

protected double X

Y

protected double Y

R

protected double R
Constructor Detail

PrimitiveCircleObject

public PrimitiveCircleObject(carmetal.construction.Construction c,
                             PointObject p)
Method Detail

setMR

public void setMR(PointObject p1,
                  double r)

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

paint

public void paint(carmetal.rene.zirkel.graphics.MyGraphics g,
                  carmetal.rene.zirkel.ZirkelCanvas zc)
Overrides:
paint 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.

getEquation

public String getEquation()
Overrides:
getEquation in class ConstructionObject

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 ConstructionObject

nearto

public boolean nearto(int c,
                      int r,
                      boolean ignorefill,
                      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

onlynearto

public boolean onlynearto(int c,
                          int r,
                          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

getX

public double getX()
Overrides:
getX in class ConstructionObject

getY

public double getY()
Overrides:
getY in class ConstructionObject

getR

public double getR()
Overrides:
getR in class ConstructionObject

intersect

public static carmetal.rene.zirkel.structures.Coordinates intersect(PrimitiveCircleObject c1,
                                                                    PrimitiveCircleObject c2)

equals

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

setPartial

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

addDep

public void addDep(PointObject p)
Add a point that depends on the circle. Dep is used for partial display.

Parameters:
p -

clearCircleDep

public void clearCircleDep()
Overrides:
clearCircleDep in class ConstructionObject

isPartial

public boolean isPartial()
Overrides:
isPartial in class ConstructionObject

printArgs

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

copy

public ConstructionObject copy(double x,
                               double y)
Need to setup the Dep array.

Overrides:
copy in class ConstructionObject

depending

public Enumeration depending()
A circle depends on its midpoint at least. Other circles depen on more points! No circle depends on Start and End.

Overrides:
depending in class ConstructionObject

secondaryParams

public Enumeration secondaryParams()
A circle will mark the midpoint as secondary parameter.

Overrides:
secondaryParams in class ConstructionObject

toggleHidden

public void toggleHidden()
Overrides:
toggleHidden in class ConstructionObject

getP1

public PointObject getP1()

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

translate

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

Overrides:
translate in class ConstructionObject

setRange

public void setRange(String s1,
                     String s2)

setRange

public void setRange(PointObject p1,
                     PointObject p2)

getStart

public PointObject getStart()

getEnd

public PointObject getEnd()

getA1

public double getA1()

getA2

public double getA2()

hasRange

public boolean hasRange()

clearRange

public void clearRange()

maybeTransparent

public boolean maybeTransparent()
Overrides:
maybeTransparent in class ConstructionObject

locallyLike

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

getArc

public boolean getArc()

setArc

public void setArc(boolean flag)

computeA1A2

public void computeA1A2()

contains

public boolean contains(double x,
                        double y)
Test, if the projection of (x,y) to the arc contains that point.


project

public void project(PointObject P)
Specified by:
project in interface PointonObject

getDistance

public int getDistance(PointObject P)
Overrides:
getDistance in class ConstructionObject

project

public void project(PointObject P,
                    double alpha)
Specified by:
project in interface PointonObject

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

canInteresectWith

public boolean canInteresectWith(ConstructionObject o)
Specified by:
canInteresectWith in interface PointonObject

repulse

public void repulse(PointObject P)
Specified by:
repulse in interface PointonObject


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