|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpicedt.graphic.model.AbstractElement
jpicedt.graphic.model.DefaultLeafElement
jpicedt.graphic.model.TextEditable
jpicedt.graphic.model.PicText
Textual elements, possibly surrounded by a box (currently, only rectangular, oval and circular shapes are supported). The box size is computed from the text size (ie aka LaTeX's \\framebox command with no width/height argument).
Field Summary | |
protected double |
depth
|
protected Shape |
frame
|
protected double |
frameSep
|
protected double |
height
|
protected double |
nodeSep
|
protected double |
width
dimensions (in latex sense) of the latex box (this does not include frame) |
Fields inherited from class jpicedt.graphic.model.TextEditable |
FIRST_PT, LAST_PT, P_ANCHOR, textString |
Fields inherited from class jpicedt.graphic.model.DefaultLeafElement |
nodeConnections, nodeName, pts |
Fields inherited from class jpicedt.graphic.model.AbstractElement |
attributeSet, parent, view |
Constructor Summary | |
PicText()
Creates a PicText object with a default attribute set, and the following default values : empty string, no frame, bottom-left alignment. |
|
PicText(PicAttributeSet set)
Creates a PicText object with the following default values : empty string, frame and alignment according to the attribute set and anchor point at (0,0) |
|
PicText(PicPoint ptA,
PicAttributeSet set)
Creates a PicText object with the following default values : empty string, frame and alignment according to the attribute set |
|
PicText(PicPoint ptA,
String textString,
PicAttributeSet set)
Create a new PicText object with the whole bunch of parameters ! |
|
PicText(PicText text)
cloning constructor |
Method Summary | |
Object |
clone()
Override Object.clone() method |
AbstractCustomizer |
createCustomizer()
Return a Customizer for geometry editing |
double |
getBaseLineY()
Return y-coordinate of baseline |
double |
getBottomY()
Return y-coordinate of bottom boundary of text only |
double |
getCenterX()
Return x-coordinate of center of text only |
double |
getCenterY()
Return y-coordinate of center of text only |
double |
getDepth()
Return the depth of text only |
double |
getFrameBaseLineY()
Return y-coordinate of baseline |
double |
getFrameBottomY()
Return y-coordinate of bottom boundary |
double |
getFrameCenterX()
Return x-coordinate of center |
double |
getFrameCenterY()
Return y-coordinate of center |
double |
getFrameDepth()
Return the depth of the text including frame |
double |
getFrameHeight()
Return the height of the text including frame |
double |
getFrameLeftX()
Return x-coordinate of left boundary, including frame |
double |
getFrameRightX()
Return x-coordinate of right boundary |
double |
getFrameTopY()
Return y-coordinate of top boundary |
String |
getFrameType()
Set the frame type |
double |
getFrameWidth()
Return the width of the text including frame |
double |
getHeight()
Return the height of text only |
String |
getHorAlign()
Return horizontal alignment (see constant fields above) |
double |
getLeftX()
Return x-coordinate of left boundary of text only |
String |
getName()
Return a string that represents this object's name |
double |
getRightX()
Return x-coordinate of right boundary of text only |
Shape |
getShapeOfFrame()
Returns the frame that surrounds the text, ignoring rotation (the view will rotate it) |
double |
getTopY()
Return y-coordinate of top boundary of text only |
String |
getVertAlign()
Return vertical alignement (see static constant above) |
double |
getWidth()
Return the width of text only |
boolean |
isFramed()
Return TRUE if the box has to be drawn |
boolean |
isNodeable()
Can we be made into a node ? to be overriden by subclass |
PicPoint |
nodeConnectionOrigin(double dx,
double dy)
|
PicPoint |
nodeReferencePoint()
|
double |
nodeReferencePointX()
|
double |
nodeReferencePointY()
|
void |
setDimensions(double w,
double h,
double d)
set the width, height, and depth (of the text box, without frame). |
void |
setFrameType(String frameType)
Set the type of frame to be put around the text. |
void |
setHorAlign(String horAlign)
Set the horizontal alignment (see constant fields above) |
void |
setPoint(int index,
PicPoint pt,
EditPointConstraint constraint)
Set the user-controlled point indexed by "index" to the given value, using the specified geometrical constraint. |
void |
setVertAlign(String vertAlign)
set the vertical alignement (see constant fields above) |
String |
toString()
Returns a String representation of this DefaultElement |
void |
updateFrame()
First computes frame dimensions (frameWidth, etc). |
Methods inherited from class jpicedt.graphic.model.TextEditable |
getText, setAttribute, setText |
Methods inherited from class jpicedt.graphic.model.DefaultLeafElement |
addConnection, fireChangedUpdate, forwardChangedUpdate, getAllowsChildren, getBoundingBox, getFirstPointIndex, getLastPointIndex, getNodeName, getNumberOfSpecificationPoints, getPoint, getPoint, getPointX, getPointY, getSpecificationPoint, getSpecificationPoint, getSpecificationPointX, getSpecificationPointY, isNode, iterator, removeAllConnections, removeConnection, rotate, scale, setNodeName, setPoint, setSpecificationPoint, shear, translate |
Methods inherited from class jpicedt.graphic.model.AbstractElement |
anchorPointsIterator, getAttribute, getAttributeSet, getDrawing, getParent, getView, removeView, scale, setAttributeSet, setParent, setViewFromFactory |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double width
protected double height
protected double depth
protected Shape frame
protected double frameSep
protected double nodeSep
Constructor Detail |
public PicText(PicPoint ptA, String textString, PicAttributeSet set)
ptA
- Anchor point (see setHorAlign() and setVertAlign() for details)textString
- the text contentpublic PicText(PicPoint ptA, PicAttributeSet set)
public PicText(PicAttributeSet set)
public PicText()
public PicText(PicText text)
Method Detail |
public Object clone()
clone
in interface Element
clone
in class DefaultLeafElement
public String getName()
getName
in interface Element
getName
in class DefaultLeafElement
public void setPoint(int index, PicPoint pt, EditPointConstraint constraint)
DefaultLeafElement
setPoint
in interface Element
setPoint
in class DefaultLeafElement
constraint
- a geometry constraint, or null if no particular constraint is being imposed (aka default).public String getHorAlign()
public void setHorAlign(String horAlign)
public String getVertAlign()
public void setVertAlign(String vertAlign)
public boolean isFramed()
public void setFrameType(String frameType)
public String getFrameType()
public Shape getShapeOfFrame()
public void updateFrame()
public double getWidth()
public double getHeight()
public double getDepth()
public double getLeftX()
public double getRightX()
public double getCenterX()
public double getBottomY()
public double getTopY()
public double getBaseLineY()
public double getCenterY()
public double getFrameWidth()
public double getFrameHeight()
public double getFrameDepth()
public double getFrameLeftX()
public double getFrameRightX()
public double getFrameCenterX()
public double getFrameTopY()
public double getFrameBottomY()
public double getFrameBaseLineY()
public double getFrameCenterY()
public void setDimensions(double w, double h, double d)
public boolean isNodeable()
DefaultLeafElement
isNodeable
in class DefaultLeafElement
public PicPoint nodeReferencePoint()
nodeReferencePoint
in class DefaultLeafElement
public double nodeReferencePointX()
nodeReferencePointX
in class DefaultLeafElement
public double nodeReferencePointY()
nodeReferencePointY
in class DefaultLeafElement
public PicPoint nodeConnectionOrigin(double dx, double dy)
nodeConnectionOrigin
in class DefaultLeafElement
public String toString()
DefaultLeafElement
toString
in class DefaultLeafElement
public AbstractCustomizer createCustomizer()
createCustomizer
in interface CustomizerFactory
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |