Class MacroPanelController
java.lang.Object
org.bidib.wizard.mvc.main.controller.MacroPanelController
- All Implemented Interfaces:
MacroPanelListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMacroListPanel(TabVisibilityListener tabVisibilityListener) voidlabelsChangedEvent(org.bidib.wizard.common.labels.LabelsChangedEvent labelsChangedEvent) voidmacroChangedEvent(org.bidib.wizard.api.event.MacroChangedEvent macroChangedEvent) <E extends org.bidib.wizard.model.ports.Port<?>>
voidmovePortsInAllMacros(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<?>>
voidmovePortsInMacros(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<?>>
voidprocessMacro(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.LcMacroStatereloadMacro(org.bidib.wizard.api.model.Macro macro) Load the macro with the specified macro id from the node.org.bidib.jbidibc.messages.enums.LcMacroStatesaveMacro(org.bidib.wizard.api.model.Macro macro) Store the macro with the specified macro id on the node.org.bidib.jbidibc.messages.enums.LcMacroStatestartMacro(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.LcMacroStatestopMacro(org.bidib.wizard.api.model.Macro macro) Stop the macro with the specified macro id on the node.voidstoreMacroOnNode(org.bidib.wizard.api.model.Macro macro) Store the macro on the node.voidtransferMacro(org.bidib.wizard.api.model.Macro macro) Transfer the macro to the node but don't store in permanent memory.
-
Constructor Details
-
MacroPanelController
-
-
Method Details
-
createMacroListPanel
-
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 modelnode- the nodeport- the start portallPorts- the portsportsCount- 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:MacroPanelListenerStore the macro on the node.- Specified by:
storeMacroOnNodein interfaceMacroPanelListener- Parameters:
macro- the macro
-
reloadMacro
public org.bidib.jbidibc.messages.enums.LcMacroState reloadMacro(org.bidib.wizard.api.model.Macro macro) Description copied from interface:MacroPanelListenerLoad the macro with the specified macro id from the node.- Specified by:
reloadMacroin interfaceMacroPanelListener- 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:MacroPanelListenerStore the macro with the specified macro id on the node.- Specified by:
saveMacroin interfaceMacroPanelListener- 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:MacroPanelListenerStart the macro with the specified macro id on the node.- Specified by:
startMacroin interfaceMacroPanelListener- Parameters:
macro- the macrotransferBeforeStart- 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:MacroPanelListenerStop the macro with the specified macro id on the node.- Specified by:
stopMacroin interfaceMacroPanelListener- Parameters:
macro- the macro- Returns:
- the macro state
-
transferMacro
public void transferMacro(org.bidib.wizard.api.model.Macro macro) Description copied from interface:MacroPanelListenerTransfer the macro to the node but don't store in permanent memory.- Specified by:
transferMacroin interfaceMacroPanelListener- 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)
-