|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object chemaxon.struc.MObject chemaxon.struc.graphics.MPolyline chemaxon.struc.graphics.MRectangle chemaxon.struc.graphics.MTextBox
Text box object.
Field Summary |
Fields inherited from class chemaxon.struc.graphics.MPolyline |
ARROW_BACK_FLAG, ARROW_HALF_LEFT, ARROW_HALF_MASK, ARROW_HALF_RIGHT, CLOSED_FLAG, DEFAULT_THICKNESS, HEAD, TAIL, THICKNESS_SET_FLAG |
Fields inherited from class chemaxon.struc.MObject |
PAINT_ANTIALIAS, PAINT_FOCUSED, TRANSFORM_DISTORT |
Constructor Summary | |
|
MTextBox()
Contructs an empty text box. |
protected |
MTextBox(MTextBox t)
Copy constructor. |
Method Summary | |
void |
addCdataAttributeKeys(java.util.Vector v)
Adds attribute names to the specified vector. |
void |
addChar(char c)
Adds a character to the text. |
void |
addString(java.lang.String s)
Adds a string to the text. |
java.lang.Object |
clone()
Creates a clone. |
void |
cursorDown(boolean select)
Move the cursor down. |
void |
cursorUp(boolean select)
Moves the cursor up. |
void |
deleteChar()
Removes the character under the cursor. |
void |
deleteCharBackward()
Removes the character before the cursor (backspace). |
int |
determinePosition(DPoint3 p,
boolean allowExternalPoints)
|
java.lang.String |
getAttribute(java.lang.String s)
Gets the value of an attribute. |
int |
getCursorPos()
Gets the cursor position. |
java.lang.String |
getSelectedString()
Gets the selected substring. |
int |
getSelectionEndPos()
Gets the selection's end position. |
int |
getSelectionStartPos()
Gets the selection's start position. |
java.lang.String |
getText()
Gets the text stored. |
boolean |
hasBackground()
A text box has a background always. |
boolean |
hasColor()
A text box has a text color. |
boolean |
hasFace()
Is it 2 dimensional? |
boolean |
hasSelection()
Checks the existence of the selection. |
boolean |
isEmpty()
A text box is empty if the string contains only whitespace. |
void |
paint(java.awt.Graphics g,
CTransform3D t,
int f,
java.awt.Color c,
java.awt.Color selc,
java.awt.Color focusc)
Paints the object. |
void |
setAttribute(java.lang.String s,
java.lang.String v)
Sets the value of an attribute. |
void |
setAutoSize(boolean v)
Turns on/off automatic size calculation. |
void |
setCursorPos(int i,
boolean select)
Sets the cursor position. |
void |
setPoints(MPoint[] p)
Sets the points. |
void |
setSelected(boolean v)
Selects or unselects the text box. |
void |
setText(java.lang.String s)
Sets the text. |
void |
transform(CTransform3D t,
int opts)
Transforms all points and scales the font size. |
void |
unselectContents()
Unselects text. |
Methods inherited from class chemaxon.struc.graphics.MRectangle |
getClipObject, getPointRef, getPointRefCount, removeChild, setCorners |
Methods inherited from class chemaxon.struc.graphics.MPolyline |
addAttributeKeys, calcCenter, checkValidity, containsAtom, copyProperties, distanceFrom, finishCloning, getArcAngle, getArcCenter, getArcRadius, getArrowFlags, getArrowLength, getArrowWidth, getFlags, getPoint, getPointCount, getSkip, getThickness, hasLineColor, hasOutline, isArrow, isThicknessSet, replaceAtom, setArcAngle, setArrow, setArrowFlags, setArrowLength, setArrowWidth, setFlags, setSkip, setThickness |
Methods inherited from class chemaxon.struc.MObject |
addNotify, distanceFrom, getBackground, getColor, getLineColor, isChildOf, isInternalSelectable, isSelectableNow, isSelected, isTransformable, makeColor, makeColorString, removeNotify, setBackground, setColor, setLineColor |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MTextBox()
protected MTextBox(MTextBox t)
t
- the original text boxMethod Detail |
public java.lang.Object clone()
MObject
clone
in class MRectangle
public java.lang.String getText()
public void setText(java.lang.String s)
s
- the textpublic void setAutoSize(boolean v)
v
- turn on (true) or off (false)public boolean isEmpty()
isEmpty
in class MPolyline
public void addCdataAttributeKeys(java.util.Vector v)
addCdataAttributeKeys
in class MObject
v
- the vectorpublic java.lang.String getAttribute(java.lang.String s)
getAttribute
in class MPolyline
s
- the attribute name
public void setAttribute(java.lang.String s, java.lang.String v)
setAttribute
in class MPolyline
s
- the attribute namev
- the attribute valuepublic boolean hasSelection()
public java.lang.String getSelectedString()
public void deleteCharBackward()
public void deleteChar()
public void addChar(char c)
c
- the characterpublic void addString(java.lang.String s)
s
- the stringpublic int getCursorPos()
public void setCursorPos(int i, boolean select)
i
- the new positionselect
- select text while moving the cursorpublic void cursorUp(boolean select)
select
- select text while moving the cursorpublic void cursorDown(boolean select)
select
- select text while moving the cursorpublic int getSelectionStartPos()
public int getSelectionEndPos()
public void setPoints(MPoint[] p)
setPoints
in class MPolyline
p
- the pointspublic boolean hasColor()
hasColor
in class MPolyline
public boolean hasBackground()
hasBackground
in class MPolyline
public boolean hasFace()
hasFace
in class MPolyline
public void transform(CTransform3D t, int opts)
transform
in class MPolyline
t
- the transformation matrixopts
- transform options or 0public void paint(java.awt.Graphics g, CTransform3D t, int f, java.awt.Color c, java.awt.Color selc, java.awt.Color focusc)
paint
in class MPolyline
g
- the graphics contextt
- the transformation matrixf
- flagsc
- the color to use or nullselc
- the selection colorfocusc
- the focus colorpublic void setSelected(boolean v)
setSelected
in class MObject
v
- true to select, false to unselectpublic void unselectContents()
unselectContents
in class MPolyline
public int determinePosition(DPoint3 p, boolean allowExternalPoints)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |