Class PaletteImpl

    • Field Detail

      • PALETTE_RESOURCE_TYPE

        public static final ResourceType PALETTE_RESOURCE_TYPE
      • PALETTEITEM_DATAFLAVOR

        public static java.awt.datatransfer.DataFlavor PALETTEITEM_DATAFLAVOR
    • Method Detail

      • initializeStaticPaletteGroups

        protected void initializeStaticPaletteGroups()
        Loads the static components from palette.xml
      • addAuxiliaryAction

        public void addAuxiliaryAction​(javax.swing.Action action)
        Description copied from interface: Palette
        An action that may be added to the palette. Only supported by the collapsible palette
        Specified by:
        addAuxiliaryAction in interface Palette
      • getAuxiliaryActions

        public java.util.List<javax.swing.Action> getAuxiliaryActions()
      • getElementAt

        public java.lang.Object getElementAt​(int index)
        Returns the PaletteItemGroup at the given location
        Specified by:
        getElementAt in interface javax.swing.ListModel
      • getSize

        public int getSize()
        The number of palette item groups.
        Specified by:
        getSize in interface javax.swing.ListModel
      • 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

        public PaletteItem 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:
        clearSelection in interface Palette
      • setEnabled

        public void setEnabled​(boolean b)
        Enables/disables all palette item groups en-masse.
      • getGroup

        public PaletteItemGroup getGroup​(java.lang.String name)
        Description copied from interface: Palette
        Returns the PaletteItemGroup with the given name, or null if no such group exists
        Specified by:
        getGroup in interface Palette
      • getCustomPalettes

        public java.util.List<CustomPaletteItemGroup> getCustomPalettes()
        Retrieves a list of custom palette item groups
      • rename

        public void rename​(PaletteItemGroup paletteItemGroup,
                           java.lang.String newName)
      • update

        public void update​(java.util.List<ProjectResource> changed)
        Updates the custom palettes as according to the given diff
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getImportExportHandler

        public com.inductiveautomation.factorypmi.designer.palette.model.PaletteImpl.PaletteHandler getImportExportHandler()
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.lang.String propertyName,
                                              java.beans.PropertyChangeListener listener)
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.lang.String propertyName,
                                                 java.beans.PropertyChangeListener listener)