Class AbstractPomPanel<M extends ProgCommandAwareBeanModel>
java.lang.Object
org.bidib.wizard.mvc.pom.view.panel.AbstractPomPanel<M>
- All Implemented Interfaces:
PomResultListener
- Direct Known Subclasses:
AddressPanel,DirectAccessPanel,RailcomPanel,ResetDecoderPanel
public abstract class AbstractPomPanel<M extends ProgCommandAwareBeanModel>
extends Object
implements PomResultListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected CurrentAddressBeanModelprotected JLabelprotected com.jgoodies.binding.value.ValueModelprotected final PomProgrammerModelstatic final intstatic final intprotected final org.slf4j.Loggerprotected final PomResultProxyModelprotected ImageIconprotected final JButtonprotected com.jgoodies.binding.value.ValueModelprotected final JButtonprotected com.jgoodies.binding.value.ValueModel -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPomPanel(PomProgrammerModel cvProgrammerModel, CurrentAddressBeanModel currentAddressBeanModel) Creates a new instance of the AbstractPomPanel. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLogText(String logLine, Object... args) Add a new line to the logger area.voidvoidcreatePanel(PomValidationResultModel parentValidationModel) protected abstract voidcreateWorkerPanel(com.jgoodies.forms.builder.FormBuilder builder, int[] rowHolder, PomValidationResultModel parentValidationModel) protected voidprotected voidprotected voidprotected voidprotected abstract Objectprotected List<PomRequestListener> protected com.jgoodies.validation.ValidationResultModelbooleanisActive()protected voidPost construct operations.protected voidsendRequest(org.bidib.jbidibc.messages.PomAddressData decoderAddress, org.bidib.jbidibc.messages.enums.PomOperation operation, int cvNumber, int cvValue) voidsetActive(boolean active) Sets the listener active or inactive.voidsetProgCommandAwareBeanModel(M progCommandAwareBeanModel) voidsignalPomProgStateChanged(org.bidib.jbidibc.messages.enums.PomProgState pomProgState) Signals that the POM prog state has changed.protected voidstartTimeoutControl(int timeout) protected voidprotected abstract void
-
Field Details
-
LOGGER
protected final org.slf4j.Logger LOGGER -
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT- See Also:
-
DEFAULT_SUSI_READ_FIRST_TIMEOUT
public static final int DEFAULT_SUSI_READ_FIRST_TIMEOUT- See Also:
-
cvProgrammerModel
-
pomResultProxyModel
-
readButton
-
writeButton
-
readButtonEnabled
protected com.jgoodies.binding.value.ValueModel readButtonEnabled -
writeButtonEnabled
protected com.jgoodies.binding.value.ValueModel writeButtonEnabled -
currentOperationModel
protected com.jgoodies.binding.value.ValueModel currentOperationModel -
currentOperationLabel
-
progOperationUnknownIcon
-
activeTab
protected boolean activeTab -
currentAddressBeanModel
-
-
Constructor Details
-
AbstractPomPanel
public AbstractPomPanel(PomProgrammerModel cvProgrammerModel, CurrentAddressBeanModel currentAddressBeanModel) Creates a new instance of the AbstractPomPanel.- Parameters:
cvProgrammerModel- the POM programmer modelcurrentAddressBeanModel- the address bean model
-
-
Method Details
-
postConstruct
protected void postConstruct()Post construct operations. This method is called after the panel is build. -
getProgCommandAwareBeanModel
- Returns:
- the progCommandAwareBeanModel
-
setProgCommandAwareBeanModel
- Parameters:
progCommandAwareBeanModel- the progCommandAwareBeanModel
-
addPomRequestListener
-
getPomRequestListeners
-
setActive
public void setActive(boolean active) Description copied from interface:PomResultListenerSets the listener active or inactive.- Specified by:
setActivein interfacePomResultListener- Parameters:
active- the active flag
-
isActive
public boolean isActive()- Specified by:
isActivein interfacePomResultListener- Returns:
- listener is active
-
createWorkerPanel
protected abstract void createWorkerPanel(com.jgoodies.forms.builder.FormBuilder builder, int[] rowHolder, PomValidationResultModel parentValidationModel) -
createPanel
-
doBindButtons
protected void doBindButtons() -
triggerValidation
protected abstract void triggerValidation() -
getValidationResultModel
protected com.jgoodies.validation.ValidationResultModel getValidationResultModel() -
addLogText
Description copied from interface:PomResultListenerAdd a new line to the logger area.- Specified by:
addLogTextin interfacePomResultListener- Parameters:
logLine- the message to log. Use {} as placeholders for args.args- the args
-
clearLogArea
public void clearLogArea() -
getCurrentOperation
-
signalPomProgStateChanged
public void signalPomProgStateChanged(org.bidib.jbidibc.messages.enums.PomProgState pomProgState) Description copied from interface:PomResultListenerSignals that the POM prog state has changed.- Specified by:
signalPomProgStateChangedin interfacePomResultListener- Parameters:
pomProgState- the new POM prog state
-
sendRequest
protected void sendRequest(org.bidib.jbidibc.messages.PomAddressData decoderAddress, org.bidib.jbidibc.messages.enums.PomOperation operation, int cvNumber, int cvValue) -
disableInputElements
protected void disableInputElements() -
enableInputElements
protected void enableInputElements() -
fireNextCommand
protected void fireNextCommand() -
startTimeoutControl
protected void startTimeoutControl(int timeout) -
stopTimeoutControl
protected void stopTimeoutControl()
-