|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jspresso.framework.util.descriptor.DefaultDescriptor
org.jspresso.framework.util.descriptor.DefaultIconDescriptor
org.jspresso.framework.view.descriptor.basic.BasicViewDescriptor
org.jspresso.framework.view.descriptor.basic.BasicPropertyViewDescriptor
public class BasicPropertyViewDescriptor
This view descriptor serves 2 purposes :
| Field Summary |
|---|
| Fields inherited from interface org.jspresso.framework.util.descriptor.IDescriptor |
|---|
DESCRIPTION, LAST_UPDATED, NAME |
| Constructor Summary | |
|---|---|
BasicPropertyViewDescriptor()
|
|
| Method Summary | |
|---|---|
IAction |
getAction()
Gets the action. |
List<String> |
getDefaultRenderedChildProperties()
Gets the default child properties to display in case of a complex property. |
EHorizontalAlignment |
getHorizontalAlignment()
Returns the horizontal alignment used for displaying the property. |
String |
getLabelBackground()
Gets the labelBackground. |
String |
getLabelFont()
Gets the labelFont. |
String |
getLabelForeground()
Gets the labelForeground. |
protected Integer |
getPreferredWidth()
Gets the preferredWidth. |
List<String> |
getRenderedChildProperties()
Gets the child properties to display in case of a complex property. |
Integer |
getWidth()
Gets the width. |
boolean |
isReadOnly()
Queries the model property descriptor to determine read-only state. |
boolean |
isSortable()
Gets the sortability. |
void |
setAction(IAction action)
Configures the action to be triggered when acting on this property. |
void |
setHorizontalAlignment(EHorizontalAlignment horizontalAlignment)
This property allows to control the property alignment in views that support it. |
void |
setLabelBackground(String labelBackground)
When the property has to be labelled (e.g. in a component view), this property defines the background color of the corresponding label. |
void |
setLabelFont(String labelFont)
When the property has to be labelled (e.g. in a component view), this property defines the font of the corresponding label. |
void |
setLabelForeground(String labelForeground)
When the property has to be labelled (e.g. in a component view), this property defines the foregroud color of the corresponding label. |
void |
setRenderedChildProperties(List<String> renderedChildProperties)
Whenever the property decriptor backing the view is not scalar, this property allows to override which of the referenced component fields should be displayed : as columns when the rendered property is a collection property as fields when the rendered property is a reference property The property must be configured with a List containing the
property names to render for the child element(s). |
void |
setSortable(boolean sortable)
Configure the sortability of a property view when used to defines a table column for instance. |
void |
setWidth(Integer width)
When the property has to be displayed in a grid-like layout (e.g. in a component view), this property defines the umber of grid columns the corresponding UI component will span. |
| Methods inherited from class org.jspresso.framework.view.descriptor.basic.BasicViewDescriptor |
|---|
getActionMap, getBackground, getBorderType, getFont, getForeground, getGrantedRoles, getI18nDescription, getI18nName, getIconImageURL, getModelDescriptor, getPermId, getPreferredHeight, getPreferredSize, getReadabilityGates, getSecondaryActionMap, getWritabilityGates, setActionMap, setBackground, setBorderType, setFont, setForeground, setGrantedRoles, setModelDescriptor, setPermId, setPreferredHeight, setPreferredWidth, setReadabilityGates, setReadOnly, setSecondaryActionMap, setWritabilityGates |
| Methods inherited from class org.jspresso.framework.util.descriptor.DefaultIconDescriptor |
|---|
clone, setIconImageURL |
| Methods inherited from class org.jspresso.framework.util.descriptor.DefaultDescriptor |
|---|
getDescription, getI18nNameKey, getLastUpdated, getName, setDescription, setI18nNameKey, setLastUpdated, setName |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jspresso.framework.view.descriptor.IViewDescriptor |
|---|
getBackground, getBorderType, getFont, getForeground, getModelDescriptor, getPreferredSize |
| Methods inherited from interface org.jspresso.framework.util.descriptor.IIconDescriptor |
|---|
getIconImageURL |
| Methods inherited from interface org.jspresso.framework.util.descriptor.IDescriptor |
|---|
getDescription, getI18nDescription, getI18nName, getLastUpdated, getName |
| Methods inherited from interface org.jspresso.framework.security.ISecurable |
|---|
getGrantedRoles |
| Methods inherited from interface org.jspresso.framework.view.action.IActionable |
|---|
getActionMap, getSecondaryActionMap |
| Methods inherited from interface org.jspresso.framework.util.gate.IGateAccessible |
|---|
getReadabilityGates, getWritabilityGates |
| Methods inherited from interface org.jspresso.framework.util.automation.IPermIdSource |
|---|
getPermId, setPermId |
| Constructor Detail |
|---|
public BasicPropertyViewDescriptor()
| Method Detail |
|---|
public String getLabelBackground()
getLabelBackground in interface IPropertyViewDescriptorpublic String getLabelFont()
getLabelFont in interface IPropertyViewDescriptorpublic String getLabelForeground()
getLabelForeground in interface IPropertyViewDescriptorpublic List<String> getRenderedChildProperties()
getRenderedChildProperties in interface IPropertyViewDescriptorpublic List<String> getDefaultRenderedChildProperties()
getDefaultRenderedChildProperties in interface IPropertyViewDescriptorpublic Integer getWidth()
getWidth in interface IPropertyViewDescriptorpublic void setLabelBackground(String labelBackground)
Default value is null, meaning use UI default.
labelBackground - the labelBackground to set.public void setLabelFont(String labelFont)
Default value is null, meaning use default component font.
labelFont - the labelFont to set.public void setLabelForeground(String labelForeground)
Default value is null, meaning use UI default.
labelForeground - the labelForeground to set.public void setRenderedChildProperties(List<String> renderedChildProperties)
List containing the
property names to render for the child element(s).
A null value (default), means that the non-scalar property
will be rendered using default rendered properties as specified in its
referenced model descriptor.
Please note that this is quite unusual to embed non-scalar properties directly in a property view. Although permitted, you won't have as much flexibility in the content layouting as you would have when using composite views; so the latter is by far recommended.
renderedChildProperties - the renderedChildProperties to set.public void setWidth(Integer width)
Default value is null, meaning use default span of 1.
width - the width to set.public IAction getAction()
getAction in interface IPropertyViewDescriptorpublic void setAction(IAction action)
action - the action to set.protected Integer getPreferredWidth()
getPreferredWidth in class BasicViewDescriptorpublic void setHorizontalAlignment(EHorizontalAlignment horizontalAlignment)
EHorizontalAlignment
enum or its equivalent string representation :
LEFT for left alignmentCENTER for center alignmentRIGHT for right alignment
Default value is null, meaning use property type default.
horizontalAlignment - the horizontalAlignment to set.public EHorizontalAlignment getHorizontalAlignment()
getHorizontalAlignment in interface IPropertyViewDescriptorpublic boolean isSortable()
isSortable in interface IPropertyViewDescriptorpublic void setSortable(boolean sortable)
true.
sortable - the sortable to set.public boolean isReadOnly()
Wether read-only is forced.
isReadOnly in interface IGateAccessibleisReadOnly in class BasicViewDescriptor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||