org.jspresso.framework.view.descriptor.basic
Class AbstractCardViewDescriptor
java.lang.Object
org.jspresso.framework.util.descriptor.DefaultDescriptor
org.jspresso.framework.util.descriptor.DefaultIconDescriptor
org.jspresso.framework.view.descriptor.basic.BasicViewDescriptor
org.jspresso.framework.view.descriptor.basic.AbstractCardViewDescriptor
- All Implemented Interfaces:
- Cloneable, ISecurable, IPermIdSource, IDescriptor, IIconDescriptor, IGateAccessible, ICloneable, IActionable, ICardNameSelector, ICardViewDescriptor, IViewDescriptor
- Direct Known Subclasses:
- BasicCardViewDescriptor, EntityCardViewDescriptor, WorkspaceCardViewDescriptor
public abstract class AbstractCardViewDescriptor
- extends BasicViewDescriptor
- implements ICardViewDescriptor
This descriptor serves as abstract base implementation for card view
descriptor. A card view is a view stack made of children views (the cards)
where only the view (card) at the top of the stack is visible. The actual
child view to place on the top of the stack is dynamically determined based
on the bound model. This card determination strategy depends on the concrete
descriptor sub-types.
One might wonder why a card view is not considered as (and actually does not
inherit from) a composite view. The difference is that composite views are
used agregate views that displays - hopefully - different parts (the children
views) of the same model. A card view descriptor is rather used to
make the same UI region display different views depending on different models
(or different model states). Once the model is fixed, the card view behaves
exactly as its top card.
One of the most important usage of card views is when it is combine as the
detail in a master-detail view. The detail view may then change dynamically
based on the selected master.
- Version:
- $LastChangedRevision: 5621 $
- Author:
- Vincent Vandenschrick
| Methods inherited from class org.jspresso.framework.view.descriptor.basic.BasicViewDescriptor |
getActionMap, getBackground, getBorderType, getFont, getForeground, getGrantedRoles, getI18nDescription, getI18nName, getIconImageURL, getModelDescriptor, getPermId, getPreferredHeight, getPreferredSize, getPreferredWidth, getReadabilityGates, getSecondaryActionMap, getWritabilityGates, isReadOnly, setActionMap, setBackground, setBorderType, setFont, setForeground, setGrantedRoles, setModelDescriptor, setPermId, setPreferredHeight, setPreferredWidth, setReadabilityGates, setReadOnly, setSecondaryActionMap, setWritabilityGates |
AbstractCardViewDescriptor
public AbstractCardViewDescriptor()
getCardViewDescriptor
public IViewDescriptor getCardViewDescriptor(String cardName)
- Gets the child view registered in the card view by its name.
- Specified by:
getCardViewDescriptor in interface ICardViewDescriptor
- Parameters:
cardName - the card name to lookup the view for.
- Returns:
- the child view descriptor.
putCardViewDescriptor
protected void putCardViewDescriptor(String cardName,
IViewDescriptor cardViewDescriptor)
- Puts the child view registered in the card view by its name.
- Parameters:
cardName - the card name to lookup the view for.cardViewDescriptor - the child view descriptor.
setCardViewDescriptors
protected void setCardViewDescriptors(Map<String,IViewDescriptor> cardViewDescriptors)
- Sets the childViewDescriptors.
- Parameters:
cardViewDescriptors - the cardViewDescriptors to set.
Copyright © 2005-2012 Jspresso. All Rights Reserved.