Package chemaxon.struc.graphics
Class MNameTextBox
java.lang.Object
chemaxon.struc.MObject
chemaxon.struc.graphics.MPolyline
chemaxon.struc.graphics.MRectangle
chemaxon.struc.graphics.MTextBox
chemaxon.struc.graphics.MNameTextBox
- All Implemented Interfaces:
Serializable,Cloneable
Name Text box object to display IUPAC name.
- Since:
- Marvin 5.0, 03/22/2007
- See Also:
-
Field Summary
Fields inherited from class chemaxon.struc.graphics.MTextBox
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP, FONT_DEFAULT_SCALEFields inherited from class chemaxon.struc.graphics.MRectangle
P_CENTER, P_E, P_N, P_NE, P_NW, P_S, P_SE, P_SW, P_W, T_NOROTFields inherited from class chemaxon.struc.graphics.MPolyline
ARROW_BACK_FLAG, ARROW_CROSSED_FLAG, ARROW_CURVED_FLAG, ARROW_DASHED_FLAG, ARROW_EQUILIBRIUM_FLAG, ARROW_GROUP1_MASK, ARROW_GROUP2_MASK, ARROW_HALF_LEFT, ARROW_HALF_MASK, ARROW_HALF_RIGHT, ARROW_RETROSYNTHETIC_FLAG, arrowFlags, CLOSED_FLAG, DEFAULT_ARROW_HEAD_LENGTH, DEFAULT_ARROW_HEAD_WIDTH, DEFAULT_EQUILIBRIUM_HEAD_WIDTH, DEFAULT_MAX_CROSS_SIZE, DEFAULT_RETROSYNTHETIC_HEAD_WIDTH, DEFAULT_THICKNESS, HEAD, points, TAIL, THICKNESS_SET_FLAGFields inherited from class chemaxon.struc.MObject
TRANSFORM_DISTORT -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs an empty name text box.protectedCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the attribute names to the specified list.doubleCalculates the width of the string in the name text box.clone()Creates a clone.Gets the value of an attribute.Gets the breaking characters after that the text in the text box can be broken if it doesn't fit into the text box.longgetGrinv()Gets an invariant the text box depends on.Gets the breaking characters before that the text in the text box can be broken if it doesn't fit into the text box.doubleGets the preferred width of the text-box.booleanReturns if the text-box is in automatic alignment mode.booleanReturns if the text-box is in automatic resize mode.booleanDetermines if this text box's content can be edited by the user.voidsetAttribute(String s, String v) Sets the value of an attribute.voidsetAutoAlign(boolean autoAlign) Sets the alignment behavior of the text-box.voidsetAutoHeight(boolean v) Turns on/off automatic height calculation.voidsetAutoResize(boolean autoResize) Sets the resizing behavior of the text-box.voidsetCurrentWidth(double w) Sets the current height of the text..voidsetGrinv(long grinv) Sets the invariant the text box depends on.voidSets the points.voidsetPreferredWidth(double preferredWidth) Sets the preferred width of the text-box.voidSets the text.voidtransform(CTransform3D t, int opts, CTransform3D trot) Transforms all points, scales the arrow head widths and lengths.Methods inherited from class chemaxon.struc.graphics.MTextBox
addCdataAttributeKeys, addChar, addLine, addString, clearLines, cursorDown, cursorLeft, cursorRight, cursorToRowEnd, cursorToRowStart, cursorUp, deleteChar, deleteCharBackward, determinePosition, determinePosition, getActionMap, getBaseFont, getBaseFontFamily, getBaseFontStyle, getCurrentDefaultFontMetrics, getCurrentForeground, getCurrentHeight, getCurrentScriptCount, getCurrentSubLevel, getCurrentTextAttributes, getCurrentWidth, getCursorColumn, getCursorPos, getCursorRow, getFontScale, getHorizontalAlignment, getLine, getLineCount, getMinimumHeight, getPreviousNormalTextSectionIndex, getSelectedDocument, getSelectedString, getSelectionEndColumn, getSelectionEndPos, getSelectionEndRow, getSelectionStartColumn, getSelectionStartPos, getSelectionStartRow, getText, getTextAttributesAtCursor, getTextDocument, getVerticalAlignment, hasBackground, hasColor, hasFace, hasRichText, hasSelection, insertDocument, isAutoHeight, isAutoSize, isCurrentFontDefault, isCurrentFontRegular, isEmpty, isMinimumHeightSet, setActionMap, setAutoSize, setBaseFontFamily, setBaseFontStyle, setCurrentDefaultFontMetrics, setCurrentFont, setCurrentForeground, setCurrentHeight, setCurrentTextAttributes, setCursorPos, setCursorRow, setDocument, setFontScale, setHorizontalAlignment, setMinimumHeight, setMinimumHeightSet, setRowAndColumn0, setSelected, setVerticalAlignment, unselectContents, wrapTextAndSetActualPointsMethods inherited from class chemaxon.struc.graphics.MRectangle
calcCenter, convertTransform, distanceFrom, fixClonedPoints, fixRectanglePointClones, getClip, getPointRef, getPointRefCount, getTCenter, getTOption, removeChild, setCorners, setTCenter, setTOption, transformTo2DMethods inherited from class chemaxon.struc.graphics.MPolyline
checkValidity, containsAtom, copyProperties, finishCloning, fixMidPointClones, getArcAngle, getArcCenter, getArcRadius, getArcRadius, getArrowFlags, getArrowLength, getArrowWidth, getFlags, getLineMiddlePoint, getMidPointLocation, getMirroredArrowFlags, getPoint, getPointCount, getPoints, getSkip, getThickness, hasLineColor, hasOutline, isArrow, isThicknessSet, removeNotify, replaceAtom, reverse, rotate, setArcAngle, setArrow, setArrowFlags, setArrowLength, setArrowWidth, setFlags, setSkip, setThickness, updateBoundingRectMethods inherited from class chemaxon.struc.MObject
addNotify, clearProperties, connectToSgroupOfAtom, containsPoint, containsPropertyKey, distanceFrom, getBackground, getColor, getContainerMObject, getLineColor, getProperty, isChildOf, isInternalSelectable, isReactionArrow, isSelectableNow, isSelected, isTransformable, makeColor, propertyCount, propertyKeySet, propertySet, putProperty, removeAtom, removeProperty, setBackground, setColor, setLineColor, toString, updateBoundingRect
-
Constructor Details
-
MNameTextBox
Copy constructor.- Parameters:
t- the original text box
-
MNameTextBox
public MNameTextBox()Constructs an empty name text box.
-
-
Method Details
-
clone
Description copied from class:MObjectCreates a clone. -
isEditable
public boolean isEditable()Description copied from class:MTextBoxDetermines if this text box's content can be edited by the user.- Overrides:
isEditablein classMTextBox- Returns:
- true if the content can be edited, false otherwise
-
calcWidth
Calculates the width of the string in the name text box.- Parameters:
g- the graphics context- Returns:
- the width of the string in the name box.
-
setCurrentWidth
public void setCurrentWidth(double w) Sets the current height of the text..- Overrides:
setCurrentWidthin classMTextBox- Parameters:
w- the width
-
setAutoHeight
public void setAutoHeight(boolean v) Turns on/off automatic height calculation.- Overrides:
setAutoHeightin classMTextBox- Parameters:
v- turn on (true) or off (false)- Since:
- Marvin 5.0, 03/22/2007
-
setText
Sets the text. -
getGrinv
public long getGrinv()Gets an invariant the text box depends on.- Returns:
- the invariant value
- Since:
- Marvin 5.0, 03/22/2007
-
setGrinv
public void setGrinv(long grinv) Sets the invariant the text box depends on.- Parameters:
grinv- the invariant value- Since:
- Marvin 5.0, 03/22/2007
-
isAutoResize
public boolean isAutoResize()Returns if the text-box is in automatic resize mode.- Returns:
- true if in automatic resize mode
-
setAutoResize
public void setAutoResize(boolean autoResize) Sets the resizing behavior of the text-box.- Parameters:
autoResize- if set true then the behavior is automatic resize.
-
isAutoAlign
public boolean isAutoAlign()Returns if the text-box is in automatic alignment mode.- Returns:
- true if in automatic alignment mode
-
setAutoAlign
public void setAutoAlign(boolean autoAlign) Sets the alignment behavior of the text-box.- Parameters:
autoAlign- if set true then the behavior is automatic alignment.
-
getPreferredWidth
public double getPreferredWidth()Gets the preferred width of the text-box.- Returns:
- the preferred width
-
setPreferredWidth
public void setPreferredWidth(double preferredWidth) Sets the preferred width of the text-box.- Parameters:
preferredWidth- the preferred width
-
transform
Transforms all points, scales the arrow head widths and lengths. -
setPoints
Sets the points. -
addAttributeKeys
Adds the attribute names to the specified list. CDATA attributes are not added.- Overrides:
addAttributeKeysin classMTextBox- Parameters:
l- the list
-
getAttribute
Gets the value of an attribute.
Supported attributes:- autoResize: resizing mode of the text box
- autoAlign: aligning mode of the text box
- preferredWidth: preferred width of the text box
- Overrides:
getAttributein classMTextBox- Parameters:
s- the attribute name- Returns:
- the value or null
-
setAttribute
Sets the value of an attribute.
Supported attributes:- autoResize: resizing mode of the text box
- autoAlign: aligning mode of the text box
- preferredWidth: preferred width of the text box
- Overrides:
setAttributein classMTextBox- Parameters:
s- the attribute namev- the attribute value
-
getPreBreakingChars
Gets the breaking characters before that the text in the text box can be broken if it doesn't fit into the text box.- Overrides:
getPreBreakingCharsin classMTextBox- Returns:
- the string that contains the breaking characters.
-
getBreakingChars
Gets the breaking characters after that the text in the text box can be broken if it doesn't fit into the text box.- Overrides:
getBreakingCharsin classMTextBox- Returns:
- the string that contains the breaking characters.
-