Class DefaultPaletteItemGroup
java.lang.Object
javax.swing.AbstractListModel
com.inductiveautomation.factorypmi.designer.palette.model.DefaultPaletteItemGroup
- All Implemented Interfaces:
PaletteItemGroup
,Serializable
,ListModel
- Direct Known Subclasses:
CustomPaletteItemGroup
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PropertyChangeSupport
protected boolean
protected Icon
protected PropertyChangeListener
protected List<PaletteItem>
protected String
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPaletteItem
(PaletteItem item) Adds a new palette item into the groupvoid
void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) getElementAt
(int index) getIcon()
Get the icon for this palette item group.getName()
Returns the name of this palette item groupgetPaletteItem
(int index) Return the palette item contained at positionindex
int
getSize()
void
insertPaletteItem
(int index, PaletteItem item) Inserts the item at the given position, moving what is currently at that position to the rightboolean
boolean
Default implementation returns false.protected void
itemUpdated
(PaletteItem item) void
removePaletteItem
(PaletteItem item) Removes the palette item at the given index.void
void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) void
setEnabled
(boolean enabled) void
void
Sets the name of this palette item groupvoid
setPaletteItem
(int index, PaletteItem item) Sets the palette item at the index.toString()
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
-
Field Details
-
changeSupport
-
name
-
items
-
enabled
protected boolean enabled -
icon
-
itemListener
-
-
Constructor Details
-
DefaultPaletteItemGroup
-
-
Method Details
-
getElementAt
- Specified by:
getElementAt
in interfaceListModel
-
getSize
public int getSize() -
getName
Description copied from interface:PaletteItemGroup
Returns the name of this palette item group- Specified by:
getName
in interfacePaletteItemGroup
-
addPaletteItem
Description copied from interface:PaletteItemGroup
Adds a new palette item into the group- Specified by:
addPaletteItem
in interfacePaletteItemGroup
-
setPaletteItem
Description copied from interface:PaletteItemGroup
Sets the palette item at the index. (Overwrites the item, not insert)- Specified by:
setPaletteItem
in interfacePaletteItemGroup
-
insertPaletteItem
Description copied from interface:PaletteItemGroup
Inserts the item at the given position, moving what is currently at that position to the right- Specified by:
insertPaletteItem
in interfacePaletteItemGroup
-
getPaletteItem
Description copied from interface:PaletteItemGroup
Return the palette item contained at positionindex
- Specified by:
getPaletteItem
in interfacePaletteItemGroup
-
removePaletteItem
Description copied from interface:PaletteItemGroup
Removes the palette item at the given index.- Specified by:
removePaletteItem
in interfacePaletteItemGroup
-
itemUpdated
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfacePaletteItemGroup
-
isMutable
public boolean isMutable()Default implementation returns false.- Specified by:
isMutable
in interfacePaletteItemGroup
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfacePaletteItemGroup
-
setName
Description copied from interface:PaletteItemGroup
Sets the name of this palette item group- Specified by:
setName
in interfacePaletteItemGroup
-
toString
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListener
in interfacePaletteItemGroup
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListener
in interfacePaletteItemGroup
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListener
in interfacePaletteItemGroup
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListener
in interfacePaletteItemGroup
-
getIcon
Description copied from interface:PaletteItemGroup
Get the icon for this palette item group. null is allowed.- Specified by:
getIcon
in interfacePaletteItemGroup
-
setIcon
-