Class AbstractPaletteItemGroupView

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.factorypmi.designer.palette.views.AbstractPaletteItemGroupView
All Implemented Interfaces:
PaletteItemGroupView, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ListDataListener
Direct Known Subclasses:
AbstractCustomGroupView

public abstract class AbstractPaletteItemGroupView extends JPanel implements PaletteItemGroupView, ListDataListener
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • initComponents

      protected void initComponents()
    • configurePaletteItemViewComponent

      protected void configurePaletteItemViewComponent(PaletteItem item, JComponent component)
    • initPreComponents

      protected void initPreComponents()
      Subclasses may override this function to add components before the palette item components are added.
    • initPostComponents

      protected void initPostComponents()
      Subclasses may override this function to add components after the palette item components are added.
    • createPaletteItemViewComponent

      protected abstract JComponent createPaletteItemViewComponent(PaletteItem item)
      This function is called to create a JComponent for the given PaletteItem. The component should be an instance of PaletteItemView if the item is draggable for the DND TransferHandler to work.
    • getComponentIndex

      protected int getComponentIndex(int itemIndex)
      Translates the index of an item within the PaletteItemGroup to the index within this JPanel. Used for adding/removing/recreating items as the group morphs. The default implementation simply returns the item index.
    • getPaletteItemGroup

      public PaletteItemGroup getPaletteItemGroup()
      Specified by:
      getPaletteItemGroup in interface PaletteItemGroupView
    • contentsChanged

      public void contentsChanged(ListDataEvent e)
      Specified by:
      contentsChanged in interface ListDataListener
    • intervalAdded

      public void intervalAdded(ListDataEvent e)
      Specified by:
      intervalAdded in interface ListDataListener
    • intervalRemoved

      public void intervalRemoved(ListDataEvent e)
      Specified by:
      intervalRemoved in interface ListDataListener