public class ItemNavigatorPresentation extends Object implements INavigatorPresentation
CN_PREFERENCE_FLAGS_NAME, DEFAULT_COMPARATOR, EMPTY_ARRAY, FLAG_ADD_FILE_ITEM_PACKAGE_LOCATION, FLAG_ADD_FILE_ITEM_PROJECT, FLAG_ADD_FOLDER_PACKAGE_LOCATION, FLAG_ADD_FOLDER_PROJECT, FLAG_CUSTOM_1, FLAG_CUSTOM_2, FLAG_CUSTOM_3, FLAG_JAVA_SUPPORT, FLAG_PACKAGE_VIEW, FLAG_SHOW_DESIGNER_PROPERTIES, FLAG_SHOW_EMPTY_MODULE_FOLDERS, FLAG_SHOW_EMPTY_PACKAGES, FLAG_SHOW_FILE_ITEMS, FLAG_SHOW_SUBPROPERTIES, FLAGS_NORMAL, FLAGS_ONLY_FOLDERS
Constructor and Description |
---|
ItemNavigatorPresentation(String text,
Image image,
Object parent)
Constructs the viewer wrapper.
|
ItemNavigatorPresentation(String text,
Image image,
String description,
Object parent)
Constructs the viewer wrapper.
|
ItemNavigatorPresentation(String text,
StyledString styledText,
Image image,
String description,
Object parent)
Constructs the viewer wrapper.
|
ItemNavigatorPresentation(StyledString styledText,
Image image,
Object parent)
Constructs the viewer wrapper.
|
ItemNavigatorPresentation(StyledString styledText,
Image image,
String description,
Object parent)
Constructs the viewer wrapper.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Object child)
Adds a child node.
|
int |
getCNCategory()
Gets the category of this Common Navigator object, used for sorting.
|
Object[] |
getCNChildren(int flags)
Gets the children of this container for Common Navigator.
|
IViewerComparator |
getCNComparator()
Get the
Comparator object to sort the children for the Common Navigator when
presented visually in the tree. |
String |
getCNDescription(int flags)
Provide a description for the status bar view, if available.
|
Image |
getCNImage(int flags)
Gets the image for the Common Navigator.
|
Image |
getCNImage(int columnIndex,
int flags)
Gets the image for the Common Tree Viewer showing column contents.
|
Object |
getCNParent(int flags)
Gets the parent for Common Navigator.
|
StyledString |
getCNStyledText(int flags)
Gets the label text for the Common Navigator.
|
String |
getCNText(int flags)
Gets the label text for the Common Navigator.
|
String |
getCNText(int columnIndex,
int flags)
Gets the label text for the Common Navigator.
|
boolean |
hasCNChildren(int flags)
Returns whether the given element has children for the Common Navigator.
|
void |
setAdditionalText(String text)
Sets an additional text to display, only for normal text, not using styled text.
|
public ItemNavigatorPresentation(String text, Image image, Object parent)
public ItemNavigatorPresentation(String text, Image image, String description, Object parent)
public ItemNavigatorPresentation(StyledString styledText, Image image, Object parent)
public ItemNavigatorPresentation(StyledString styledText, Image image, String description, Object parent)
public ItemNavigatorPresentation(String text, StyledString styledText, Image image, String description, Object parent)
public void setAdditionalText(String text)
public Object getCNParent(int flags)
getCNParent
in interface INavigatorPresentation
flags
- The flag that apply is FLAG_PACKAGE_VIEW.public int getCNCategory()
getCNCategory
in interface INavigatorPresentation
public IViewerComparator getCNComparator()
Comparator
object to sort the children for the Common Navigator when
presented visually in the tree.
Subclasses are invited to override this method for other sorting schemes.
getCNComparator
in interface INavigatorPresentation
public boolean hasCNChildren(int flags)
hasCNChildren
in interface INavigatorPresentation
flags
- The flags: FLAG_PACKAGE_VIEW, FLAG_SHOW_EMPTY_MAIN_FOLDER, FLAG_SHOW_EMPTY_PACKAGES,
FLAG_SHOW_FILE_ITEMS, FLAG_SHOW_DESIGNER_PROPERTIES and FLAG_SHOW_SUBPROPERTIES are
relevant.true
if the node has children,
and false
if it has no children.public Object[] getCNChildren(int flags)
getCNChildren
in interface INavigatorPresentation
flags
- The flags: FLAG_PACKAGE_VIEW, FLAG_SHOW_EMPTY_MAIN_FOLDER, FLAG_SHOW_EMPTY_PACKAGES,
FLAG_SHOW_FILE_ITEMS, FLAG_SHOW_DESIGNER_PROPERTIES and FLAG_SHOW_SUBPROPERTIES are
relevant.public Image getCNImage(int flags)
getCNImage
in interface INavigatorPresentation
flags
- The flags for the image, see FLAG_IMAGE_*.null
if there is no image.public Image getCNImage(int columnIndex, int flags)
getCNImage
in interface INavigatorPresentation
columnIndex
- The zero-based index for the column (zero is never used, the method getCNImage() is called instead.flags
- The flags for the image, see FLAG_IMAGE_*.public String getCNText(int flags)
getCNText
in interface INavigatorPresentation
null
if there is no text.public String getCNText(int columnIndex, int flags)
getCNText
in interface INavigatorPresentation
columnIndex
- The zero-based index for the column (zero is never used, the method getCNText() is called instead.null
if there is no text for the given object at columnIndex.public StyledString getCNStyledText(int flags)
getCNStyledText
in interface INavigatorPresentation
flags
- The flags that apply are FLAG_ADD_FOLDER_PACKAGE_LOCATION, FLAG_ADD_FILE_ITEM_PACKAGE_LOCATION,
FLAG_ADD_FOLDER_PROJECT and FLAG_ADD_FILE_ITEM_PROJECT.public String getCNDescription(int flags)
The empty string ("") will be respected as a valid value if returned. Return null if the extension defers to the default method of supplying status bar descriptions.
getCNDescription
in interface INavigatorPresentation
public void add(Object child)
child
- The child node.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.