Package com.nomagic.magicdraw.uml
Class RepresentationTextParams
- java.lang.Object
-
- com.nomagic.magicdraw.uml.RepresentationTextParams
-
- All Implemented Interfaces:
java.lang.Cloneable
@OpenApiAll public class RepresentationTextParams extends java.lang.Object implements java.lang.Cloneable
Configuration for getting element's text fromRepresentationTextCreator
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
addColor
private LocationInTool
locationInTool
private int
maxTextLength
private boolean
showElementNumber
private boolean
showFullType
-
Constructor Summary
Constructors Constructor Description RepresentationTextParams()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RepresentationTextParams
clone()
static RepresentationTextParams
createByEnvironmentOptions()
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
equals(java.lang.Object o)
LocationInTool
getLocationInTool()
Invocation information.int
getMaxTextLength()
int
hashCode()
boolean
isAddColor()
Defines if color information should be added to the representation text.boolean
isShowElementNumber()
Defines if element auto numbers (IDs) should be included to the representation text.boolean
isShowFullType()
Defines how text of some elements should be constructed.RepresentationTextParams
setAddColor(boolean addColor)
RepresentationTextParams
setLocationInTool(LocationInTool locationInTool)
RepresentationTextParams
setMaxTextLength(int maxTextLength)
Set max expected text length.RepresentationTextParams
setShowElementNumber(boolean showElementNumber)
RepresentationTextParams
setShowFullType(boolean showFullType)
-
-
-
Field Detail
-
addColor
private boolean addColor
-
showFullType
private boolean showFullType
-
showElementNumber
private boolean showElementNumber
-
maxTextLength
private int maxTextLength
-
locationInTool
private LocationInTool locationInTool
-
-
Method Detail
-
createByEnvironmentOptions
public static RepresentationTextParams 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
public static RepresentationTextParams createByOptions(Project project)
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
public RepresentationTextParams setAddColor(boolean addColor)
- 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
-
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
public RepresentationTextParams setShowElementNumber(boolean showElementNumber)
- Parameters:
showElementNumber
- true if element auto numbers (IDs) should be included
-
setShowFullType
public RepresentationTextParams setShowFullType(boolean showFullType)
- 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
public RepresentationTextParams setMaxTextLength(int maxTextLength)
Set max expected text length. There is no guarantee this option will be respected byRepresentationTextCreator
- Parameters:
maxTextLength
- max text length.
-
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
public RepresentationTextParams setLocationInTool(LocationInTool locationInTool)
- Parameters:
locationInTool
- describes GUI location for which text is being created- See Also:
LocationInTool
-
getLocationInTool
public LocationInTool getLocationInTool()
Invocation information. SeeLocationInTool
. Default isLocationInTool.unknown
- Returns:
- location in tool
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
clone
public RepresentationTextParams clone()
- Overrides:
clone
in classjava.lang.Object
-
-