Class CircularLayouterOptionsGroup
- java.lang.Object
-
- com.nomagic.magicdraw.core.options.OptionsGroup
-
- com.nomagic.magicdraw.core.options.AbstractPropertyOptionsGroup
-
- com.nomagic.magicdraw.core.options.AbstractDiagramLayouterOptionsGroup
-
- com.nomagic.magicdraw.core.options.CircularLayouterOptionsGroup
-
- All Implemented Interfaces:
java.lang.Cloneable
@OpenApiAll public class CircularLayouterOptionsGroup extends AbstractDiagramLayouterOptionsGroup
Compact. Each group will consist of shapes that are reachable by two link disjoint paths. Shapes that belong to more than one group will be assigned exclusively to one group. Isolated. Each group will consist of shapes that are reachable by two path disjoint paths. All shapes belonging to more than one group will be assigned to an isolated group. Single Cycle. All shapes will be arranged on a single circle.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Object[][]AUTO_RADIUS_ENABLE_MAPstatic java.lang.StringCOMPACTprivate static booleanDEFAULT_AUTO_CIRCLE_RADIUSprivate static doubleDEFAULT_COMPACTNESS_FACTORprivate static intDEFAULT_FIXED_CIRCLE_RADIUSprivate static intDEFAULT_MAXIMAL_DEVIATION_ANGLEprivate static intDEFAULT_MINIMAL_LINK_LENGTHprivate static intDEFAULT_MINIMAL_SHAPE_DISTANCEprivate static intDEFAULT_PREFERRED_CHILD_WEDGEstatic java.lang.StringIDstatic java.lang.StringISOLATEDprivate static java.lang.Object[][]LAYOUT_STYLE_ENABLE_MAPprivate static java.util.ListLAYOUT_STYLESstatic java.lang.StringSINGLE_CYCLE-
Fields inherited from class com.nomagic.magicdraw.core.options.AbstractDiagramLayouterOptionsGroup
ALIGNMENT_BOTTOM, ALIGNMENT_CENTER, ALIGNMENT_TOP, LAYOUT_LABEL_CONSIDERATION, LAYOUT_LABEL_CONSIDERATION_FULL, LAYOUT_LABEL_CONSIDERATION_NONE, LAYOUT_LABEL_CONSIDERATION_PARTIAL, MAX_INT_VALUE, SHAPE_ALIGNMENT
-
Fields inherited from class com.nomagic.magicdraw.core.options.OptionsGroup
ICON_ENVIRONMENT_OPTIONS
-
-
Constructor Summary
Constructors Constructor Description CircularLayouterOptionsGroup()Constructs CircularLayouterOptionsGroup
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(Property property)Adds property to this group.booleangetAllowOverlaps()booleangetAutoCircleRadius()Get the radius of each circle in the layout automatically.doublegetCompactnessFactor()Get compactness factor.intgetFixedCircleRadius()Get the fixed radius for all circles in the resulting layout.java.lang.StringgetLayoutStyle()Gets the string representation of layout style.intgetMaximalDeviationAngle()Get the bigger the chosen value, the more compact the resulting layout.intgetMinimalLinkLength()Get the minimal length of a path that connects two shapes that lie on separate circles.intgetMinimalShapeDistance()Get the minimal distance between borders of two adjacent shapes on a common circle.intgetPreferredChildWedge()Get the angular range of the sector that will be reserved for children of a shape.protected voidinitCommonDefaultValues()voidsetAllowOverlaps(boolean b)Set allow overlap.voidsetAutoCircleRadius(boolean b)Set the radius of each circle in the layout automatically.voidsetCompactnessFactor(double d)Set compactness factor.voidsetFixedCircleRadius(int d)Set the fixed radius for all circles in the resulting layout.voidsetLayoutStyle(java.lang.String s)Set layout style.voidsetMaximalDeviationAngle(int d)Set the bigger the chosen value, the more compact the resulting layout.voidsetMinimalLinkLength(int d)Set the minimal length of a path that connects two shapes that lie on separate circles.voidsetMinimalShapeDistance(int d)Set the minimal distance between borders of two adjacent shapes on a common circle.voidsetPreferredChildWedge(int d)Set the angular range of the sector that will be reserved for children of a shape.-
Methods inherited from class com.nomagic.magicdraw.core.options.AbstractDiagramLayouterOptionsGroup
getCopy, getMakePreferredLayoutSize, getOptimizeLabelOrientations, isMoveToFreeSpace, setDefaultValues, setMakePreferredLayoutSize, setMoveToFreeSpace, setOptimizeLabelOrientations
-
Methods inherited from class com.nomagic.magicdraw.core.options.AbstractPropertyOptionsGroup
addInvisibleProperty, addProperty, addProperty, afterLoad, beforeLoad, clone, createDefault, createOptions, createOptionsPanel, fixProperty, getOptions, getOptionsToSave, getProperty, getVisibleOptions, hasVisibleOptions, loadOptions, removeProperty, setOptions, setPropertiesInvisible, setPropertyInvisible
-
Methods inherited from class com.nomagic.magicdraw.core.options.OptionsGroup
add, afterSave, firstInit, getBanner, getChildren, getGroupIcon, getIcon, getId, getName, getParent, isEnabled, isVisible, remove, resetCachedValues, setEnabled, setVisible, sortChildren
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
COMPACT
public static final java.lang.String COMPACT
- See Also:
- Constant Field Values
-
ISOLATED
public static final java.lang.String ISOLATED
- See Also:
- Constant Field Values
-
SINGLE_CYCLE
public static final java.lang.String SINGLE_CYCLE
- See Also:
- Constant Field Values
-
LAYOUT_STYLES
private static final java.util.List LAYOUT_STYLES
-
AUTO_RADIUS_ENABLE_MAP
private static final java.lang.Object[][] AUTO_RADIUS_ENABLE_MAP
-
LAYOUT_STYLE_ENABLE_MAP
private static final java.lang.Object[][] LAYOUT_STYLE_ENABLE_MAP
-
DEFAULT_MINIMAL_SHAPE_DISTANCE
private static final int DEFAULT_MINIMAL_SHAPE_DISTANCE
- See Also:
- Constant Field Values
-
DEFAULT_AUTO_CIRCLE_RADIUS
private static final boolean DEFAULT_AUTO_CIRCLE_RADIUS
- See Also:
- Constant Field Values
-
DEFAULT_FIXED_CIRCLE_RADIUS
private static final int DEFAULT_FIXED_CIRCLE_RADIUS
- See Also:
- Constant Field Values
-
DEFAULT_PREFERRED_CHILD_WEDGE
private static final int DEFAULT_PREFERRED_CHILD_WEDGE
- See Also:
- Constant Field Values
-
DEFAULT_MINIMAL_LINK_LENGTH
private static final int DEFAULT_MINIMAL_LINK_LENGTH
- See Also:
- Constant Field Values
-
DEFAULT_MAXIMAL_DEVIATION_ANGLE
private static final int DEFAULT_MAXIMAL_DEVIATION_ANGLE
- See Also:
- Constant Field Values
-
DEFAULT_COMPACTNESS_FACTOR
private static final double DEFAULT_COMPACTNESS_FACTOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
initCommonDefaultValues
protected void initCommonDefaultValues()
- Overrides:
initCommonDefaultValuesin classAbstractDiagramLayouterOptionsGroup
-
getLayoutStyle
public java.lang.String getLayoutStyle()
Gets the string representation of layout style.- Returns:
- Layout style.
-
setLayoutStyle
public void setLayoutStyle(java.lang.String s)
Set layout style.- Parameters:
s- Style value.
-
getMinimalShapeDistance
public int getMinimalShapeDistance()
Get the minimal distance between borders of two adjacent shapes on a common circle.- Returns:
- int.
-
setMinimalShapeDistance
public void setMinimalShapeDistance(int d)
Set the minimal distance between borders of two adjacent shapes on a common circle.- Parameters:
d- value.
-
setAutoCircleRadius
public void setAutoCircleRadius(boolean b)
Set the radius of each circle in the layout automatically. An automatically chosen radius is usually the smallest possible radius that obeys Minimal Node Distance.- Parameters:
b- boolean value.
-
getAutoCircleRadius
public boolean getAutoCircleRadius()
Get the radius of each circle in the layout automatically. An automatically chosen radius is usually the smallest possible radius that obeys Minimal Node Distance.- Returns:
- boolean value.
-
getFixedCircleRadius
public int getFixedCircleRadius()
Get the fixed radius for all circles in the resulting layout. Minimal Node Distance will be ignored in this case.- Returns:
- int value.
-
setFixedCircleRadius
public void setFixedCircleRadius(int d)
Set the fixed radius for all circles in the resulting layout. Minimal Node Distance will be ignored in this case.- Parameters:
d- value.
-
getPreferredChildWedge
public int getPreferredChildWedge()
Get the angular range of the sector that will be reserved for children of a shape. The remaining angular range will be automatically used to accommodate the edge that connects to the root node.- Returns:
- int.
-
setPreferredChildWedge
public void setPreferredChildWedge(int d)
Set the angular range of the sector that will be reserved for children of a shape. The remaining angular range will be automatically used to accommodate the edge that connects to the root node.- Parameters:
d- value.
-
getMinimalLinkLength
public int getMinimalLinkLength()
Get the minimal length of a path that connects two shapes that lie on separate circles. The smaller the chosen value, the more compact the resulting layout.- Returns:
- int value.
-
setMinimalLinkLength
public void setMinimalLinkLength(int d)
Set the minimal length of a path that connects two shapes that lie on separate circles. The smaller the chosen value, the more compact the resulting layout.- Parameters:
d- value.
-
getMaximalDeviationAngle
public int getMaximalDeviationAngle()
Get the bigger the chosen value, the more compact the resulting layout. If a value smaller than 90 degrees, the tree-edges might cross through the circularly arranged groups of shapes.- Returns:
- value.
-
setMaximalDeviationAngle
public void setMaximalDeviationAngle(int d)
Set the bigger the chosen value, the more compact the resulting layout. If a value smaller than 90 degrees, the tree-edges might cross through the circularly arranged groups of shapes.- Parameters:
d- value.
-
getCompactnessFactor
public double getCompactnessFactor()
Get compactness factor. Adjusting this value can lead to a variety of differing layouts. For small values, the resulting layout will use much space and shapes tend to be far away from each other. Values around 0.5 lead to evenly distributed shapes, whereas values near 1.0 produce highly compact layouts.- Returns:
- the compactness factor
-
setCompactnessFactor
public void setCompactnessFactor(double d)
Set compactness factor.- Parameters:
d- value.
-
setAllowOverlaps
public void setAllowOverlaps(boolean b)
Set allow overlap. Can result in more compact layout- Parameters:
b- value.
-
getAllowOverlaps
public boolean getAllowOverlaps()
-
addProperty
public void addProperty(Property property)
Description copied from class:AbstractPropertyOptionsGroupAdds property to this group. DescriptionID will be reset. To add property with description useAbstractPropertyOptionsGroup.addProperty(Property, String)method.- Overrides:
addPropertyin classAbstractPropertyOptionsGroup- Parameters:
property- property to be added.
-
-