Class MacroPanelController

java.lang.Object
org.bidib.wizard.mvc.main.controller.MacroPanelController
All Implemented Interfaces:
MacroPanelListener

public class MacroPanelController extends Object implements MacroPanelListener
  • Constructor Summary

    Constructors
    Constructor
    Description
    MacroPanelController(MainModel mainModel, StatusBar statusBar)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    labelsChangedEvent(org.bidib.wizard.common.labels.LabelsChangedEvent labelsChangedEvent)
     
    void
    macroChangedEvent(org.bidib.wizard.api.event.MacroChangedEvent macroChangedEvent)
     
    <E extends org.bidib.wizard.model.ports.Port<?>>
    void
    movePortsInAllMacros(MainModel model, org.bidib.wizard.api.model.NodeInterface node, E port, List<E> allPorts, int portsCount, IntFunction<Integer> portNumCalculator)
    Move the ports in all macros
    <E extends org.bidib.wizard.model.ports.Port<?>>
    void
    movePortsInMacros(MainModel model, org.bidib.wizard.api.model.NodeInterface node, E port, List<E> allPorts, int portsCount, IntFunction<Integer> portNumCalculator)
     
    protected <E extends org.bidib.wizard.model.ports.Port<?>>
    void
    processMacro(MainModel model, org.bidib.wizard.api.model.NodeInterface node, org.bidib.wizard.api.model.Macro macro, org.bidib.jbidibc.messages.enums.LcOutputType outputType, E port, List<E> allPorts, int portsCount, IntFunction<Integer> portNumCalculator)
     
    org.bidib.jbidibc.messages.enums.LcMacroState
    reloadMacro(org.bidib.wizard.api.model.Macro macro)
    Load the macro with the specified macro id from the node.
    org.bidib.jbidibc.messages.enums.LcMacroState
    saveMacro(org.bidib.wizard.api.model.Macro macro)
    Store the macro with the specified macro id on the node.
    org.bidib.jbidibc.messages.enums.LcMacroState
    startMacro(org.bidib.wizard.api.model.Macro macro, boolean transferBeforeStart)
    Start the macro with the specified macro id on the node.
    org.bidib.jbidibc.messages.enums.LcMacroState
    stopMacro(org.bidib.wizard.api.model.Macro macro)
    Stop the macro with the specified macro id on the node.
    void
    storeMacroOnNode(org.bidib.wizard.api.model.Macro macro)
    Store the macro on the node.
    void
    transferMacro(org.bidib.wizard.api.model.Macro macro)
    Transfer the macro to the node but don't store in permanent memory.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MacroPanelController

      public MacroPanelController(MainModel mainModel, StatusBar statusBar)
  • Method Details

    • createMacroListPanel

      public MacroListPanel createMacroListPanel(TabVisibilityListener tabVisibilityListener)
    • movePortsInAllMacros

      public <E extends org.bidib.wizard.model.ports.Port<?>> void movePortsInAllMacros(MainModel model, org.bidib.wizard.api.model.NodeInterface node, E port, List<E> allPorts, int portsCount, IntFunction<Integer> portNumCalculator)
      Move the ports in all macros
      Parameters:
      model - the model
      node - the node
      port - the start port
      allPorts - the ports
      portsCount - number of ports to move
    • movePortsInMacros

      public <E extends org.bidib.wizard.model.ports.Port<?>> void movePortsInMacros(MainModel model, org.bidib.wizard.api.model.NodeInterface node, E port, List<E> allPorts, int portsCount, IntFunction<Integer> portNumCalculator)
    • processMacro

      protected <E extends org.bidib.wizard.model.ports.Port<?>> void processMacro(MainModel model, org.bidib.wizard.api.model.NodeInterface node, org.bidib.wizard.api.model.Macro macro, org.bidib.jbidibc.messages.enums.LcOutputType outputType, E port, List<E> allPorts, int portsCount, IntFunction<Integer> portNumCalculator)
    • storeMacroOnNode

      public void storeMacroOnNode(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroPanelListener
      Store the macro on the node.
      Specified by:
      storeMacroOnNode in interface MacroPanelListener
      Parameters:
      macro - the macro
    • reloadMacro

      public org.bidib.jbidibc.messages.enums.LcMacroState reloadMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroPanelListener
      Load the macro with the specified macro id from the node.
      Specified by:
      reloadMacro in interface MacroPanelListener
      Parameters:
      macro - the macro
      Returns:
      the macro state
    • saveMacro

      public org.bidib.jbidibc.messages.enums.LcMacroState saveMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroPanelListener
      Store the macro with the specified macro id on the node.
      Specified by:
      saveMacro in interface MacroPanelListener
      Parameters:
      macro - the macro
      Returns:
      the macro state
    • startMacro

      public org.bidib.jbidibc.messages.enums.LcMacroState startMacro(org.bidib.wizard.api.model.Macro macro, boolean transferBeforeStart)
      Description copied from interface: MacroPanelListener
      Start the macro with the specified macro id on the node.
      Specified by:
      startMacro in interface MacroPanelListener
      Parameters:
      macro - the macro
      transferBeforeStart - transfer the macro before start
      Returns:
      the macro state
    • stopMacro

      public org.bidib.jbidibc.messages.enums.LcMacroState stopMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroPanelListener
      Stop the macro with the specified macro id on the node.
      Specified by:
      stopMacro in interface MacroPanelListener
      Parameters:
      macro - the macro
      Returns:
      the macro state
    • transferMacro

      public void transferMacro(org.bidib.wizard.api.model.Macro macro)
      Description copied from interface: MacroPanelListener
      Transfer the macro to the node but don't store in permanent memory.
      Specified by:
      transferMacro in interface MacroPanelListener
      Parameters:
      macro - the macro
    • labelsChangedEvent

      @EventListener(org.bidib.wizard.common.labels.LabelsChangedEvent.class) public void labelsChangedEvent(org.bidib.wizard.common.labels.LabelsChangedEvent labelsChangedEvent)
    • macroChangedEvent

      @EventListener(org.bidib.wizard.api.event.MacroChangedEvent.class) public void macroChangedEvent(org.bidib.wizard.api.event.MacroChangedEvent macroChangedEvent)