public class DefaultPaletteSection extends PaletteSection
Modifier and Type | Class and Description |
---|---|
static class |
DefaultPaletteSection.Builder |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SECTION_SECTIONID
HashMap pageData keys
|
Constructor and Description |
---|
DefaultPaletteSection()
Deprecated.
Use the public static inner
Builder class to
construct a new instance. |
DefaultPaletteSection(java.lang.String name,
java.lang.String sectionId)
Deprecated.
Use the public static inner
Builder class to
construct a new instance. |
Modifier and Type | Method and Description |
---|---|
void |
addItem(PaletteItem item)
Add Palette Item
|
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
getData(java.lang.Object key)
Get data
|
PaletteItem |
getItem(java.lang.String itemId) |
java.util.Collection<PaletteItem> |
getItems()
Get Palette Items
Items are ordered by Weight followed by name.
|
java.lang.String |
getName()
Get display name.
|
java.util.List<PaletteItem> |
getPaletteItems()
Get Palette Items
Returns unsorted list; as opposed to getItems.
|
int |
hashCode() |
protected void |
removeAllItems()
Remove All Palette Items
|
void |
removeItem(PaletteItem item)
Remove Palette Item
|
protected void |
setData(java.lang.Object key,
java.lang.Object data) |
protected void |
setName(java.lang.String name)
Set display name.
|
java.lang.String |
toString() |
dispose, isEmpty
public static final java.lang.String SECTION_SECTIONID
@Deprecated public DefaultPaletteSection()
Builder
class to
construct a new instance.@Deprecated public DefaultPaletteSection(java.lang.String name, java.lang.String sectionId)
Builder
class to
construct a new instance.public java.lang.Object getData(java.lang.Object key)
Use to surface arbitrary additional data. This is used to identify the item to their clients without requiring clients to cast to a PaletteItem subclass.
For example, in XMLEF, use getData to get from a PaletteItem back to the identification of what type of element to create (XmlKey). XMLEF's PaletteItem instances will have this data.
getData
in class PaletteSection
protected void setData(java.lang.Object key, java.lang.Object data)
public PaletteItem getItem(java.lang.String itemId)
public void addItem(PaletteItem item)
item
- public void removeItem(PaletteItem item)
item
- protected void removeAllItems()
public java.util.Collection<PaletteItem> getItems()
getItems
in class PaletteSection
public java.util.List<PaletteItem> getPaletteItems()
public java.lang.String getName()
See attribute shortLabel.
getName
in class PaletteSection
protected void setName(java.lang.String name)
See attribute shortLabel.
public java.lang.String toString()
toString
in class PaletteSection
public boolean equals(java.lang.Object obj)
equals
in class PaletteSection
public int hashCode()
hashCode
in class PaletteSection