public final class Category extends NamedHandleObject
A logical group for a set of commands. A command belongs to exactly one category. The category has no functional effect, but may be used in graphical tools that want to group the set of commands somehow.
description, namedefined, id, string| Modifier and Type | Method and Description |
|---|---|
void |
addCategoryListener(ICategoryListener categoryListener)
Adds a listener to this category that will be notified when this
category's state changes.
|
void |
define(String name,
String description)
Defines this category by giving it a name, and possibly a description as
well.
|
void |
removeCategoryListener(ICategoryListener categoryListener)
Removes a listener from this category.
|
String |
toString()
The string representation of this object -- for debugging purposes only.
|
void |
undefine()
Makes this object becomes undefined.
|
getDescription, getNameequals, getId, hashCode, isDefinedaddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectpublic final void addCategoryListener(ICategoryListener categoryListener)
categoryListener - The listener to be added; must not be null.public final void define(String name, String description)
Defines this category by giving it a name, and possibly a description as
well. The defined property automatically becomes true.
Notification is sent to all listeners that something has changed.
name - The name of this command; must not be null.description - The description for this command; may be null.public final void removeCategoryListener(ICategoryListener categoryListener)
categoryListener - The listener to be removed; must not be null.public String toString()
HandleObjecttoString in class HandleObjectnull.public void undefine()
HandleObjectnull. It should also send notification to any
listeners that these properties have changed.undefine in class HandleObjectGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.