Class AbstractPtPanel<M extends ProgCommandAwareBeanModel>
java.lang.Object
org.bidib.wizard.mvc.pt.view.panel.AbstractPtPanel<M>
- All Implemented Interfaces:
PtResultListener
- Direct Known Subclasses:
AddressPanel,DirectAccessPanel,RailcomPanel
public abstract class AbstractPtPanel<M extends ProgCommandAwareBeanModel>
extends Object
implements PtResultListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected JLabelprotected com.jgoodies.binding.value.ValueModelprotected final PtProgrammerModelprotected final org.slf4j.Loggerprotected ImageIconprotected ImageIconprotected final PtResultProxyModelprotected final JButtonprotected com.jgoodies.binding.value.ValueModelprotected final JButtonprotected com.jgoodies.binding.value.ValueModel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLogText(String logLine, Object... args) Add a new line to the logger area.voidprotected abstract voidcreateWorkerPanel(com.jgoodies.forms.builder.FormBuilder builder, int[] rowHolder) protected voidprotected voidprotected voidprotected voidprotected abstract Objectprotected List<PtRequestListener> protected com.jgoodies.validation.ValidationResultModelbooleanisActive()protected voidsendRequest(org.bidib.jbidibc.messages.enums.PtOperation operation, int cvNumber, int cvValue) voidsetActive(boolean active) Sets the listener active or inactive.voidsetProgCommandAwareBeanModel(M progCommandAwareBeanModel) voidsignalCommandStationProgStateChanged(org.bidib.jbidibc.messages.enums.CommandStationProgState commandStationProgState) Signals that the command station prog state has changed.protected void
-
Field Details
-
LOGGER
protected final org.slf4j.Logger LOGGER -
cvProgrammerModel
-
ptResultProxyModel
-
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
-
progOperationEmptyIcon
-
activeTab
protected boolean activeTab
-
-
Constructor Details
-
AbstractPtPanel
-
-
Method Details
-
getProgCommandAwareBeanModel
- Returns:
- the progCommandAwareBeanModel
-
setProgCommandAwareBeanModel
- Parameters:
progCommandAwareBeanModel- the progCommandAwareBeanModel
-
addPtRequestListener
-
getPtRequestListeners
-
setActive
public void setActive(boolean active) Description copied from interface:PtResultListenerSets the listener active or inactive.- Specified by:
setActivein interfacePtResultListener- Parameters:
active- the active flag
-
isActive
public boolean isActive()- Specified by:
isActivein interfacePtResultListener- Returns:
- listener is active
-
createWorkerPanel
protected abstract void createWorkerPanel(com.jgoodies.forms.builder.FormBuilder builder, int[] rowHolder) -
createPanel
-
doBindButtons
protected void doBindButtons() -
triggerValidation
protected void triggerValidation() -
getValidationResultModel
protected com.jgoodies.validation.ValidationResultModel getValidationResultModel() -
addLogText
Description copied from interface:PtResultListenerAdd a new line to the logger area.- Specified by:
addLogTextin interfacePtResultListener- Parameters:
logLine- the message to log. Use {} as placeholders for args.args- the args
-
getCurrentOperation
-
signalCommandStationProgStateChanged
public void signalCommandStationProgStateChanged(org.bidib.jbidibc.messages.enums.CommandStationProgState commandStationProgState) Description copied from interface:PtResultListenerSignals that the command station prog state has changed.- Specified by:
signalCommandStationProgStateChangedin interfacePtResultListener- Parameters:
commandStationProgState- the new command station prog state
-
sendRequest
protected void sendRequest(org.bidib.jbidibc.messages.enums.PtOperation operation, int cvNumber, int cvValue) -
disableInputElements
protected void disableInputElements() -
enableInputElements
protected void enableInputElements() -
fireNextCommand
protected void fireNextCommand()
-