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 SummaryFields inherited from class chemaxon.struc.graphics.MTextBoxALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP, FONT_DEFAULT_SCALEFields inherited from class chemaxon.struc.graphics.MRectangleP_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.MPolylineARROW_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.MObjectTRANSFORM_DISTORT
- 
Constructor SummaryConstructorsModifierConstructorDescriptionConstructs an empty name text box.protectedCopy constructor.
- 
Method SummaryModifier 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.MTextBoxaddCdataAttributeKeys, 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.MRectanglecalcCenter, convertTransform, distanceFrom, fixClonedPoints, fixRectanglePointClones, getClip, getPointRef, getPointRefCount, getTCenter, getTOption, removeChild, setCorners, setTCenter, setTOption, transformTo2DMethods inherited from class chemaxon.struc.graphics.MPolylinecheckValidity, 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.MObjectaddNotify, 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- 
MNameTextBoxCopy constructor.- Parameters:
- t- the original text box
 
- 
MNameTextBoxpublic MNameTextBox()Constructs an empty name text box.
 
- 
- 
Method Details- 
cloneDescription copied from class:MObjectCreates a clone.
- 
isEditablepublic boolean isEditable()Description copied from class:MTextBoxDetermines if this text box's content can be edited by the user.- Overrides:
- isEditablein class- MTextBox
- Returns:
- true if the content can be edited, false otherwise
 
- 
calcWidthCalculates 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.
 
- 
setCurrentWidthpublic void setCurrentWidth(double w) Sets the current height of the text..- Overrides:
- setCurrentWidthin class- MTextBox
- Parameters:
- w- the width
 
- 
setAutoHeightpublic void setAutoHeight(boolean v) Turns on/off automatic height calculation.- Overrides:
- setAutoHeightin class- MTextBox
- Parameters:
- v- turn on (true) or off (false)
- Since:
- Marvin 5.0, 03/22/2007
 
- 
setTextSets the text.
- 
getGrinvpublic long getGrinv()Gets an invariant the text box depends on.- Returns:
- the invariant value
- Since:
- Marvin 5.0, 03/22/2007
 
- 
setGrinvpublic void setGrinv(long grinv) Sets the invariant the text box depends on.- Parameters:
- grinv- the invariant value
- Since:
- Marvin 5.0, 03/22/2007
 
- 
isAutoResizepublic boolean isAutoResize()Returns if the text-box is in automatic resize mode.- Returns:
- true if in automatic resize mode
 
- 
setAutoResizepublic void setAutoResize(boolean autoResize) Sets the resizing behavior of the text-box.- Parameters:
- autoResize- if set true then the behavior is automatic resize.
 
- 
isAutoAlignpublic boolean isAutoAlign()Returns if the text-box is in automatic alignment mode.- Returns:
- true if in automatic alignment mode
 
- 
setAutoAlignpublic void setAutoAlign(boolean autoAlign) Sets the alignment behavior of the text-box.- Parameters:
- autoAlign- if set true then the behavior is automatic alignment.
 
- 
getPreferredWidthpublic double getPreferredWidth()Gets the preferred width of the text-box.- Returns:
- the preferred width
 
- 
setPreferredWidthpublic void setPreferredWidth(double preferredWidth) Sets the preferred width of the text-box.- Parameters:
- preferredWidth- the preferred width
 
- 
transformTransforms all points, scales the arrow head widths and lengths.
- 
setPointsSets the points.
- 
addAttributeKeysAdds the attribute names to the specified list. CDATA attributes are not added.- Overrides:
- addAttributeKeysin class- MTextBox
- Parameters:
- l- the list
 
- 
getAttributeGets 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 class- MTextBox
- Parameters:
- s- the attribute name
- Returns:
- the value or null
 
- 
setAttributeSets 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 class- MTextBox
- Parameters:
- s- the attribute name
- v- the attribute value
 
- 
getPreBreakingCharsGets 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 class- MTextBox
- Returns:
- the string that contains the breaking characters.
 
- 
getBreakingCharsGets 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 class- MTextBox
- Returns:
- the string that contains the breaking characters.
 
 
-