Class StepControlModel
java.lang.Object
com.jgoodies.common.bean.Bean
com.jgoodies.binding.beans.Model
org.bidib.wizard.mvc.stepcontrol.model.StepControlModel
- All Implemented Interfaces:
com.jgoodies.common.bean.ObservableBean,com.jgoodies.common.bean.ObservableBean2,Serializable
public class StepControlModel
extends com.jgoodies.binding.beans.Model
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.jgoodies.common.bean.Bean
changeSupport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStepControlAspect(StepControlAspect stepControlAspect) voidCheck if the current configuration values for accel and decel are validvoidClear all values from the model.intgetAccel()intgetDecel()intorg.bidib.wizard.model.ports.MotorPortList<org.bidib.wizard.model.ports.SoundPort> intgetSpeed()com.jgoodies.common.collect.ArrayListModel<StepControlAspect> doubledoubleorg.bidib.wizard.model.stepcontrol.TurnTableTypebooleanvoidremoveStepControlAspect(StepControlAspect stepControlAspect) voidsetAccel(int accel) voidsetCurrentPosition(Long currentPosition) voidsetDecel(int decel) voidsetMaxConfiguredAspects(int maxConfiguredAspects) voidsetMotorPort(org.bidib.wizard.model.ports.MotorPort motorPort) voidsetOperationalMode(StepControlModel.OperationModeEnum operationalMode) voidsetPushInterval(Integer pushInterval) voidsetSelectedAspect(StepControlAspect selectedAspect) voidsetSoundActive(boolean soundActive) voidsetSoundPorts(List<org.bidib.wizard.model.ports.SoundPort> soundPorts) voidsetSpeed(int speed) voidsetStepControlAspects(List<StepControlAspect> stepControlAspects) voidsetTotalSteps(Long totalSteps) voidsetTurntableCurrentDegrees(double degrees) voidsetTurntableTargetDegrees(double degrees) voidsetTurnTableType(org.bidib.wizard.model.stepcontrol.TurnTableType turnTableType) voidupdateStepControlAspect(StepControlAspect originalAspect, StepControlAspect changedAspect) Methods inherited from class com.jgoodies.binding.beans.Model
createPropertyChangeSupport, firePropertyChangeMethods inherited from class com.jgoodies.common.bean.Bean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
PROPERTYNAME_SELECTED_ASPECT
- See Also:
-
PROPERTYNAME_STEPCONTROL_ASPECTS
- See Also:
-
PROPERTYNAME_CURRENT_POSITION
- See Also:
-
PROPERTYNAME_TOTAL_STEPS
- See Also:
-
PROPERTYNAME_MAX_CONFIGURED_ASPECTS
- See Also:
-
PROPERTYNAME_TURNTABLE_TYPE
- See Also:
-
PROPERTYNAME_SPEED
- See Also:
-
PROPERTYNAME_ACCEL
- See Also:
-
PROPERTYNAME_DECEL
- See Also:
-
PROPERTYNAME_PUSH_INTERVAL
- See Also:
-
PROPERTYNAME_OPERATIONAL_MODE
- See Also:
-
PROPERTYNAME_CURRENT_DEGREES
- See Also:
-
PROPERTYNAME_TARGET_DEGREES
- See Also:
-
PROPERTYNAME_MOTOR_PORT
- See Also:
-
PROPERTYNAME_SOUND_PORTS
- See Also:
-
PROPERTYNAME_SOUND_ACTIVE
- See Also:
-
-
Constructor Details
-
StepControlModel
public StepControlModel()
-
-
Method Details
-
getSelectedAspect
- Returns:
- the selectedAspect
-
setSelectedAspect
- Parameters:
selectedAspect- the selectedAspect to set
-
getStepControlAspectsListModel
public com.jgoodies.common.collect.ArrayListModel<StepControlAspect> getStepControlAspectsListModel()- Returns:
- the stepControlAspects list model
-
getStepControlAspects
- Returns:
- the stepControlAspects
-
addStepControlAspect
- Parameters:
stepControlAspect- the single stepControlAspect to add
-
removeStepControlAspect
- Parameters:
stepControlAspect- the single stepControlAspect to remove
-
updateStepControlAspect
public void updateStepControlAspect(StepControlAspect originalAspect, StepControlAspect changedAspect) -
setStepControlAspects
- Parameters:
stepControlAspects- the stepControlAspects to set
-
getMaxConfiguredAspects
public int getMaxConfiguredAspects()- Returns:
- the maxConfiguredAspects
-
setMaxConfiguredAspects
public void setMaxConfiguredAspects(int maxConfiguredAspects) - Parameters:
maxConfiguredAspects- the maxConfiguredAspects to set
-
getTurnTableType
public org.bidib.wizard.model.stepcontrol.TurnTableType getTurnTableType()- Returns:
- the turnTableType
-
setTurnTableType
public void setTurnTableType(org.bidib.wizard.model.stepcontrol.TurnTableType turnTableType) - Parameters:
turnTableType- the turnTableType to set
-
getCurrentPosition
- Returns:
- the currentPosition
-
setCurrentPosition
- Parameters:
currentPosition- the currentPosition to set
-
getTotalSteps
- Returns:
- the totalSteps
-
setTotalSteps
- Parameters:
totalSteps- the totalSteps to set
-
getSpeed
public int getSpeed()- Returns:
- the speed
-
setSpeed
public void setSpeed(int speed) - Parameters:
speed- the speed to set
-
getAccel
public int getAccel()- Returns:
- the accel
-
setAccel
- Parameters:
accel- the accel to set- Throws:
PropertyVetoException
-
getDecel
public int getDecel()- Returns:
- the decel
-
setDecel
- Parameters:
decel- the decel to set- Throws:
PropertyVetoException
-
checkValidConfigurationValues
public void checkValidConfigurationValues()Check if the current configuration values for accel and decel are valid- Throws:
IllegalArgumentException- thrown if invalid values detected
-
getOperationalMode
- Returns:
- the operationalMode
-
setOperationalMode
- Parameters:
operationalMode- the operationalMode to set
-
clearModel
public void clearModel()Clear all values from the model. -
setTurntableCurrentDegrees
public void setTurntableCurrentDegrees(double degrees) -
getTurntableCurrentDegrees
public double getTurntableCurrentDegrees() -
setTurntableTargetDegrees
public void setTurntableTargetDegrees(double degrees) -
getTurntableTargetDegrees
public double getTurntableTargetDegrees() -
getMotorPort
public org.bidib.wizard.model.ports.MotorPort getMotorPort()- Returns:
- the motorPort
-
setMotorPort
public void setMotorPort(org.bidib.wizard.model.ports.MotorPort motorPort) - Parameters:
motorPort- the motorPort to set
-
getSoundPorts
- Returns:
- the soundPorts
-
setSoundPorts
- Parameters:
soundPorts- the soundPorts to set
-
setPushInterval
- Parameters:
pushInterval- the push interval to set
-
getPushInterval
- Returns:
- the push interval
-
isSoundActive
public boolean isSoundActive()- Returns:
- the soundActive
-
setSoundActive
public void setSoundActive(boolean soundActive) - Parameters:
soundActive- the soundActive to set
-