Class DefaultPaletteItemGroup
- java.lang.Object
- 
- javax.swing.AbstractListModel
- 
- com.inductiveautomation.factorypmi.designer.palette.model.DefaultPaletteItemGroup
 
 
- 
- All Implemented Interfaces:
- PaletteItemGroup,- java.io.Serializable,- javax.swing.ListModel
 - Direct Known Subclasses:
- CustomPaletteItemGroup
 
 public class DefaultPaletteItemGroup extends javax.swing.AbstractListModel implements PaletteItemGroup - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.beans.PropertyChangeSupportchangeSupportprotected booleanenabledprotected javax.swing.Iconiconprotected java.beans.PropertyChangeListeneritemListenerprotected java.util.List<PaletteItem>itemsprotected java.lang.Stringname
 - 
Constructor SummaryConstructors Constructor Description DefaultPaletteItemGroup(java.lang.String name)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPaletteItem(PaletteItem item)Adds a new palette item into the groupvoidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)java.lang.ObjectgetElementAt(int index)javax.swing.IcongetIcon()Get the icon for this palette item group.java.lang.StringgetName()Returns the name of this palette item groupPaletteItemgetPaletteItem(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 rightbooleanisEnabled()booleanisMutable()Default implementation returns false.protected voiditemUpdated(PaletteItem item)voidremovePaletteItem(PaletteItem item)Removes the palette item at the given index.voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)voidsetEnabled(boolean enabled)voidsetIcon(javax.swing.Icon icon)voidsetName(java.lang.String name)Sets the name of this palette item groupvoidsetPaletteItem(int index, PaletteItem item)Sets the palette item at the index.java.lang.StringtoString()- 
Methods inherited from class javax.swing.AbstractListModeladdListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
- 
 
- 
- 
- 
Field Detail- 
changeSupportprotected java.beans.PropertyChangeSupport changeSupport 
 - 
nameprotected java.lang.String name 
 - 
itemsprotected java.util.List<PaletteItem> items 
 - 
enabledprotected boolean enabled 
 - 
iconprotected javax.swing.Icon icon 
 - 
itemListenerprotected java.beans.PropertyChangeListener itemListener 
 
- 
 - 
Method Detail- 
getElementAtpublic java.lang.Object getElementAt(int index) - Specified by:
- getElementAtin interface- javax.swing.ListModel
 
 - 
getSizepublic int getSize() - Specified by:
- getSizein interface- javax.swing.ListModel
 
 - 
getNamepublic java.lang.String getName() Description copied from interface:PaletteItemGroupReturns the name of this palette item group- Specified by:
- getNamein interface- PaletteItemGroup
 
 - 
addPaletteItempublic void addPaletteItem(PaletteItem item) Description copied from interface:PaletteItemGroupAdds a new palette item into the group- Specified by:
- addPaletteItemin interface- PaletteItemGroup
 
 - 
setPaletteItempublic void setPaletteItem(int index, PaletteItem item)Description copied from interface:PaletteItemGroupSets the palette item at the index. (Overwrites the item, not insert)- Specified by:
- setPaletteItemin interface- PaletteItemGroup
 
 - 
insertPaletteItempublic void insertPaletteItem(int index, PaletteItem item)Description copied from interface:PaletteItemGroupInserts the item at the given position, moving what is currently at that position to the right- Specified by:
- insertPaletteItemin interface- PaletteItemGroup
 
 - 
getPaletteItempublic PaletteItem getPaletteItem(int index) Description copied from interface:PaletteItemGroupReturn the palette item contained at positionindex- Specified by:
- getPaletteItemin interface- PaletteItemGroup
 
 - 
removePaletteItempublic void removePaletteItem(PaletteItem item) Description copied from interface:PaletteItemGroupRemoves the palette item at the given index.- Specified by:
- removePaletteItemin interface- PaletteItemGroup
 
 - 
itemUpdatedprotected void itemUpdated(PaletteItem item) 
 - 
isEnabledpublic boolean isEnabled() - Specified by:
- isEnabledin interface- PaletteItemGroup
 
 - 
isMutablepublic boolean isMutable() Default implementation returns false.- Specified by:
- isMutablein interface- PaletteItemGroup
 
 - 
setEnabledpublic void setEnabled(boolean enabled) - Specified by:
- setEnabledin interface- PaletteItemGroup
 
 - 
setNamepublic void setName(java.lang.String name) Description copied from interface:PaletteItemGroupSets the name of this palette item group- Specified by:
- setNamein interface- PaletteItemGroup
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
addPropertyChangeListenerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener) - Specified by:
- addPropertyChangeListenerin interface- PaletteItemGroup
 
 - 
addPropertyChangeListenerpublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)- Specified by:
- addPropertyChangeListenerin interface- PaletteItemGroup
 
 - 
removePropertyChangeListenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener) - Specified by:
- removePropertyChangeListenerin interface- PaletteItemGroup
 
 - 
removePropertyChangeListenerpublic void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)- Specified by:
- removePropertyChangeListenerin interface- PaletteItemGroup
 
 - 
getIconpublic javax.swing.Icon getIcon() Description copied from interface:PaletteItemGroupGet the icon for this palette item group. null is allowed.- Specified by:
- getIconin interface- PaletteItemGroup
 
 - 
setIconpublic void setIcon(javax.swing.Icon icon) 
 
- 
 
-