public class SwingSelectedState extends AbstractSwingState implements State, ChangeListener
mSilent
mIsEnabled, mIsInitialized, mListenerList, mName, mReason
Constructor and Description |
---|
SwingSelectedState(AbstractButton pButton)
Creates a new initialized state with the model of the handed button
as its state.
|
SwingSelectedState(ButtonModel pModel)
Creates a new initialized state with the handed model as state and
with an empty string as name.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
getInternalState()
Returns the selection state of our button model.
|
protected void |
setReason()
Set the source of the state as the reason for a change.
|
void |
stateChanged(ChangeEvent pEvent)
Invoked when the target of the listener has changed its state.
|
checkStateChange, isSilent, setSilent
addChangeListener, checkDisposed, dispose, fireStateChanged, getChangeReason, getDependents, getName, isDisposed, isEnabled, isInitialized, removeChangeListener, setName, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addChangeListener, dispose, getChangeReason, getDependents, getName, isDisposed, isEnabled, isInitialized, removeChangeListener, setName
public SwingSelectedState(AbstractButton pButton)
pButton
- the button, must not be nullpublic SwingSelectedState(ButtonModel pModel)
pModel
- the model, must not be nullIllegalArgumentException
- if pModel is nullpublic void stateChanged(ChangeEvent pEvent)
stateChanged
in interface ChangeListener
pEvent
- a ChangeEvent objectprotected boolean getInternalState()
getInternalState
in class AbstractSwingState
protected void setReason()
setReason
in class AbstractSwingState
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.