Class SimpleHierarchicalPortListPanel<TM extends SimpleHierarchicalPortTableModel<S,P,M>,S extends org.bidib.wizard.model.status.BidibStatus,P extends org.bidib.wizard.model.ports.Port<S>,L extends org.bidib.wizard.api.model.listener.PortListener<P>,M extends PortModelListener<P>>

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.bidib.wizard.mvc.main.view.panel.SimpleHierarchicalPortListPanel<TM,S,P,L,M>
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, org.bidib.wizard.api.model.listener.PortListenerProvider<P>, org.bidib.wizard.api.model.listener.PortListListener, PendingChangesAware, ChangeLabelSupport
Direct Known Subclasses:
BacklightPortListPanel, InputPortListPanel, LightPortListPanel, MotorPortListPanel, ServoPortListPanel, SoundPortListPanel, SwitchPairPortListPanel, SwitchPortListPanel

public abstract class SimpleHierarchicalPortListPanel<TM extends SimpleHierarchicalPortTableModel<S,P,M>,S extends org.bidib.wizard.model.status.BidibStatus,P extends org.bidib.wizard.model.ports.Port<S>,L extends org.bidib.wizard.api.model.listener.PortListener<P>,M extends PortModelListener<P>> extends JPanel implements org.bidib.wizard.api.model.listener.PortListListener, ChangeLabelSupport, org.bidib.wizard.api.model.listener.PortListenerProvider<P>, PendingChangesAware
See Also:
  • Field Details

  • Constructor Details

    • SimpleHierarchicalPortListPanel

      public SimpleHierarchicalPortListPanel(TM tableModel, String emptyTableText, io.reactivex.rxjava3.subjects.PublishSubject<org.bidib.wizard.model.ports.event.PortConfigChangeEvent> portConfigChangeEventSubject, NodeSelectionProvider nodeSelectionProvider)
  • Method Details

    • getTableModel

      protected SimplePortTableModel<S,P,M> getTableModel()
    • createTable

      protected void createTable(TM tableModel, String emptyTableText, io.reactivex.rxjava3.subjects.PublishSubject<org.bidib.wizard.model.ports.event.PortConfigChangeEvent> portConfigChangeEventSubject, NodeSelectionProvider nodeSelectionProvider)
    • createPortTable

      protected AbstractPortHierarchicalTable<P> createPortTable(TM tableModel, String emptyTableText)
    • createPortListMenuListener

      protected PortListMenuListener createPortListMenuListener(AbstractPortHierarchicalTable<P> portTable, NodeSelectionProvider nodeSelectionProvider, Supplier<InsertPortsAware<TM>> insertPortsAware)
    • setPortListener

      public void setPortListener(L listener)
    • getName

      public String getName()
      Overrides:
      getName in class Component
    • collapseAllRows

      protected void collapseAllRows()
    • expandAllRows

      protected void expandAllRows()
    • listChanged

      public void listChanged()
      Specified by:
      listChanged in interface org.bidib.wizard.api.model.listener.PortListListener
    • refreshPorts

      public void refreshPorts()
      Specified by:
      refreshPorts in interface org.bidib.wizard.api.model.listener.PortListListener
    • processListChanged

      protected void processListChanged()
    • packColumn

      protected void packColumn()
    • isPackLastColumn

      Returns:
      the last column must be packed after all rows are added.
    • changeLabel

      public void changeLabel(org.bidib.wizard.common.script.node.types.TargetType portType)
      Specified by:
      changeLabel in interface ChangeLabelSupport
    • getPorts

      protected abstract List<P> getPorts()
      Get the list of ports.
      Returns:
      the list of ports
    • getPortListener

      public org.bidib.wizard.api.model.listener.PortListener<P> getPortListener()
      Specified by:
      getPortListener in interface org.bidib.wizard.api.model.listener.PortListenerProvider<TM extends SimpleHierarchicalPortTableModel<S,P,M>>
    • hasPendingChanges

      public boolean hasPendingChanges()
      Specified by:
      hasPendingChanges in interface PendingChangesAware
      Returns:
      true pending changes detected, false no pending changes detected
    • savePendingChanges

      public void savePendingChanges()
      Description copied from interface: PendingChangesAware
      Save the pending changes.
      Specified by:
      savePendingChanges in interface PendingChangesAware