|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.event.GuiseBoundPropertyObject
com.guiseframework.coupler.AbstractCardCoupler
public class AbstractCardCoupler
Abstract coupler to one or more cards in a CardControl.
This coupler is only functional when the given card is contained within a CardControl.
This coupler can behave as if a single card or multiple cards are connected, firing both the CARD_PROPERTY and CARDS_PROPERTY property change events when cards are changed.
If the card change results in the same card in the first position in the list, the CARD_PROPERTY is not fired.
| Field Summary | |
|---|---|
static java.lang.String |
CARD_PROPERTY
The bound property of the connected card. |
static java.lang.String |
CARDS_PROPERTY
The bound property of the connected cards. |
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Constructor Summary | |
|---|---|
AbstractCardCoupler(Component... cards)
Card constructor. |
|
| Method Summary | |
|---|---|
Component |
getCard()
|
protected CardControl |
getCardControl()
|
java.util.List<Component> |
getCards()
|
protected void |
installCardConstraints(Constraints constraints)
Installs appropriate listeners in a card's constraints. |
protected boolean |
isCardSelectable(Component card)
Determines whether the given card is selectable. |
protected void |
selectCard()
Selects the first connected card that is displayed and enabled. |
protected void |
selectCard(CardControl cardControl,
Component card)
Selects the specified card. |
void |
setCard(Component newCard)
Sets the connected card. |
void |
setCards(java.util.List<Component> newCards)
Sets the connected cards. |
protected void |
uninstallCardConstraints(Constraints constraints)
Uninstalls appropriate listeners from a card's constraints. |
protected void |
updateDisplayed()
Performs any needed updates based upon the displayed status of the constraints of the connected cards. |
protected void |
updateDisplayed(boolean displayed)
Updates the current displayed status. |
protected void |
updateEnabled()
Performs any needed updates based upon the enabled status of the constraints of the connected cards. |
protected void |
updateEnabled(boolean enabled)
Updates the current enabled status. |
protected void |
updateSelected()
Performs any needed updates based upon the currently selected card. |
protected void |
updateSelected(boolean selected)
Updates the current selected status. |
protected void |
updateTaskState()
Performs any needed updates based upon the current task status of the constraints of the connected cards. |
protected void |
updateTaskState(com.globalmentor.model.TaskState taskState)
Updates the current task state. |
| Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject |
|---|
getSession |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CARD_PROPERTY
public static final java.lang.String CARDS_PROPERTY
| Constructor Detail |
|---|
public AbstractCardCoupler(Component... cards)
cards - The new cards to connect, if any.| Method Detail |
|---|
public java.util.List<Component> getCards()
public Component getCard()
null if there are no connected cards.public void setCard(Component newCard)
newCard - The new card to be connected.CARD_PROPERTYpublic void setCards(java.util.List<Component> newCards)
newCards - The new cards to be connected.
java.lang.NullPointerException - if the given cards is null.CARDS_PROPERTYprotected CardControl getCardControl()
protected void installCardConstraints(Constraints constraints)
constraints - The card constraints being installed.protected void uninstallCardConstraints(Constraints constraints)
constraints - The card constraints being uninstalled.
protected void selectCard()
throws java.beans.PropertyVetoException
isCardSelectable(Component) and selectCard(CardControl, Component).
java.beans.PropertyVetoException - if the appropriate card could not be selected.protected boolean isCardSelectable(Component card)
card - The card to check.
true if the card can be selected.
protected void selectCard(CardControl cardControl,
Component card)
throws java.beans.PropertyVetoException
The - card control to use in selected the card.card - The card to select.
java.beans.PropertyVetoException - if the provided card could not be selected.protected void updateDisplayed()
true unless the constraints of all connected cards implement Displayable and return false for Displayable.isDisplayed().
This method calls updateDisplayed(boolean) with the result.
protected void updateDisplayed(boolean displayed)
displayed - The new displayed status.protected void updateEnabled()
true unless the constraints of all connected cards implement Enableable and return false for Enableable.isEnabled().
This method calls updateEnabled(boolean) with the result.
protected void updateEnabled(boolean enabled)
enabled - The new enabled status.protected void updateTaskState()
updateTaskState(TaskState).
protected void updateTaskState(com.globalmentor.model.TaskState taskState)
taskState - The new task state, or null if there is no task state.protected void updateSelected()
updateSelected(boolean).
protected void updateSelected(boolean selected)
selected - The new selected status.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||