Class PaletteImpl
- java.lang.Object
- 
- javax.swing.AbstractListModel
- 
- com.inductiveautomation.factorypmi.designer.palette.model.PaletteImpl
 
 
- 
- All Implemented Interfaces:
- ProjectResourceListener,- Palette,- java.io.Serializable,- javax.swing.ListModel
 
 public class PaletteImpl extends javax.swing.AbstractListModel implements Palette, ProjectResourceListener - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classPaletteImpl.SingleObjectSelectionModel<R>Implementation copied (and simplified) from DefaultSingleSelectionModel and modified to handle objects, not ints.
 - 
Field SummaryFields Modifier and Type Field Description static ResourceTypePALETTE_RESOURCE_TYPEstatic java.awt.datatransfer.DataFlavorPALETTEITEM_DATAFLAVOR
 - 
Constructor SummaryConstructors Constructor Description PaletteImpl(VisionDesignerInterface visionContext)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAuxiliaryAction(javax.swing.Action action)An action that may be added to the palette.voidaddGroup(PaletteItemGroup group)PaletteItemGroupaddGroup(java.lang.String name)Adds a plugin palette tabvoidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)voidclearSelection()Clears the selection so that nothing is pending a drop.java.util.List<javax.swing.Action>getAuxiliaryActions()java.util.List<CustomPaletteItemGroup>getCustomPalettes()Retrieves a list of custom palette item groupsjava.lang.ObjectgetElementAt(int index)Returns thePaletteItemGroupat the given locationPaletteItemGroupgetGroup(java.lang.String name)Returns the PaletteItemGroup with the given name, or null if no such group existsPaletteItemGroupgetGroupAt(int index)com.inductiveautomation.factorypmi.designer.palette.model.PaletteImpl.PaletteHandlergetImportExportHandler()ResourceFiltergetResourceFilter()Get theResourceFilterused to filter resources this listener cares about.PaletteItemgetSelectedItem()Get the selected, or "hot" item that is waiting to be dropped.PaletteImpl.SingleObjectSelectionModel<PaletteItem>getSelectionModel()intgetSize()The number of palette item groups.protected voidinitializeStaticPaletteGroups()Loads the static components from palette.xmlbooleanisItemSelected()Returns true if an item is selected.voidremoveGroup(PaletteItemGroup group)voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)voidrename(PaletteItemGroup paletteItemGroup, java.lang.String newName)voidresourcesCreated(java.lang.String projectName, java.util.List<ChangeOperation.CreateResourceOperation> resources)voidresourcesDeleted(java.lang.String projectName, java.util.List<ChangeOperation.DeleteResourceOperation> signatures)voidresourcesModified(java.lang.String projectName, java.util.List<ChangeOperation.ModifyResourceOperation> resources)voidsanitizeName(PaletteItemGroup group)voidsetEnabled(boolean b)Enables/disables all palette item groups en-masse.java.lang.StringtoString()voidupdate(java.util.List<ProjectResource> changed)Updates the custom palettes as according to the given diff- 
Methods inherited from class javax.swing.AbstractListModeladdListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface com.inductiveautomation.ignition.common.project.ProjectResourceListenermanifestChanged, onAfterChanges, onBeforeChanges
 
- 
 
- 
- 
- 
Field Detail- 
PALETTE_RESOURCE_TYPEpublic static final ResourceType PALETTE_RESOURCE_TYPE 
 - 
PALETTEITEM_DATAFLAVORpublic static java.awt.datatransfer.DataFlavor PALETTEITEM_DATAFLAVOR 
 
- 
 - 
Constructor Detail- 
PaletteImplpublic PaletteImpl(VisionDesignerInterface visionContext) throws SerializationException - Throws:
- SerializationException
 
 
- 
 - 
Method Detail- 
initializeStaticPaletteGroupsprotected void initializeStaticPaletteGroups() Loads the static components from palette.xml
 - 
addAuxiliaryActionpublic void addAuxiliaryAction(javax.swing.Action action) Description copied from interface:PaletteAn action that may be added to the palette. Only supported by the collapsible palette- Specified by:
- addAuxiliaryActionin interface- Palette
 
 - 
getAuxiliaryActionspublic java.util.List<javax.swing.Action> getAuxiliaryActions() 
 - 
getElementAtpublic java.lang.Object getElementAt(int index) Returns thePaletteItemGroupat the given location- Specified by:
- getElementAtin interface- javax.swing.ListModel
 
 - 
getSizepublic int getSize() The number of palette item groups.- Specified by:
- getSizein interface- javax.swing.ListModel
 
 - 
isItemSelectedpublic boolean isItemSelected() Returns true if an item is selected. This means that the item is "hot" - waiting to be dropped onto a window.
 - 
getSelectedItempublic PaletteItem getSelectedItem() Get 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.
 - 
getGrouppublic PaletteItemGroup getGroup(java.lang.String name) Description copied from interface:PaletteReturns the PaletteItemGroup with the given name, or null if no such group exists
 - 
getGroupAtpublic PaletteItemGroup getGroupAt(int index) 
 - 
addGrouppublic PaletteItemGroup addGroup(java.lang.String name) Description copied from interface:PaletteAdds a plugin palette tab
 - 
addGrouppublic void addGroup(PaletteItemGroup group) 
 - 
sanitizeNamepublic void sanitizeName(PaletteItemGroup group) 
 - 
getCustomPalettespublic java.util.List<CustomPaletteItemGroup> getCustomPalettes() Retrieves a list of custom palette item groups
 - 
removeGrouppublic void removeGroup(PaletteItemGroup group) 
 - 
renamepublic void rename(PaletteItemGroup paletteItemGroup, java.lang.String newName) 
 - 
getResourceFilter@Nonnull public ResourceFilter getResourceFilter() Description 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(java.lang.String projectName, java.util.List<ChangeOperation.DeleteResourceOperation> signatures)- Specified by:
- resourcesDeletedin interface- ProjectResourceListener
 
 - 
resourcesCreatedpublic void resourcesCreated(java.lang.String projectName, java.util.List<ChangeOperation.CreateResourceOperation> resources)- Specified by:
- resourcesCreatedin interface- ProjectResourceListener
 
 - 
resourcesModifiedpublic void resourcesModified(java.lang.String projectName, java.util.List<ChangeOperation.ModifyResourceOperation> resources)- Specified by:
- resourcesModifiedin interface- ProjectResourceListener
 
 - 
updatepublic void update(java.util.List<ProjectResource> changed) Updates the custom palettes as according to the given diff
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
getSelectionModelpublic PaletteImpl.SingleObjectSelectionModel<PaletteItem> getSelectionModel() 
 - 
getImportExportHandlerpublic com.inductiveautomation.factorypmi.designer.palette.model.PaletteImpl.PaletteHandler getImportExportHandler() 
 - 
addPropertyChangeListenerpublic void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
 - 
removePropertyChangeListenerpublic void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
 
- 
 
-