Class StepControlPanel
- java.lang.Object
-
- org.bidib.wizard.mvc.stepcontrol.view.StepControlPanel
-
- All Implemented Interfaces:
org.bidib.wizard.api.model.listener.PortListener<org.bidib.wizard.model.ports.MotorPort>,org.bidib.wizard.api.model.listener.PortValueListener<org.bidib.wizard.model.ports.MotorPort>,org.bidib.wizard.api.script.Scripting,TabPanelProvider,org.bidib.wizard.common.script.switching.AccessoryScripting,CvDefinitionPanelProvider,TabSelectionListener
public class StepControlPanel extends Object implements TabSelectionListener, CvDefinitionPanelProvider, TabPanelProvider, org.bidib.wizard.api.model.listener.PortValueListener<org.bidib.wizard.model.ports.MotorPort>, org.bidib.wizard.common.script.switching.AccessoryScripting
-
-
Constructor Summary
Constructors Constructor Description StepControlPanel(MainModel mainModel, StepControlModel stepControlModel, org.bidib.wizard.common.service.SettingsService settingsService, TabStatusListener tabStatusListener, FeedbackPortStatusChangeProvider feedbackPortStatusChangeProvider, StepControlControllerInterface stepControlController, StatusBar statusBar)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCvDefinitionRequestListener(org.bidib.wizard.api.model.listener.CvDefinitionRequestListener l)voidcheckPendingChanges()Check if the panel has pending changes.voidconfigChanged(org.bidib.wizard.api.model.NodeInterface node, org.bidib.wizard.model.ports.MotorPort port)voidcreateComponent()Create the step control panel component.voidcvDefinitionChanged()The CV definition of the node has changed.voidcvDefinitionValuesChanged(boolean read, List<String> changedNames)The values of the current CV definition have changed.voidexecutionStateChanged(org.bidib.jbidibc.messages.enums.AccessoryExecutionState executionState, Integer accessoryId, Integer aspect, org.bidib.jbidibc.messages.AccessoryState accessoryState)protected voidfireGetPosition()protected voidfirePerformFlipRotate()protected voidfireSetDirectPosition(Integer directPosition)org.bidib.jbidibc.messages.enums.AccessoryExecutionStategetAccessoryExecutionState(org.bidib.wizard.api.model.SwitchingNodeInterface node, int accessoryNumber)JPanelgetComponent()StringgetName()Class<?>getPortClass()voidlabelChanged(org.bidib.wizard.model.ports.MotorPort port, String label)protected voidmoveToTargetPosition(int targetPosition)Move the turntable to the provided position.voidresetCvValuesLoaded()voidsetActiveAspect(org.bidib.wizard.api.model.SwitchingNodeInterface node, int accessoryNumber, int aspectNumber)voidsetTurntableDegrees(double degree)voidtabSelected(boolean selected)voidtriggerLoadCvValues()voidvalueChanged(org.bidib.wizard.api.model.NodeInterface node, org.bidib.wizard.model.ports.MotorPort port)voidwriteConfigVariables(List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList)Write the config variables.
-
-
-
Constructor Detail
-
StepControlPanel
public StepControlPanel(MainModel mainModel, StepControlModel stepControlModel, org.bidib.wizard.common.service.SettingsService settingsService, TabStatusListener tabStatusListener, FeedbackPortStatusChangeProvider feedbackPortStatusChangeProvider, StepControlControllerInterface stepControlController, StatusBar statusBar)
-
-
Method Detail
-
createComponent
public void createComponent()
Create the step control panel component.
-
firePerformFlipRotate
protected void firePerformFlipRotate()
-
fireGetPosition
protected void fireGetPosition()
-
fireSetDirectPosition
protected void fireSetDirectPosition(Integer directPosition)
-
moveToTargetPosition
protected void moveToTargetPosition(int targetPosition) throws PositionOutOfRangeExceptionMove the turntable to the provided position.- Parameters:
targetPosition- the new position- Throws:
PositionOutOfRangeException
-
setTurntableDegrees
public void setTurntableDegrees(double degree)
-
addCvDefinitionRequestListener
public void addCvDefinitionRequestListener(org.bidib.wizard.api.model.listener.CvDefinitionRequestListener l)
-
getComponent
public JPanel getComponent()
- Specified by:
getComponentin interfaceTabPanelProvider
-
getName
public String getName()
-
tabSelected
public void tabSelected(boolean selected)
- Specified by:
tabSelectedin interfaceTabSelectionListener- Parameters:
selected- the tab is selected
-
resetCvValuesLoaded
public void resetCvValuesLoaded()
-
triggerLoadCvValues
public void triggerLoadCvValues()
-
cvDefinitionChanged
public void cvDefinitionChanged()
The CV definition of the node has changed.
-
cvDefinitionValuesChanged
public void cvDefinitionValuesChanged(boolean read, List<String> changedNames)The values of the current CV definition have changed. Get the cv values and update the stepControlModel.
-
executionStateChanged
public void executionStateChanged(org.bidib.jbidibc.messages.enums.AccessoryExecutionState executionState, Integer accessoryId, Integer aspect, org.bidib.jbidibc.messages.AccessoryState accessoryState)
-
checkPendingChanges
public void checkPendingChanges()
Description copied from interface:CvDefinitionPanelProviderCheck if the panel has pending changes.- Specified by:
checkPendingChangesin interfaceCvDefinitionPanelProvider
-
writeConfigVariables
public void writeConfigVariables(List<org.bidib.jbidibc.core.node.ConfigurationVariable> cvList)
Description copied from interface:CvDefinitionPanelProviderWrite the config variables.- Specified by:
writeConfigVariablesin interfaceCvDefinitionPanelProvider- Parameters:
cvList- the list of config variables
-
labelChanged
public void labelChanged(org.bidib.wizard.model.ports.MotorPort port, String label)- Specified by:
labelChangedin interfaceorg.bidib.wizard.api.model.listener.PortListener<org.bidib.wizard.model.ports.MotorPort>
-
valueChanged
public void valueChanged(org.bidib.wizard.api.model.NodeInterface node, org.bidib.wizard.model.ports.MotorPort port)- Specified by:
valueChangedin interfaceorg.bidib.wizard.api.model.listener.PortValueListener<org.bidib.wizard.model.ports.MotorPort>
-
configChanged
public void configChanged(org.bidib.wizard.api.model.NodeInterface node, org.bidib.wizard.model.ports.MotorPort port)- Specified by:
configChangedin interfaceorg.bidib.wizard.api.model.listener.PortListener<org.bidib.wizard.model.ports.MotorPort>
-
getPortClass
public Class<?> getPortClass()
- Specified by:
getPortClassin interfaceorg.bidib.wizard.api.model.listener.PortListener<org.bidib.wizard.model.ports.MotorPort>- Specified by:
getPortClassin interfaceorg.bidib.wizard.api.model.listener.PortValueListener<org.bidib.wizard.model.ports.MotorPort>
-
setActiveAspect
public void setActiveAspect(org.bidib.wizard.api.model.SwitchingNodeInterface node, int accessoryNumber, int aspectNumber)- Specified by:
setActiveAspectin interfaceorg.bidib.wizard.common.script.switching.AccessoryScripting
-
getAccessoryExecutionState
public org.bidib.jbidibc.messages.enums.AccessoryExecutionState getAccessoryExecutionState(org.bidib.wizard.api.model.SwitchingNodeInterface node, int accessoryNumber)- Specified by:
getAccessoryExecutionStatein interfaceorg.bidib.wizard.common.script.switching.AccessoryScripting
-
-