public class IlvPaletteCategory extends IlvPaletteCategoryChild implements IlvPaletteObject
IlvPaletteCategory
allows to organize the content of a palette in a hierarchy
of logical groups.IlvPalette
,
IlvPaletteSymbol
,
Serialized FormConstructor and Description |
---|
IlvPaletteCategory(String id)
Creates a new category and sets its ID.
|
Modifier and Type | Method and Description |
---|---|
void |
add(IlvPaletteCategory category)
Adds a category into this category.
|
void |
add(IlvPaletteObject object)
Adds an object into the category.
|
void |
add(IlvPaletteSymbol symbol)
Adds a symbol into the category.
|
void |
add(int index,
IlvPaletteCategory category)
Adds a category into this category at the specified position.
|
void |
add(int index,
IlvPaletteObject object)
Adds an object into the category at the specified position.
|
void |
add(int index,
IlvPaletteSymbol symbol)
Adds a symbol into the category at the specified position.
|
IlvPaletteObject |
copy()
Makes a deep copy of this category, meaning that it also copies the objects
(symbol or categories) contained into this category.
|
protected IlvPaletteBaseObject |
copy(IlvPaletteBaseObject owner)
Makes a copy of this object.
|
protected IlvPaletteBaseObject |
createNew()
Allocates a new object of the same type.
|
IlvPaletteObject |
getChild(int index)
Returns the child located at specified index in the category.
|
Enumeration |
getChildren()
Returns the nodes contained in the category.
|
int |
getChildrenCount()
Returns the number children contained in the category.
|
int |
indexOf(Object child)
Returns the position of the child in the category
|
void |
remove(IlvPaletteCategory category)
Removes a given category from the category.
|
void |
remove(IlvPaletteObject object)
Removes an object from the category.
|
void |
remove(IlvPaletteSymbol symbol)
Removes a symbol from this category.
|
void |
replace(IlvPaletteObject oldObject,
IlvPaletteObject newObject)
Replaces the old palette object with the new palette object.
|
getPalette, getParent, toString
getBaseObjectOwner, getDefaultLocale, getFullID, getID, getLongDescription, getLongDescription, getName, getName, getOwner, getShortDescription, getShortDescription, setDefaultLocale, setID, setLongDescription, setLongDescription, setName, setName, setOwner, setShortDescription, setShortDescription
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getID, getPalette, getParent
public IlvPaletteCategory(String id)
id
- The ID of the palette.public void add(IlvPaletteObject object)
IlvPaletteSymbol
)
or a category.object
- The node to add.public void add(int index, IlvPaletteObject object)
IlvPaletteSymbol
)
or a category.index
- The positionobject
- The node to add.public void add(IlvPaletteSymbol symbol)
symbolAdded
method of
PaletteListener
.symbol
- The symbol to add.PaletteEvent
,
PaletteListener
public void add(IlvPaletteCategory category)
categoryAdded
method
of PaletteListener
.category
- The category to add.PaletteEvent
,
PaletteListener
public void add(int index, IlvPaletteSymbol symbol)
symbolAdded
method of
PaletteListener
.index
- The position in the category.symbol
- The symbol to add.PaletteEvent
,
PaletteListener
public void add(int index, IlvPaletteCategory category)
categoryAdded
method
of PaletteListener
.index
- The position in the category.category
- The category to add.PaletteEvent
,
PaletteListener
public void remove(IlvPaletteObject object)
object
- The node to remove.public void remove(IlvPaletteSymbol symbol)
symbolRemoved
method
of PaletteListener
.symbol
- The symbol to remove.PaletteEvent
,
PaletteListener
public void remove(IlvPaletteCategory category)
categoryRemoved
method
of PaletteListener
.category
- The category to remove.PaletteEvent
,
PaletteListener
public void replace(IlvPaletteObject oldObject, IlvPaletteObject newObject)
IlvPaletteSymbol
)
or palette categories (IlvPaletteCategory
).
The new palette object will have the same index as the old palette
object.
Note that by replacing a palette category that contains children,
these children will be removed as well.oldObject
- The object to remove.newObject
- The object to add.public Enumeration getChildren()
IlvPaletteCategory
and IlvPaletteSymbol
public int getChildrenCount()
public IlvPaletteObject getChild(int index)
index
- index of the childIlvPaletteCategory
or IlvPaletteSymbol
public IlvPaletteObject copy()
copy
in interface IlvPaletteObject
copy
in class IlvPaletteCategoryChild
protected IlvPaletteBaseObject copy(IlvPaletteBaseObject owner)
copy
in class IlvPaletteCategoryChild
owner
- The desired owner of the copy.protected IlvPaletteBaseObject createNew()
createNew
in class IlvPaletteBaseObject
public int indexOf(Object child)
child
- the object for which to search.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.