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 PropertyChangeSupportprotected booleanprotected Iconprotected PropertyChangeListenerprotected List<PaletteItem>protected StringFields inherited from class javax.swing.AbstractListModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPaletteItem(PaletteItem item) Adds a new palette item into the groupvoidvoidaddPropertyChangeListener(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 positionindexintgetSize()voidinsertPaletteItem(int index, PaletteItem item) Inserts the item at the given position, moving what is currently at that position to the rightbooleanbooleanDefault implementation returns false.protected voiditemUpdated(PaletteItem item) voidremovePaletteItem(PaletteItem item) Removes the palette item at the given index.voidvoidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) voidsetEnabled(boolean enabled) voidvoidSets the name of this palette item groupvoidsetPaletteItem(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, removeListDataListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getElementAtin interfaceListModel
-
getSize
public int getSize() -
getName
Description copied from interface:PaletteItemGroupReturns the name of this palette item group- Specified by:
getNamein interfacePaletteItemGroup
-
addPaletteItem
Description copied from interface:PaletteItemGroupAdds a new palette item into the group- Specified by:
addPaletteItemin interfacePaletteItemGroup
-
setPaletteItem
Description copied from interface:PaletteItemGroupSets the palette item at the index. (Overwrites the item, not insert)- Specified by:
setPaletteItemin interfacePaletteItemGroup
-
insertPaletteItem
Description copied from interface:PaletteItemGroupInserts the item at the given position, moving what is currently at that position to the right- Specified by:
insertPaletteItemin interfacePaletteItemGroup
-
getPaletteItem
Description copied from interface:PaletteItemGroupReturn the palette item contained at positionindex- Specified by:
getPaletteItemin interfacePaletteItemGroup
-
removePaletteItem
Description copied from interface:PaletteItemGroupRemoves the palette item at the given index.- Specified by:
removePaletteItemin interfacePaletteItemGroup
-
itemUpdated
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfacePaletteItemGroup
-
isMutable
public boolean isMutable()Default implementation returns false.- Specified by:
isMutablein interfacePaletteItemGroup
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfacePaletteItemGroup
-
setName
Description copied from interface:PaletteItemGroupSets the name of this palette item group- Specified by:
setNamein interfacePaletteItemGroup
-
toString
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfacePaletteItemGroup
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListenerin interfacePaletteItemGroup
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListenerin interfacePaletteItemGroup
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListenerin interfacePaletteItemGroup
-
getIcon
Description copied from interface:PaletteItemGroupGet the icon for this palette item group. null is allowed.- Specified by:
getIconin interfacePaletteItemGroup
-
setIcon
-