|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.model.imp.ClientHandlerImp com.cc.framework.ui.model.imp.ControlDesignModelImp com.cc.framework.ui.model.imp.FormDesignModelImp
Designmodel for forms
Field Summary | |
private ButtonContainer |
buttons
The users permission which is necessary to see any buttons |
private java.lang.String |
caption
The title of the form |
private java.lang.String |
cellWidth
The width of the cell area for this container |
private FormGroupElement |
container
Container for the form elements |
private java.lang.String |
detail
The forms subtitle |
private java.lang.String |
expandProperty
The (optional) name of a property that is used to expand or collapse the group |
private java.lang.String |
formid
The unique Id of the form |
private java.util.ArrayList |
frames
Inner Frames |
private ImageModel |
image
The optional title image |
private ImageMap |
imagemap
The ImageMap which can be used to paint icons in front of the labels. |
private java.lang.String |
labelPrefix
optional label prefix in plain HTML |
private java.lang.String |
labelSuffix
optional label suffix in plain HTML |
private java.lang.String |
labelWidth
The width of the label area for this container |
private FormMethod |
method
Method to submit the form |
private static long |
serialVersionUID
Serial Version UID |
private boolean |
showFrame
Enables or disables the forms frame |
private FormType |
type
Type of the form |
Fields inherited from class com.cc.framework.ui.model.imp.ControlDesignModelImp |
|
Fields inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp |
|
Constructor Summary | |
FormDesignModelImp()
Constructor for FormDesignModelImp |
Method Summary | |
void |
addFormElement(FormElement element)
Adds a new child element to the container |
void |
addInnerFrame(InnerFrame frame)
Adds a inner frame to the List |
AlignmentType |
getAlignment()
Returns the horizontal alignment |
Permission |
getButtonPermission(ControlButton button)
Retrieves the permission for the given button |
java.lang.String |
getCaption()
Returns the Caption of the Form |
java.lang.String |
getCellWidth()
Returns the width of the control cell for this container. |
int |
getColSpan()
Returns the column span for this element |
FormColumnGroup |
getColumnGroup()
|
java.lang.String |
getDetail()
Returns the Detail, which is displayed right of the Caption |
java.lang.String |
getExpandProperty()
Retrieves the name of a property that is used to expand or collapse the group |
FormElement |
getFormElement(int index)
Returns a single elements in the container |
FormElement[] |
getFormElements()
Returns a list with all elements in the container |
FormElement[] |
getFormElements(Principal principal)
Returns a list with all visible elements in the container filtered on the principals permissions |
java.lang.String |
getFormId()
Returns the form identifier |
FormType |
getFormType()
Returns the FormType |
ImageModel |
getImage()
Returns the image for the frames title |
ImageMap |
getImageMap()
Returns the ImageMap |
InnerFrame[] |
getInnerFrames(Principal principal,
java.lang.Object layoutHint)
Retrieves a list of only the inner frames that are matching the given layout hint |
java.lang.String |
getLabelPrefix()
Retrieves the optional label prefix in plain HTML. |
java.lang.String |
getLabelSuffix()
Retrieves the optional label suffix in plain HTML. |
java.lang.String |
getLabelWidth()
Returns the width of the labels for this container. |
FormMethod |
getMethod()
Returns in which way Data should by submitted to the Server. |
boolean |
getNoWrap()
Indicates that the form element cell should not be wrapped |
OrientationType |
getOrientation()
|
FormElementContainer |
getParent()
|
AlignmentType |
getVAlignment()
Returns the vertical alignment |
boolean |
joinElements()
This method returns true when two adjacent form elements
should be joined together without a separator |
void |
removeFormElement(FormElement element)
Removes the specified form element from the container |
void |
setAlignment(AlignmentType alignment)
Specifies the horizontal alignment of the form element within the form left right center |
void |
setButtonPermission(ControlButton button,
Permission permission)
Sets whether a command button should be displayed by specifying an Access Control List. |
void |
setCaption(java.lang.String caption)
Sets the Caption |
void |
setCellWidth(java.lang.String width)
Sets the width of the control cell for this container. |
void |
setColSpan(int colspan)
Sets the column span of this form element |
void |
setDetail(java.lang.String detail)
Sets the Detail |
void |
setExpandProperty(java.lang.String propertyName)
Sets the name of a property that is used to expand or collapse the group |
void |
setFormId(java.lang.String formid)
Sets the form identifier |
void |
setFormType(FormType type)
Sets the FormType |
void |
setImage(ImageModel img)
Sets an image for the frames title |
void |
setImageMap(ImageMap imagemap)
Sets the ImageMap |
void |
setJoin(boolean join)
This method specifies that two adjacent form elements should be joined together without a separator |
void |
setLabelPrefix(java.lang.String prefix)
Specifies the label prefix in plain HTML. |
void |
setLabelSuffix(java.lang.String suffix)
Specifies the label suffix in plain HTML. |
void |
setLabelWidth(java.lang.String width)
Sets the width of the labels for this container. |
void |
setMethod(FormMethod method)
Sets the FormMethod |
void |
setParent(FormElementContainer parent)
|
void |
setShowFrame(boolean show)
Disables the forms border |
void |
setVAlignment(AlignmentType valignment)
Specifies the vertical alignment of the form element within the form top bottom center |
boolean |
showButton(ControlButton button,
Principal principal)
Checks if the button can be displayed. |
boolean |
showFrame()
|
int |
size()
Returns the number of elements in the container |
Methods inherited from class com.cc.framework.ui.model.imp.ControlDesignModelImp |
addDesignRule, enableAjax, getAction, getBorder, getDesignRules, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getWidth, hasShadow, isAjaxEnabled, isDisabled, isDynamicDesignModel, isFormElement, setAction, setBorder, setDisabled, setDynamicDesignModel, setFormElement, setHeight, setHelp, setId, setLocaleName, setName, setPermission, setProperty, setRunAt, setShadow, setStyle, setStyleClass, setStyleId, setSummary, setTabIndex, setTooltip, setTransaction, setWidth, show |
Methods inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp |
evaluate, getHandler, getHandlers, setHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.cc.framework.ui.model.FormDesignModel |
getAction, setAction |
Methods inherited from interface com.cc.framework.ui.model.ControlDesignModel |
addDesignRule, getBorder, getDesignRules, getHeight, getHelp, getId, getLocaleName, getName, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getWidth, hasShadow, isDisabled, isDynamicDesignModel, isFormElement, setBorder, setDisabled, setDynamicDesignModel, setFormElement, setHeight, setHelp, setId, setLocaleName, setName, setPermission, setProperty, setRunAt, setShadow, setStyle, setStyleClass, setStyleId, setSummary, setTabIndex, setTooltip, setTransaction, setWidth |
Methods inherited from interface com.cc.framework.ui.model.ClientHandler |
getHandler, getHandlers, setHandler |
Methods inherited from interface com.cc.framework.ui.model.AccessControlled |
getPermission, show |
Methods inherited from interface com.cc.framework.ui.model.ActionBehavior |
isAjaxEnabled |
Methods inherited from interface com.cc.framework.ui.model.AjaxSupport |
enableAjax, isAjaxEnabled |
Methods inherited from interface com.cc.framework.ui.control.FormElement |
getHeight, getHelp, getStyle, getStyleClass, getStyleId, getWidth, setHeight, setHelp, setStyle, setStyleClass, setStyleId, setWidth |
Field Detail |
private static final long serialVersionUID
private FormType type
private FormMethod method
private java.lang.String caption
private java.lang.String detail
private java.lang.String formid
private java.lang.String labelSuffix
private java.lang.String labelPrefix
private java.lang.String labelWidth
private java.lang.String cellWidth
private ImageMap imagemap
private boolean showFrame
private ImageModel image
private java.lang.String expandProperty
private FormGroupElement container
private ButtonContainer buttons
private java.util.ArrayList frames
Constructor Detail |
public FormDesignModelImp()
Method Detail |
public FormElementContainer getParent()
getParent
in interface FormElement
null
when this is
the top most containerFormElement.getParent()
public void setParent(FormElementContainer parent)
setParent
in interface FormElement
parent
- the parent form element container for this elementFormElement.setParent(com.cc.framework.ui.control.FormElementContainer)
public FormMethod getMethod()
FormDesignModel
getMethod
in interface FormDesignModel
FormDesignModel.getMethod()
public void setMethod(FormMethod method)
FormDesignModel
setMethod
in interface FormDesignModel
method
- FormMethodFormDesignModel.setMethod(FormMethod
method)
public java.lang.String getCaption()
FormDesignModel
getCaption
in interface FormDesignModel
FormDesignModel.getCaption()
public void setCaption(java.lang.String caption)
FormDesignModel
setCaption
in interface FormDesignModel
caption
- CaptionFormDesignModel.setCaption(java.lang.String)
public java.lang.String getDetail()
FormDesignModel
getDetail
in interface FormDesignModel
FormDesignModel.getDetail()
public void setDetail(java.lang.String detail)
FormDesignModel
setDetail
in interface FormDesignModel
detail
- Detail StringFormDesignModel.setDetail(String)
public java.lang.String getFormId()
FormDesignModel
getFormId
in interface FormDesignModel
FormDesignModel.getFormId()
public void setFormId(java.lang.String formid)
FormDesignModel
setFormId
in interface FormDesignModel
formid
- IdFormDesignModel.setFormId(String formid)
public FormType getFormType()
FormDesignModel
getFormType
in interface FormDesignModel
FormDesignModel.getFormType()
public void setFormType(FormType type)
FormDesignModel
setFormType
in interface FormDesignModel
type
- FormTypeFormDesignModel.setFormType(com.cc.framework.ui.FormType)
public void addFormElement(FormElement element)
FormElementContainer
addFormElement
in interface FormElementContainer
element
- The new form elementFormElementContainer.addFormElement(FormElement
element)
public FormElement getFormElement(int index)
FormElementContainer
getFormElement
in interface FormElementContainer
index
- Elements index
FormElementContainer.getFormElement(int)
public FormElement[] getFormElements()
FormElementContainer
getFormElements
in interface FormElementContainer
FormElementContainer.getFormElements()
public FormElement[] getFormElements(Principal principal)
FormElementContainer
getFormElements
in interface FormElementContainer
principal
- the principal object with the permissions
FormElementContainer.getFormElements(com.cc.framework.security.Principal)
public void removeFormElement(FormElement element)
FormElementContainer
removeFormElement
in interface FormElementContainer
element
- The form element to removeFormElementContainer.removeFormElement(FormElement)
public int size()
FormElementContainer
size
in interface FormElementContainer
FormElementContainer.size()
public int getColSpan()
FormElement
getColSpan
in interface FormElement
FormElement.getColSpan()
public void setColSpan(int colspan)
FormElement
setColSpan
in interface FormElement
colspan
- column spanFormElement.setColSpan(int)
public FormColumnGroup getColumnGroup()
getColumnGroup
in interface FormElementContainer
FormElementContainer.getColumnGroup()
public OrientationType getOrientation()
getOrientation
in interface FormElementContainer
FormElementContainer.getOrientation()
public boolean joinElements()
FormElement
true
when two adjacent form elements
should be joined together without a separator
joinElements
in interface FormElement
true
when the form elements should be joinedFormElement.joinElements()
public void setJoin(boolean join)
FormElement
setJoin
in interface FormElement
join
- true
when the form elements should be joinedFormElement.setJoin(boolean)
public ImageMap getImageMap()
FormDesignModel
getImageMap
in interface FormDesignModel
FormDesignModel.getImageMap()
public void setImageMap(ImageMap imagemap)
FormDesignModel
setImageMap
in interface FormDesignModel
imagemap
- ImageMapFormDesignModel.setImageMap(com.cc.framework.ui.ImageMap)
public void setShowFrame(boolean show)
FormElementContainer
setShowFrame
in interface FormElementContainer
show
- true
if the forms frame should be shownFormElementContainer.setShowFrame(boolean)
public boolean showFrame()
showFrame
in interface FormElementContainer
true
if the frame should be shownFormElementContainer.showFrame()
public AlignmentType getAlignment()
FormElement
getAlignment
in interface FormElement
FormElement.getAlignment()
public AlignmentType getVAlignment()
FormElement
getVAlignment
in interface FormElement
FormElement.getVAlignment()
public void setAlignment(AlignmentType alignment)
FormElement
setAlignment
in interface FormElement
alignment
- The alignment of the elementFormElement.setAlignment(com.cc.framework.ui.AlignmentType)
public void setVAlignment(AlignmentType valignment)
FormElement
setVAlignment
in interface FormElement
valignment
- The alignment of the elementFormElement.setVAlignment(com.cc.framework.ui.AlignmentType)
public boolean getNoWrap()
FormElement
getNoWrap
in interface FormElement
FormElement.getNoWrap()
public ImageModel getImage()
FrameContainer
getImage
in interface FrameContainer
FrameContainer.getImage()
public void setImage(ImageModel img)
FrameContainer
setImage
in interface FrameContainer
img
- ImageModelFrameContainer.setImage(com.cc.framework.ui.model.ImageModel)
public void addInnerFrame(InnerFrame frame)
FrameContainer
addInnerFrame
in interface FrameContainer
frame
- the inner frame to addFrameContainer.addInnerFrame(com.cc.framework.ui.model.InnerFrame)
public InnerFrame[] getInnerFrames(Principal principal, java.lang.Object layoutHint)
FrameContainer
getInnerFrames
in interface FrameContainer
principal
- The principal object for permission tests. This parameter can
be null
layoutHint
- The layout hint that specifies what frames should be selected:
AlignmentType.TOP
- header frames
AlignmentType.BOTTOM
- footer frames
FrameContainer.getInnerFrames(com.cc.framework.security.Principal,
java.lang.Object)
public Permission getButtonPermission(ControlButton button)
ButtonContainer
getButtonPermission
in interface ButtonContainer
button
- Button constant
null
ButtonContainer.getButtonPermission(com.cc.framework.ui.control.ControlButton)
public boolean showButton(ControlButton button, Principal principal)
ButtonContainer
showButton
in interface ButtonContainer
button
- The Button to queryprincipal
- The principal object
true
if the button should be displayedButtonContainer.showButton(com.cc.framework.ui.control.ControlButton,
com.cc.framework.security.Principal)
public void setButtonPermission(ControlButton button, Permission permission)
ButtonContainer
setButtonPermission
in interface ButtonContainer
button
- The Button to querypermission
- PermissionButtonContainer.setButtonPermission(com.cc.framework.ui.control.ControlButton,
com.cc.framework.security.Permission)
public java.lang.String getLabelPrefix()
FormDesignModel
getLabelPrefix
in interface FormDesignModel
null
FormDesignModel.getLabelPrefix()
public java.lang.String getLabelSuffix()
FormDesignModel
getLabelSuffix
in interface FormDesignModel
null
FormDesignModel.getLabelSuffix()
public void setLabelPrefix(java.lang.String prefix)
FormDesignModel
setLabelPrefix
in interface FormDesignModel
prefix
- The label prefixFormDesignModel.setLabelPrefix(java.lang.String)
public void setLabelSuffix(java.lang.String suffix)
FormDesignModel
setLabelSuffix
in interface FormDesignModel
suffix
- The label suffixFormDesignModel.setLabelSuffix(java.lang.String)
public java.lang.String getExpandProperty()
FormElementContainer
getExpandProperty
in interface FormElementContainer
FormElementContainer.getExpandProperty()
public void setExpandProperty(java.lang.String propertyName)
FormElementContainer
setExpandProperty
in interface FormElementContainer
propertyName
- java property nameFormElementContainer.setExpandProperty(java.lang.String)
public void setLabelWidth(java.lang.String width)
FormElementContainer
setLabelWidth
in interface FormElementContainer
width
- label width or null
for default label widthFormElementContainer.setLabelWidth(java.lang.String)
public java.lang.String getLabelWidth()
FormElementContainer
getLabelWidth
in interface FormElementContainer
null
for default label widthFormElementContainer.getLabelWidth()
public java.lang.String getCellWidth()
FormElementContainer
getCellWidth
in interface FormElementContainer
null
FormElementContainer.getCellWidth()
public void setCellWidth(java.lang.String width)
FormElementContainer
setCellWidth
in interface FormElementContainer
width
- control cell width or null
FormElementContainer.setCellWidth(java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |