Class MacroListPanel

java.lang.Object
org.bidib.wizard.mvc.main.view.panel.MacroListPanel
All Implemented Interfaces:
org.bidib.wizard.api.model.listener.MacroListListener, org.bidib.wizard.api.model.listener.NodeSelectionListener, LabelListMenuListener, TabPanelProvider, MacroSelectionListener, MacroListMenuListener, LabelChangedListener<org.bidib.wizard.api.model.Macro>, MacroActionListener, TabSelectionListener, TabVisibilityProvider, PendingChangesAware, ChangeLabelSupport

public class MacroListPanel extends Object implements MacroListMenuListener, org.bidib.wizard.api.model.listener.MacroListListener, MacroActionListener, MacroSelectionListener, ChangeLabelSupport, TabVisibilityProvider, TabPanelProvider, PendingChangesAware, TabSelectionListener, org.bidib.wizard.api.model.listener.NodeSelectionListener
  • Constructor Details

    • MacroListPanel

      public MacroListPanel(MacroPanelController macroPanelController, MainModel model, TabVisibilityListener tabVisibilityListener, org.bidib.wizard.common.service.SettingsService settingsService, org.bidib.wizard.common.labels.WizardLabelWrapper wizardLabelWrapper, org.bidib.wizard.common.labels.DefaultWizardLabelFactory bidibLabelFactory, StatusBar statusBar)
  • Method Details

    • setMacroPanelListener

      public void setMacroPanelListener(MacroPanelListener macroPanelListener)
      Parameters:
      macroPanelListener - the macroPanelListener
    • getComponent

      public JPanel getComponent()
      Specified by:
      getComponent in interface TabPanelProvider
      Specified by:
      getComponent in interface TabVisibilityProvider
      Returns:
      the visible component of the tab
    • setEnabled

      public void setEnabled(boolean enabled)
    • remoteStartMacro

      public void remoteStartMacro()
      Specified by:
      remoteStartMacro in interface MacroListMenuListener
    • transferMacro

      public void transferMacro()
      Specified by:
      transferMacro in interface MacroListMenuListener
    • exportMacro

      public void exportMacro()
      Specified by:
      exportMacro in interface MacroListMenuListener
    • startMacro

      public void startMacro()
      Specified by:
      startMacro in interface MacroListMenuListener
    • stopMacro

      public void stopMacro()
      Specified by:
      stopMacro in interface MacroListMenuListener
    • initializeMacro

      public void initializeMacro()
      Specified by:
      initializeMacro in interface MacroListMenuListener
    • saveMacro

      public void saveMacro()
      Specified by:
      saveMacro in interface MacroListMenuListener
    • reloadMacro

      public void reloadMacro()
      Specified by:
      reloadMacro in interface MacroListMenuListener
    • testMacro

      public void testMacro(boolean transferBeforeStart)
      Specified by:
      testMacro in interface MacroListMenuListener
    • listChanged

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

      public void macroChanged()
      Description copied from interface: MacroSelectionListener
      The selected macro has changed.
      Specified by:
      macroChanged in interface org.bidib.wizard.api.model.listener.MacroListListener
      Specified by:
      macroChanged in interface MacroSelectionListener
    • pendingChangesChanged

      public void pendingChangesChanged()
      Specified by:
      pendingChangesChanged in interface org.bidib.wizard.api.model.listener.MacroListListener
    • changeLabel

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

      public boolean isTabVisible()
      Specified by:
      isTabVisible in interface TabVisibilityProvider
      Returns:
      the tab visible state.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • exportMacro

      public void exportMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroActionListener
      Export the macro to an external file.
      Specified by:
      exportMacro in interface MacroActionListener
      Parameters:
      macro - the macro
    • importMacro

      public void importMacro()
      Description copied from interface: MacroActionListener
      Import the macro from an external file.
      Specified by:
      importMacro in interface MacroActionListener
      Specified by:
      importMacro in interface MacroListMenuListener
    • replaceMacro

      public void replaceMacro(org.bidib.wizard.api.model.Macro macro, boolean saveOnNode)
    • labelChanged

      public void labelChanged(org.bidib.wizard.api.model.Macro macro, String label)
      Description copied from interface: LabelChangedListener
      The label of the object has changed.
      Specified by:
      labelChanged in interface LabelChangedListener<org.bidib.wizard.api.model.Macro>
      Parameters:
      macro - the instance
      label - the new label
    • reloadMacro

      public void reloadMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroActionListener
      Reload macro from node.
      Specified by:
      reloadMacro in interface MacroActionListener
      Parameters:
      macro - the macro
    • saveMacro

      public void saveMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroActionListener
      Write the macro to the node into persistent memory.
      Specified by:
      saveMacro in interface MacroActionListener
      Parameters:
      macro - the macro
    • startMacro

      public void startMacro(org.bidib.wizard.api.model.Macro macro, boolean transferBeforeStart)
      Description copied from interface: MacroActionListener
      Start the macro.
      Specified by:
      startMacro in interface MacroActionListener
      Parameters:
      macro - the macro
      transferBeforeStart - transfer macro to node before start
    • stopMacro

      public void stopMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroActionListener
      Stop the macro.
      Specified by:
      stopMacro in interface MacroActionListener
      Parameters:
      macro - the macro
    • transferMacro

      public void transferMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroActionListener
      Write the macro to the node into transient memory.
      Specified by:
      transferMacro in interface MacroActionListener
      Parameters:
      macro - the macro
    • initializeMacro

      public void initializeMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroActionListener
      Clear the entries of the macro and set default values for cycles.
      Specified by:
      initializeMacro in interface MacroActionListener
      Parameters:
      macro - the macro
    • 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
    • addLabelChangedListener

      public void addLabelChangedListener(LabelChangedListener<org.bidib.wizard.api.model.Macro> l)
    • addListSelectionListener

      public void addListSelectionListener(ListSelectionListener l)
    • fireLabelChanged

      protected void fireLabelChanged(org.bidib.wizard.api.model.Macro macro, String label)
    • tabSelected

      public void tabSelected(boolean selected)
      Specified by:
      tabSelected in interface TabSelectionListener
      Parameters:
      selected - the tab is selected
    • editLabel

      public void editLabel(MouseEvent popupEvent)
      Specified by:
      editLabel in interface LabelListMenuListener
    • handleMouseEvent

      protected void handleMouseEvent(MouseEvent e, JPopupMenu popupMenu)
    • refreshView

      public void refreshView()
    • notifyMacrosChanged

      public void notifyMacrosChanged()
    • selectedNodeChanged

      public void selectedNodeChanged(org.bidib.wizard.api.model.NodeInterface selectedNode)
      Specified by:
      selectedNodeChanged in interface org.bidib.wizard.api.model.listener.NodeSelectionListener