|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcarmetal.objects.ConstructionObject
carmetal.objects.PointObject
public class PointObject
An object representing a single point
| Field Summary | |
|---|---|
protected double |
Alpha
|
protected boolean |
AlphaValid
|
protected boolean |
BarycentricCoordsInitialzed
|
static int |
CIRCLE
|
static int |
CROSS
|
static int |
DCROSS
|
static int |
DIAMOND
|
static int |
DOT
|
protected carmetal.rene.zirkel.expression.Expression |
EX
|
protected carmetal.rene.zirkel.expression.Expression |
EY
|
protected boolean |
Fixed
|
protected double |
Gx
|
protected double |
Gy
|
static int |
MaxType
|
protected boolean |
Moveable
|
protected ConstructionObject |
MovedBy
|
static int |
SQUARE
|
protected int |
Type
|
protected boolean |
UseAlpha
|
ConstructionObject |
VirtualBound
|
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 | |
|---|---|
PointObject(carmetal.construction.Construction c,
double x,
double y)
Draw a point |
|
PointObject(carmetal.construction.Construction c,
double x,
double y,
ConstructionObject bound)
|
|
PointObject(carmetal.construction.Construction c,
String name)
|
|
| Method Summary | |
|---|---|
void |
addMagnetObject(String s)
s represents the name of an object, or the string "name:ray" where ray is the specific magnetic attraction |
void |
alea()
|
boolean |
canKeepClose()
|
double |
changedBy()
|
void |
clearBoundOrder()
|
void |
clearChanges()
|
void |
clearMagnetObjects()
|
void |
computeBarycentricCoords()
|
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 |
dependsOnItselfOnly()
Check if the point depends on itself and no other object. |
boolean |
dependsOnParametersOnly()
|
double |
distanceTo(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
|
boolean |
dontUpdate()
|
void |
dontUpdate(boolean flag)
|
void |
dragTo(double x,
double y)
|
static double |
drawPoint(carmetal.rene.zirkel.graphics.MyGraphics g,
carmetal.rene.zirkel.ZirkelCanvas zc,
ConstructionObject o,
double X,
double Y,
int type)
|
boolean |
equals(ConstructionObject o)
|
boolean |
fixed()
|
void |
followMagnetObject()
|
double |
getAlpha()
|
ConstructionObject |
getBound()
|
double |
getBoundOrder()
|
String |
getCDPDisplayValue()
|
ConstructionObject |
getCurrentMagnetObject()
|
String |
getDisplayValue()
To be overridden by the objects. |
int |
getDistance(PointObject P)
|
String |
getEX()
|
String |
getEY()
|
double |
getIncrement()
|
Vector |
getMagnetObjects()
|
String |
getMagnetObjectsString()
|
int |
getMagnetRay()
|
String |
getMagnetRayExp()
|
int |
getN()
|
double |
getOldX()
|
double |
getOldY()
|
String |
getTag()
|
int |
getType()
|
double |
getX()
|
double |
getY()
|
boolean |
haveBoundOrder()
|
boolean |
insidewindow()
|
boolean |
insidewindow(double x,
double y)
|
boolean |
isDriverObject()
|
boolean |
isInside()
|
boolean |
isMagnet()
|
boolean |
isOn(ConstructionObject o)
|
boolean |
isPointOn()
|
boolean |
isPointOnOrMagnet()
|
void |
laterBind(carmetal.construction.Construction c)
This is called after the loading of a construction has been finished. |
void |
magnet()
|
void |
move(double x,
double y)
|
boolean |
moveable()
|
boolean |
moveableBy(ConstructionObject o)
|
boolean |
moveablePoint()
|
void |
movedBy(ConstructionObject o)
|
boolean |
nearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
Test, if this object is chosen with coordinates x,y |
boolean |
nearto(PointObject p)
|
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(ConstructionObject o)
|
void |
project(ConstructionObject o,
double alpha)
|
void |
removeMagnetObject(String name)
|
void |
round()
|
void |
selectMagnetObjects(boolean b)
|
void |
setA(double alpha)
|
void |
setAlpha(double alpha)
|
void |
setBound(ConstructionObject bound)
|
boolean |
setBound(String name)
|
void |
setBoundOrder(double boundorder)
|
void |
setCurrentMagnetObject()
|
void |
setDefaults()
|
void |
setFixed(boolean flag)
|
void |
setFixed(String x,
String y)
|
void |
setHalfIncrement(carmetal.rene.zirkel.ZirkelCanvas zc)
|
void |
setIncrement(double inc)
|
void |
setInside(boolean flag)
|
void |
setKeepClose(double x,
double y)
For bounded points. |
void |
setLaterBind(String s)
|
void |
setMagnetObjects(String namelist)
|
void |
setMagnetRayExp(String s)
|
void |
setMoveable(boolean flag)
|
void |
setName()
Sets a unique name for the object. |
void |
setNameWithNumber(String n)
|
static void |
setPointLabel(carmetal.eric.JPointName jpl)
|
void |
setTargetDefaults()
|
void |
setType(int type)
|
void |
setUseAlpha(boolean flag)
|
void |
setXY(double x,
double y)
|
void |
setXYaway(double x,
double y,
int r)
|
void |
shake()
|
void |
snap(carmetal.rene.zirkel.ZirkelCanvas zc)
|
boolean |
somethingChanged()
|
void |
startDrag(double x,
double y)
Overwrite setting of default things for macro targets. |
void |
translate()
Override in children! This translates the mother items. |
void |
translateMagnetObjects()
|
void |
updateCircleDep()
|
void |
updateMagnetObjects()
|
void |
updateText()
|
boolean |
useAlpha()
|
void |
validate()
|
void |
validCoordinates()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double X
protected double Y
protected boolean BarycentricCoordsInitialzed
protected double Gx
protected double Gy
protected double Alpha
protected boolean AlphaValid
protected boolean UseAlpha
protected boolean Moveable
protected boolean Fixed
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
public static int MaxType
protected carmetal.rene.zirkel.expression.Expression EX
protected carmetal.rene.zirkel.expression.Expression EY
protected ConstructionObject MovedBy
public ConstructionObject VirtualBound
| Constructor Detail |
|---|
public PointObject(carmetal.construction.Construction c,
double x,
double y)
c - x - X positiony - Y position
public PointObject(carmetal.construction.Construction c,
double x,
double y,
ConstructionObject bound)
public PointObject(carmetal.construction.Construction c,
String name)
| Method Detail |
|---|
public static void setPointLabel(carmetal.eric.JPointName jpl)
public void setName()
ConstructionObject
setName in class ConstructionObjectpublic void setNameWithNumber(String n)
setNameWithNumber in class ConstructionObjectpublic String getTag()
getTag in class ConstructionObjectpublic int getN()
getN in class ConstructionObjectpublic void setDefaults()
setDefaults in class ConstructionObjectpublic void setTargetDefaults()
setTargetDefaults in class ConstructionObjectpublic double changedBy()
changedBy in class ConstructionObjectpublic void validate()
validate in class ConstructionObjectpublic void updateText()
updateText in class ConstructionObject
public void paint(carmetal.rene.zirkel.graphics.MyGraphics g,
carmetal.rene.zirkel.ZirkelCanvas zc)
paint in class ConstructionObject
public static double drawPoint(carmetal.rene.zirkel.graphics.MyGraphics g,
carmetal.rene.zirkel.ZirkelCanvas zc,
ConstructionObject o,
double X,
double Y,
int type)
public String getDisplayValue()
ConstructionObject
getDisplayValue in class ConstructionObjectpublic String getCDPDisplayValue()
getCDPDisplayValue in class ConstructionObject
public boolean nearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
ConstructionObject
nearto in class ConstructionObjectpublic boolean nearto(PointObject p)
public double distanceTo(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
public double getX()
getX in class ConstructionObjectpublic double getY()
getY in class ConstructionObjectpublic boolean moveable()
moveable in interface MoveableObjectpublic boolean dependsOnItselfOnly()
public boolean dependsOnParametersOnly()
public boolean moveableBy(ConstructionObject o)
public boolean moveablePoint()
public boolean setBound(String name)
public void setBound(ConstructionObject bound)
public boolean haveBoundOrder()
public void setBoundOrder(double boundorder)
public void clearBoundOrder()
public ConstructionObject getBound()
public double getBoundOrder()
public void setMoveable(boolean flag)
public boolean fixed()
fixed in class ConstructionObjectpublic void setFixed(boolean flag)
setFixed in class ConstructionObject
public void setFixed(String x,
String y)
setFixed in class ConstructionObject
public void validCoordinates()
throws Exception
Exceptionpublic boolean insidewindow()
public boolean insidewindow(double x,
double y)
public void shake()
public void alea()
public void move(double x,
double y)
move in interface MoveableObjectmove in class ConstructionObject
public void setXY(double x,
double y)
public void setXYaway(double x,
double y,
int r)
public void setA(double alpha)
public void setMagnetRayExp(String s)
public String getMagnetRayExp()
public int getMagnetRay()
public boolean isMagnet()
public void removeMagnetObject(String name)
public void addMagnetObject(String s)
s - public void setMagnetObjects(String namelist)
public void selectMagnetObjects(boolean b)
public void updateMagnetObjects()
public void clearMagnetObjects()
public void translateMagnetObjects()
public Vector getMagnetObjects()
public String getMagnetObjectsString()
public void magnet()
public void setCurrentMagnetObject()
public ConstructionObject getCurrentMagnetObject()
public void followMagnetObject()
public int getDistance(PointObject P)
getDistance in class ConstructionObjectpublic void project(ConstructionObject o)
public void project(ConstructionObject o,
double alpha)
public void printArgs(carmetal.rene.util.xml.XmlWriter xml)
printArgs in class ConstructionObjectpublic void printType(carmetal.rene.util.xml.XmlWriter xml)
public int getType()
getType in class ConstructionObjectpublic void setType(int type)
setType in class ConstructionObjectpublic void movedBy(ConstructionObject o)
public boolean equals(ConstructionObject o)
equals in class ConstructionObjectpublic String getEX()
getEX in class ConstructionObjectpublic String getEY()
getEY in class ConstructionObjectpublic boolean isOn(ConstructionObject o)
public void translate()
ConstructionObject
translate in class ConstructionObjectpublic Enumeration depending()
ConstructionObject
depending in class ConstructionObjectpublic void snap(carmetal.rene.zirkel.ZirkelCanvas zc)
snap in class ConstructionObjectpublic void setHalfIncrement(carmetal.rene.zirkel.ZirkelCanvas zc)
public void updateCircleDep()
updateCircleDep in class ConstructionObjectpublic boolean isPointOn()
public boolean isPointOnOrMagnet()
public void setLaterBind(String s)
public ConstructionObject copy(double x,
double y)
ConstructionObject
copy in class ConstructionObjectpublic void computeBarycentricCoords()
public void setInside(boolean flag)
setInside in class ConstructionObjectpublic boolean isInside()
isInside in class ConstructionObjectpublic void laterBind(carmetal.construction.Construction c)
ConstructionObject
laterBind in class ConstructionObjectc - The construction this object is in.public void setAlpha(double alpha)
public void setUseAlpha(boolean flag)
public boolean useAlpha()
public double getAlpha()
public void round()
round in class ConstructionObject
public void setKeepClose(double x,
double y)
setKeepClose in class ConstructionObjectpublic boolean canKeepClose()
canKeepClose in class ConstructionObjectpublic boolean dontUpdate()
public void dontUpdate(boolean flag)
public void startDrag(double x,
double y)
startDrag in interface MoveableObject
public void dragTo(double x,
double y)
dragTo in interface MoveableObjectpublic double getOldX()
getOldX in interface MoveableObjectpublic double getOldY()
getOldY in interface MoveableObjectpublic void setIncrement(double inc)
setIncrement in class ConstructionObjectpublic double getIncrement()
getIncrement in class ConstructionObjectpublic boolean isDriverObject()
isDriverObject in interface DriverObjectisDriverObject in class ConstructionObjectpublic boolean somethingChanged()
somethingChanged in interface DriverObjectpublic void clearChanges()
clearChanges in interface DriverObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||