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, name
defined, 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, getName
equals, getId, hashCode, isDefined
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public 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()
HandleObject
toString
in class HandleObject
null
.public void undefine()
HandleObject
null
. It should also send notification to any
listeners that these properties have changed.undefine
in class HandleObject
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.