|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcarmetal.objects.ConstructionObject
carmetal.objects.TextObject
public class TextObject
A class to build a text label. Can be used to put LaTeX math if enclosed between $.
| Field Summary | |
|---|---|
protected boolean |
DoShow
|
protected carmetal.rene.zirkel.expression.Expression |
EX
|
protected carmetal.rene.zirkel.expression.Expression |
EY
|
protected boolean |
Fixed
|
protected double |
X
|
protected double |
Y
|
| 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 | |
|---|---|
TextObject(carmetal.construction.Construction c,
double x,
double y)
Same but without the text |
|
TextObject(carmetal.construction.Construction c,
String text,
double x,
double y)
Build a text object |
|
| Method Summary | |
|---|---|
boolean |
canDisplayName()
|
Enumeration |
depending()
Return an enumeration of objects, that this object depends on. |
void |
dragTo(double x,
double y)
|
boolean |
fixed()
|
String |
getDisplayValue()
To be overridden by the objects. |
String |
getEX()
|
String |
getEY()
|
String |
getLines()
Get text lines |
int |
getN()
|
double |
getOldX()
|
double |
getOldY()
|
String |
getTag()
|
double |
getX()
|
double |
getY()
|
void |
move(double x,
double y)
|
boolean |
moveable()
|
boolean |
mustHide(carmetal.rene.zirkel.ZirkelCanvas zc)
|
boolean |
nearto(int x,
int y,
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)
|
void |
printArgs(carmetal.rene.util.xml.XmlWriter xml)
|
void |
setDefaults()
|
void |
setDoShow(boolean flag)
|
void |
setFixed(boolean flag)
|
void |
setFixed(String x,
String y)
Set it to be fixed to a certain location |
void |
setLines(String o)
Set text to this label |
void |
setTargetDefaults()
|
void |
snap(carmetal.rene.zirkel.ZirkelCanvas zc)
|
void |
startDrag(double x,
double y)
|
void |
translate()
Override in children! This translates the mother items. |
void |
updateText()
|
void |
validate()
|
| 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 carmetal.rene.zirkel.expression.Expression EX
protected carmetal.rene.zirkel.expression.Expression EY
protected boolean Fixed
protected boolean DoShow
| Constructor Detail |
|---|
public TextObject(carmetal.construction.Construction c,
String text,
double x,
double y)
c - constructiontext - textx - X positiony - Y position
public TextObject(carmetal.construction.Construction c,
double x,
double y)
c - constructionx - position Xy - position Y| Method Detail |
|---|
public void setDefaults()
setDefaults in class ConstructionObjectpublic void setTargetDefaults()
setTargetDefaults in class ConstructionObject
public boolean nearto(int x,
int y,
carmetal.rene.zirkel.ZirkelCanvas zc)
ConstructionObject
nearto in class ConstructionObjectpublic String getTag()
getTag in class ConstructionObjectpublic int getN()
getN in class ConstructionObjectpublic void updateText()
updateText in class ConstructionObject
public void move(double x,
double y)
move in interface MoveableObjectmove in class ConstructionObject
public void paint(carmetal.rene.zirkel.graphics.MyGraphics g,
carmetal.rene.zirkel.ZirkelCanvas zc)
paint in class ConstructionObjectpublic boolean mustHide(carmetal.rene.zirkel.ZirkelCanvas zc)
mustHide in class ConstructionObjectpublic void validate()
validate in class ConstructionObjectpublic String getLines()
getLines in class ConstructionObjectpublic void setLines(String o)
setLines in class ConstructionObjecto - textpublic String getDisplayValue()
ConstructionObject
getDisplayValue in class ConstructionObjectpublic double getX()
getX in class ConstructionObjectpublic double getY()
getY in class ConstructionObjectpublic void printArgs(carmetal.rene.util.xml.XmlWriter xml)
printArgs in class ConstructionObjectpublic boolean moveable()
moveable in interface MoveableObjectpublic boolean fixed()
fixed in class ConstructionObjectpublic void setFixed(boolean flag)
setFixed in class ConstructionObject
public void setFixed(String x,
String y)
setFixed in class ConstructionObjectx - X locationy - Y locationpublic String getEX()
getEX in class ConstructionObjectpublic String getEY()
getEY in class ConstructionObjectpublic void setDoShow(boolean flag)
public void snap(carmetal.rene.zirkel.ZirkelCanvas zc)
snap in class ConstructionObjectpublic void translate()
ConstructionObject
translate in class ConstructionObjectpublic Enumeration depending()
ConstructionObject
depending in class ConstructionObjectpublic boolean canDisplayName()
canDisplayName in class ConstructionObject
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 MoveableObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||