Package com.nomagic.magicdraw.ui.browser
Class TreeNodeAdornmentManager
- java.lang.Object
-
- com.nomagic.magicdraw.ui.browser.TreeNodeAdornmentManager
-
@OpenApiAll public final class TreeNodeAdornmentManager extends java.lang.Object
Tree node adornment manager provides registersIconAdornment
,NodeIconAdornment
,TextAdornment
, andNodeTextAdornment
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<IconAdornment>
iconAdornments
private static TreeNodeAdornmentManager
instance
private java.util.List<NodeIconAdornment>
nodeIconAdornments
private java.util.List<NodeTextAdornment>
nodeTextAdornments
private java.util.List<TextAdornment>
textAdornments
-
Constructor Summary
Constructors Modifier Constructor Description private
TreeNodeAdornmentManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIconAdornment(IconAdornment adornment)
Add icon adornment.void
addNodeIconAdornment(NodeIconAdornment adornment)
Add node icon adornment.void
addNodeTextAdornment(NodeTextAdornment adornment)
Add node text adornment.void
addTextAdornment(TextAdornment adornment)
Add text adornment.(package private) java.util.List<IconAdornment>
getIconAdornments()
Get icon adornments.static TreeNodeAdornmentManager
getInstance()
Get singleton instance.(package private) java.util.List<NodeIconAdornment>
getNodeIconAdornments()
Get node icon adornments.(package private) java.util.List<NodeTextAdornment>
getNodeTextAdornments()
Get node text adornments.(package private) java.util.List<TextAdornment>
getTextAdornments()
Get text adornments.private static <T> java.util.List<T>
modify(java.util.List<T> list, java.util.function.Consumer<java.util.List<T>> modificationFunction)
void
removeIconAdornment(IconAdornment adornment)
Remove registered icon adornment.void
removeNodeIconAdornment(NodeIconAdornment adornment)
Remove registered node icon adornment.void
removeTextAdornment(NodeTextAdornment adornment)
Remove registered node text adornment.void
removeTextAdornment(TextAdornment adornment)
Remove registered text adornment.
-
-
-
Field Detail
-
instance
private static final TreeNodeAdornmentManager instance
-
iconAdornments
private java.util.List<IconAdornment> iconAdornments
-
nodeIconAdornments
private java.util.List<NodeIconAdornment> nodeIconAdornments
-
textAdornments
private java.util.List<TextAdornment> textAdornments
-
nodeTextAdornments
private java.util.List<NodeTextAdornment> nodeTextAdornments
-
-
Method Detail
-
getInstance
public static TreeNodeAdornmentManager getInstance()
Get singleton instance.- Returns:
- instance.
-
addIconAdornment
public void addIconAdornment(IconAdornment adornment)
Add icon adornment.- Parameters:
adornment
- icon adornment to register.
-
removeIconAdornment
public void removeIconAdornment(IconAdornment adornment)
Remove registered icon adornment.- Parameters:
adornment
- icon adornment to remove.
-
addNodeIconAdornment
public void addNodeIconAdornment(NodeIconAdornment adornment)
Add node icon adornment.- Parameters:
adornment
- icon adornment to register
-
removeNodeIconAdornment
public void removeNodeIconAdornment(NodeIconAdornment adornment)
Remove registered node icon adornment.- Parameters:
adornment
- icon adornment to remove.
-
addTextAdornment
public void addTextAdornment(TextAdornment adornment)
Add text adornment.- Parameters:
adornment
- text adornment to register.
-
removeTextAdornment
public void removeTextAdornment(TextAdornment adornment)
Remove registered text adornment.- Parameters:
adornment
- text adornment to remove.
-
addNodeTextAdornment
public void addNodeTextAdornment(NodeTextAdornment adornment)
Add node text adornment.- Parameters:
adornment
- text adornment to register
-
removeTextAdornment
public void removeTextAdornment(NodeTextAdornment adornment)
Remove registered node text adornment.- Parameters:
adornment
- text adornment to remove
-
getIconAdornments
java.util.List<IconAdornment> getIconAdornments()
Get icon adornments.- Returns:
- icon adornments.
-
getNodeIconAdornments
java.util.List<NodeIconAdornment> getNodeIconAdornments()
Get node icon adornments.- Returns:
- node icon adornments.
-
getTextAdornments
java.util.List<TextAdornment> getTextAdornments()
Get text adornments.- Returns:
- text adornments.
-
getNodeTextAdornments
java.util.List<NodeTextAdornment> getNodeTextAdornments()
Get node text adornments.- Returns:
- text adornments
-
modify
private static <T> java.util.List<T> modify(java.util.List<T> list, java.util.function.Consumer<java.util.List<T>> modificationFunction)
-
-