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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImplementation copied (and simplified) from DefaultSingleSelectionModel and modified to handle objects, not ints. -
Field Summary
FieldsFields inherited from class javax.swing.AbstractListModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier 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.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 com.inductiveautomation.ignition.common.project.ProjectResourceListener
manifestChanged, onAfterChanges, onBeforeChanges
-
Field Details
-
PALETTE_RESOURCE_TYPE
-
PALETTEITEM_DATAFLAVOR
-
-
Constructor Details
-
PaletteImpl
- Throws:
SerializationException
-
-
Method Details
-
initializeStaticPaletteGroups
protected void initializeStaticPaletteGroups()Loads the static components from palette.xml -
addAuxiliaryAction
Description copied from interface:PaletteAn action that may be added to the palette. Only supported by the collapsible palette- Specified by:
addAuxiliaryActionin interfacePalette
-
getAuxiliaryActions
-
getElementAt
Returns thePaletteItemGroupat the given location- Specified by:
getElementAtin interfaceListModel
-
getSize
public int getSize()The number of palette item groups. -
isItemSelected
public boolean isItemSelected()Returns true if an item is selected. This means that the item is "hot" - waiting to be dropped onto a window. -
getSelectedItem
Get the selected, or "hot" item that is waiting to be dropped. -
clearSelection
public void clearSelection()Clears the selection so that nothing is pending a drop.- Specified by:
clearSelectionin interfacePalette
-
setEnabled
public void setEnabled(boolean b) Enables/disables all palette item groups en-masse. -
getGroup
Description copied from interface:PaletteReturns the PaletteItemGroup with the given name, or null if no such group exists -
getGroupAt
-
addGroup
Description copied from interface:PaletteAdds a plugin palette tab -
addGroup
-
sanitizeName
-
getCustomPalettes
Retrieves a list of custom palette item groups -
removeGroup
-
rename
-
getResourceFilter
Description copied from interface:ProjectResourceListenerGet theResourceFilterused to filter resources this listener cares about. Default is to care about all resources.- Specified by:
getResourceFilterin interfaceProjectResourceListener- Returns:
- the
ResourceFilterused to filter resources this listener cares about.
-
resourcesDeleted
public void resourcesDeleted(String projectName, List<ChangeOperation.DeleteResourceOperation> signatures) - Specified by:
resourcesDeletedin interfaceProjectResourceListener
-
resourcesCreated
public void resourcesCreated(String projectName, List<ChangeOperation.CreateResourceOperation> resources) - Specified by:
resourcesCreatedin interfaceProjectResourceListener
-
resourcesModified
public void resourcesModified(String projectName, List<ChangeOperation.ModifyResourceOperation> resources) - Specified by:
resourcesModifiedin interfaceProjectResourceListener
-
update
Updates the custom palettes as according to the given diff -
toString
-
getSelectionModel
-
getImportExportHandler
public com.inductiveautomation.factorypmi.designer.palette.model.PaletteImpl.PaletteHandler getImportExportHandler() -
addPropertyChangeListener
-
removePropertyChangeListener
-