Package com.nomagic.magicdraw.uml
Class RepresentationTextParams
java.lang.Object
com.nomagic.magicdraw.uml.RepresentationTextParams
- All Implemented Interfaces:
Cloneable
Configuration for getting element's text from
RepresentationTextCreator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
static RepresentationTextParams
Creates new instance of representation params and sets fields depending onEnvironmentOptions
.static RepresentationTextParams
createByOptions
(Project project) Creates new instance of representation params and sets fields depending on both Environment and Project options.boolean
Invocation information.int
int
hashCode()
boolean
Defines if color information should be added to the representation text.boolean
Checks if we need to add human type to nameboolean
Defines if element auto numbers (IDs) should be included to the representation text.boolean
Defines if element auto numbers (IDs) should be included to the representation text.boolean
Defines how text of some elements should be constructed.boolean
boolean
setAddColor
(boolean addColor) setAddHumanType
(boolean addHumanType) Set to add human type to namesetForceShowTypeName
(boolean forceShowTypeName) setLocationInTool
(LocationInTool locationInTool) setMaxTextLength
(int maxTextLength) Set max expected text length.setShowElementNumber
(boolean showElementNumber) setShowFullType
(boolean showFullType) setShowPostfix
(boolean showPostfix) Set to show or hide prefixsetShowPrefix
(boolean showPrefix) Set to show or hide prefix
-
Constructor Details
-
RepresentationTextParams
public RepresentationTextParams()Constructor
-
-
Method Details
-
createByEnvironmentOptions
Creates new instance of representation params and sets fields depending onEnvironmentOptions
. OnlyisShowFullType()
value is affected.- Returns:
- new text params instance pre-configured by environment options
-
createByOptions
Creates new instance of representation params and sets fields depending on both Environment and Project options.isShowFullType()
andisShowElementNumber()
values are affected.- Returns:
- new text params instance pre-configured by environment and project options
-
setAddColor
- Parameters:
addColor
- if true, color information will be added to the text
-
isAddColor
public boolean isAddColor()Defines if color information should be added to the representation text. Default isfalse
. Color information should be added when rendering colored text in UI.- Returns:
- true if color information should be added
-
isForceShowTypeName
public boolean isForceShowTypeName()Defines if element auto numbers (IDs) should be included to the representation text. Default isfalse
.- Returns:
- true if element auto numbers (IDs) should be included
-
setForceShowTypeName
- Parameters:
forceShowTypeName
- true if element need to show type name if it's name is empty
-
isShowElementNumber
public boolean isShowElementNumber()Defines if element auto numbers (IDs) should be included to the representation text. Default isfalse
.- Returns:
- true if element auto numbers (IDs) should be included
-
setShowElementNumber
- Parameters:
showElementNumber
- true if element auto numbers (IDs) should be included
-
setShowFullType
- Parameters:
showFullType
- if Type of TypedElement should be represented by full qualified name. Also affects text of relationship end elements.
-
getMaxTextLength
public int getMaxTextLength()- Returns:
- max text length.
-
setMaxTextLength
Set max expected text length. There is no guarantee this option will be respected byRepresentationTextCreator
- Parameters:
maxTextLength
- max text length.
-
setAddHumanType
Set to add human type to name- Parameters:
addHumanType
- flag to indicate if we add or not humann type to text (default is true)
-
isAddHumanType
public boolean isAddHumanType()Checks if we need to add human type to name- Returns:
- true if we need to add, else false
-
isShowFullType
public boolean isShowFullType()Defines how text of some elements should be constructed. Affects Type text forTypedElement
and end element text forRelationship
elements. Default value isfalse
.- Returns:
- true if specific elements will be represented by full qualified name, false if name will be used
-
setLocationInTool
- Parameters:
locationInTool
- describes GUI location for which text is being created- See Also:
-
getLocationInTool
Invocation information. SeeLocationInTool
. Default isLocationInTool.unknown
- Returns:
- location in tool
-
isShowPrefix
public boolean isShowPrefix()- Returns:
- true if prefix should be added
-
setShowPrefix
Set to show or hide prefix- Parameters:
showPrefix
- false if prefix should not be added
-
isShowPostfix
public boolean isShowPostfix()- Returns:
- true if postfix should be added
-
setShowPostfix
Set to show or hide prefix- Parameters:
showPostfix
- false if postfix should not be added
-
equals
-
hashCode
public int hashCode() -
clone
-