Class PaletteImpl
java.lang.Object
javax.swing.AbstractListModel
com.inductiveautomation.factorypmi.designer.palette.model.PaletteImpl
- All Implemented Interfaces:
- ProjectResourceListener,- Palette,- Serializable,- ListModel
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classImplementation copied (and simplified) from DefaultSingleSelectionModel and modified to handle objects, not ints.
- 
Field SummaryFieldsFields inherited from class javax.swing.AbstractListModellistenerList
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAuxiliaryAction(Action action) An action that may be added to the palette.voidaddGroup(PaletteItemGroup group) Adds a plugin palette tabvoidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) voidClears the selection so that nothing is pending a drop.Retrieves a list of custom palette item groupsgetElementAt(int index) Returns thePaletteItemGroupat the given locationReturns the PaletteItemGroup with the given name, or null if no such group existsgetGroupAt(int index) com.inductiveautomation.factorypmi.designer.palette.model.PaletteImpl.PaletteHandlerGet theResourceFilterused to filter resources this listener cares about.Get the selected, or "hot" item that is waiting to be dropped.intgetSize()The number of palette item groups.protected voidLoads the static components from palette.xmlbooleanReturns true if an item is selected.voidremoveGroup(PaletteItemGroup group) voidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) voidrename(PaletteItemGroup paletteItemGroup, String newName) voidresourcesCreated(String projectName, List<ChangeOperation.CreateResourceOperation> resources) voidresourcesDeleted(String projectName, List<ChangeOperation.DeleteResourceOperation> signatures) voidresourcesModified(String projectName, List<ChangeOperation.ModifyResourceOperation> resources) voidsanitizeName(PaletteItemGroup group) voidsetEnabled(boolean b) Enables/disables all palette item groups en-masse.toString()voidupdate(List<ProjectResource> changed) Updates the custom palettes as according to the given diffMethods inherited from class javax.swing.AbstractListModeladdListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListenerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.inductiveautomation.ignition.common.project.ProjectResourceListenermanifestChanged, onAfterChanges, onBeforeChanges
- 
Field Details- 
PALETTE_RESOURCE_TYPE
- 
PALETTEITEM_DATAFLAVOR
 
- 
- 
Constructor Details- 
PaletteImpl- Throws:
- SerializationException
 
 
- 
- 
Method Details- 
initializeStaticPaletteGroupsprotected void initializeStaticPaletteGroups()Loads the static components from palette.xml
- 
addAuxiliaryActionDescription copied from interface:PaletteAn action that may be added to the palette. Only supported by the collapsible palette- Specified by:
- addAuxiliaryActionin interface- Palette
 
- 
getAuxiliaryActions
- 
getElementAtReturns thePaletteItemGroupat the given location- Specified by:
- getElementAtin interface- ListModel
 
- 
getSizepublic int getSize()The number of palette item groups.
- 
isItemSelectedpublic boolean isItemSelected()Returns true if an item is selected. This means that the item is "hot" - waiting to be dropped onto a window.
- 
getSelectedItemGet the selected, or "hot" item that is waiting to be dropped.
- 
clearSelectionpublic void clearSelection()Clears the selection so that nothing is pending a drop.- Specified by:
- clearSelectionin interface- Palette
 
- 
setEnabledpublic void setEnabled(boolean b) Enables/disables all palette item groups en-masse.
- 
getGroupDescription copied from interface:PaletteReturns the PaletteItemGroup with the given name, or null if no such group exists
- 
getGroupAt
- 
addGroupDescription copied from interface:PaletteAdds a plugin palette tab
- 
addGroup
- 
sanitizeName
- 
getCustomPalettesRetrieves a list of custom palette item groups
- 
removeGroup
- 
rename
- 
getResourceFilterDescription copied from interface:ProjectResourceListenerGet theResourceFilterused to filter resources this listener cares about. Default is to care about all resources.- Specified by:
- getResourceFilterin interface- ProjectResourceListener
- Returns:
- the ResourceFilterused to filter resources this listener cares about.
 
- 
resourcesDeletedpublic void resourcesDeleted(String projectName, List<ChangeOperation.DeleteResourceOperation> signatures) - Specified by:
- resourcesDeletedin interface- ProjectResourceListener
 
- 
resourcesCreatedpublic void resourcesCreated(String projectName, List<ChangeOperation.CreateResourceOperation> resources) - Specified by:
- resourcesCreatedin interface- ProjectResourceListener
 
- 
resourcesModifiedpublic void resourcesModified(String projectName, List<ChangeOperation.ModifyResourceOperation> resources) - Specified by:
- resourcesModifiedin interface- ProjectResourceListener
 
- 
updateUpdates the custom palettes as according to the given diff
- 
toString
- 
getSelectionModel
- 
getImportExportHandlerpublic com.inductiveautomation.factorypmi.designer.palette.model.PaletteImpl.PaletteHandler getImportExportHandler()
- 
addPropertyChangeListener
- 
removePropertyChangeListener
 
-