public pustka setEnabled (>public B) {
jeżeli (isEnabled () == B) {
powrót;
}
jeżeli (B) {
stateMask |= UMOŻLIWIAĆ;
} inny {
stateMask &= ~ENABLED;
// unarm i unpress, właśnie w skrzynka
stateMask &= ~ARMED;
stateMask &= ~PRESSED;
}
fireStateChanged ();
}
/**
* {@inheritDoc}
*
jawny pustka setSelected (setSelected B) {
jeżeli (this.isSelected () == B) {
powrót;
}
jeżeli (B) {
stateMask |= WYBIERAĆ;
} inny {
stateMask &= ~SELECTED;
}
fireItemStateChanged (
nowy ItemEvent (to,
ItemEvent.ITEM_STATE_CHANGED,
to,
B? ItemEvent.SELECTED: ItemEvent.DESELECTED));
fireStateChanged ();
}
|