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,TabVisibilityProvider
public class StepControlPanel
extends Object
implements TabSelectionListener, CvDefinitionPanelProvider, TabPanelProvider, TabVisibilityProvider, org.bidib.wizard.api.model.listener.PortValueListener<org.bidib.wizard.model.ports.MotorPort>, org.bidib.wizard.common.script.switching.AccessoryScripting
-
Field Summary
Fields inherited from interface org.bidib.wizard.api.script.Scripting
KEY_OPTIONS, KEY_SCRIPT_ERRORS, OPTION_DISCONNECT_ON_ERROR -
Constructor Summary
ConstructorsConstructorDescriptionStepControlPanel(MainModel mainModel, StepControlModel stepControlModel, org.bidib.wizard.common.service.SettingsService settingsService, TabStatusListener tabStatusListener, FeedbackPortStatusChangeProvider feedbackPortStatusChangeProvider, StepControlControllerInterface stepControlController, StatusBar statusBar) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCvDefinitionRequestListener(org.bidib.wizard.api.model.listener.CvDefinitionRequestListener l) voidCheck if the panel has pending changes.voidconfigChanged(org.bidib.wizard.api.model.NodeInterface node, org.bidib.wizard.model.ports.MotorPort port) voidCreate the step control panel component.voidThe CV definition of the node has changed.voidcvDefinitionValuesChanged(boolean read, List<String> changedNames) The values of the current CV definition have changed.booleanvoidexecutionStateChanged(org.bidib.jbidibc.messages.enums.AccessoryExecutionState executionState, Integer accessoryId, Integer aspect, org.bidib.jbidibc.messages.AccessoryState accessoryState) protected voidprotected voidprotected voidfireSetDirectPosition(Integer directPosition) org.bidib.jbidibc.messages.enums.AccessoryExecutionStategetAccessoryExecutionState(org.bidib.wizard.api.model.SwitchingNodeInterface node, int accessoryNumber) getName()Class<?> inthashCode()booleanvoidlabelChanged(org.bidib.wizard.model.ports.MotorPort port, String label) protected voidmoveToTargetPosition(int targetPosition) Move the turntable to the provided position.voidsetActiveAspect(org.bidib.wizard.api.model.SwitchingNodeInterface node, int accessoryNumber, int aspectNumber) voidsetTurntableDegrees(double degree) voidtabSelected(boolean selected) voidvoidvalueChanged(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.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bidib.wizard.api.script.Scripting
echo, getAllNodes, getNodesByVidAndPid
-
Constructor Details
-
StepControlPanel
public StepControlPanel(MainModel mainModel, StepControlModel stepControlModel, org.bidib.wizard.common.service.SettingsService settingsService, TabStatusListener tabStatusListener, FeedbackPortStatusChangeProvider feedbackPortStatusChangeProvider, StepControlControllerInterface stepControlController, StatusBar statusBar)
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
isTabVisible
public boolean isTabVisible()- Specified by:
isTabVisiblein interfaceTabVisibilityProvider- Returns:
- the tab visible state.
-
createComponent
public void createComponent()Create the step control panel component. -
firePerformFlipRotate
protected void firePerformFlipRotate() -
fireGetPosition
protected void fireGetPosition() -
fireSetDirectPosition
-
moveToTargetPosition
Move 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
- Specified by:
getComponentin interfaceTabPanelProvider- Specified by:
getComponentin interfaceTabVisibilityProvider- Returns:
- the visible component of the tab
-
getName
-
tabSelected
public void tabSelected(boolean selected) - Specified by:
tabSelectedin interfaceTabSelectionListener- Parameters:
selected- the tab is selected
-
triggerLoadCvValues
public void triggerLoadCvValues() -
cvDefinitionChanged
public void cvDefinitionChanged()The CV definition of the node has changed. -
cvDefinitionValuesChanged
The values of the current CV definition have changed. Get the cv values and update the stepControlModel. -
executionStateChanged
-
checkPendingChanges
public void checkPendingChanges()Description copied from interface:CvDefinitionPanelProviderCheck if the panel has pending changes.- Specified by:
checkPendingChangesin interfaceCvDefinitionPanelProvider
-
writeConfigVariables
Description copied from interface:CvDefinitionPanelProviderWrite the config variables.- Specified by:
writeConfigVariablesin interfaceCvDefinitionPanelProvider- Parameters:
cvList- the list of config variables
-
labelChanged
- 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
- 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
-