com.cc.framework.ui.control
Class FormControlElement

java.lang.Object
  extended bycom.cc.framework.ui.control.FormControlElement
All Implemented Interfaces:
AccessControlled, FormElement, LabeledFormElement

public class FormControlElement
extends java.lang.Object
implements LabeledFormElement

A form control element

Since:
1.0
Version:
$Revision: 1.22 $
Author:
Harald Schulz

Field Summary
private  AlignmentType alignment
          The horizontal alignment of the form element
private  int colspan
          The ColumnSpan of this element
private  Control control
          The aggregated Control
private  java.lang.String description
          Description
private  java.lang.String height
          The height of the form element
private  boolean join
          This flag indicates that this element should be joined with the preceding element without a separator
private  FormLabelDesignModel label
          Label of the form element
private  FormElementContainer parent
          The parent container
private  boolean required
          Required Flag
private  AlignmentType valignment
          The vertical alignment of the form element
private  java.lang.String width
          The width of the form element
 
Constructor Summary
FormControlElement()
          Constructor
 
Method Summary
 AlignmentType getAlignment()
          Returns the horizontal alignment
 int getColSpan()
          Returns the column span for this element
 Control getControl()
          Returns the control.
 java.lang.String getDescription()
          Returns the Description text which should be displayed under the form element
 java.lang.String getHeight()
          Returns the height of the form element (pixel or %)
 java.lang.String getHelp()
          Returns the Help
 FormLabelDesignModel getLabel()
          Return the Label which should be display in front of the Form element
 boolean getNoWrap()
          Indicates that the form element cell should not be wrapped
 FormElementContainer getParent()
           
 Permission getPermission()
          Returns the authorizations required to access an object If the method returns null no access rights is required.
 java.lang.String getProperty()
          Returns the Property name of the Control
 java.lang.String getStyle()
          Returns the Style
 java.lang.String getStyleClass()
          Returns the StyleClass
 java.lang.String getStyleId()
          returns the StyleId
 AlignmentType getVAlignment()
          Returns the vertical alignment
 java.lang.String getWidth()
          Returns the width of the form element (pixel or %)
 boolean isDisabled()
          true if the form element can be edited
 boolean isRequired()
          True if the form element is required.
 boolean joinElements()
          This method returns true when two adjacent form elements should be joined together without a separator
 void setAccessKey(java.lang.String accessKey)
          The ACCESSKEY attribute can be used to specify a shortcut key for the <LABEL> (activated by pressing 'Alt' and the ACCESSKEY together).
 void setAlignment(AlignmentType alignment)
          Specifies the horizontal alignment of the form element within the form left right center
 void setColSpan(int colspan)
          Sets the column span of this form element
 void setControl(Control control)
          Sets the control.
 void setDescription(java.lang.String description)
          Sets the description
 void setDisabled(boolean disabled)
          Returns the Disabled Flag
 void setHeight(java.lang.String height)
          Sets the height of the form element (pixel or %)
 void setHelp(java.lang.String help)
          Sets the help
 void setImageRef(java.lang.String ref)
          Assigns the Crumb an Image from an ImageMap
 void setJoin(boolean join)
          This method specifies that two adjacent form elements should be joined together without a separator
 void setLabel(FormLabelDesignModel label)
          Sets the elements Label
 void setLabel(java.lang.String label)
          Sets the Label
 void setLabelTooltip(java.lang.String tooltip)
          Sets the tooltip text for the label
 void setParent(FormElementContainer parent)
           
 void setRequired(boolean required)
          Sets the Required Attribute
 void setStyle(java.lang.String style)
          Sets the Style
 void setStyleClass(java.lang.String styleClass)
          Sets the StyleClass
 void setStyleId(java.lang.String styleId)
          Sets the StyleId
 void setVAlignment(AlignmentType valignment)
          Specifies the vertical alignment of the form element within the form top bottom center
 void setWidth(java.lang.String width)
          Sets the width of the form element (pixel or %)
 boolean show(Principal principal)
          Checks if the Object has a required permission.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

private FormLabelDesignModel label
Label of the form element


parent

private FormElementContainer parent
The parent container


required

private boolean required
Required Flag


description

private java.lang.String description
Description


control

private Control control
The aggregated Control


alignment

private AlignmentType alignment
The horizontal alignment of the form element


valignment

private AlignmentType valignment
The vertical alignment of the form element


height

private java.lang.String height
The height of the form element


width

private java.lang.String width
The width of the form element


colspan

private int colspan
The ColumnSpan of this element


join

private boolean join
This flag indicates that this element should be joined with the preceding element without a separator

Constructor Detail

FormControlElement

public FormControlElement()
Constructor

Method Detail

getParent

public FormElementContainer getParent()
Specified by:
getParent in interface FormElement
Returns:
returns the parent container or null when this is the top most container
See Also:
FormElement.getParent()

setParent

public void setParent(FormElementContainer parent)
Specified by:
setParent in interface FormElement
Parameters:
parent - the parent form element container for this element
See Also:
FormElement.setParent(com.cc.framework.ui.control.FormElementContainer)

getLabel

public FormLabelDesignModel getLabel()
Return the Label which should be display in front of the Form element

Specified by:
getLabel in interface LabeledFormElement
Returns:
String

setLabel

public void setLabel(java.lang.String label)
Sets the Label

Parameters:
label - Label

setLabel

public void setLabel(FormLabelDesignModel label)
Sets the elements Label

Parameters:
label - Label

setAccessKey

public void setAccessKey(java.lang.String accessKey)
Description copied from interface: LabeledFormElement
The ACCESSKEY attribute can be used to specify a shortcut key for the <LABEL> (activated by pressing 'Alt' and the ACCESSKEY together).

Specified by:
setAccessKey in interface LabeledFormElement
Parameters:
accessKey - The Access Key
See Also:
LabeledFormElement.setAccessKey(java.lang.String)

setLabelTooltip

public void setLabelTooltip(java.lang.String tooltip)
Description copied from interface: LabeledFormElement
Sets the tooltip text for the label

Specified by:
setLabelTooltip in interface LabeledFormElement
Parameters:
tooltip - Tooltip text
See Also:
LabeledFormElement.setLabelTooltip(java.lang.String)

isRequired

public boolean isRequired()
True if the form element is required.

Returns:
boolean

setRequired

public void setRequired(boolean required)
Sets the Required Attribute

Parameters:
required - true if the form element is required

isDisabled

public boolean isDisabled()
true if the form element can be edited

Returns:
boolean

setDisabled

public void setDisabled(boolean disabled)
Returns the Disabled Flag

Parameters:
disabled - true if the form element can be edited

getDescription

public java.lang.String getDescription()
Returns the Description text which should be displayed under the form element

Specified by:
getDescription in interface LabeledFormElement
Returns:
String

setDescription

public void setDescription(java.lang.String description)
Sets the description

Parameters:
description - description

getHelp

public java.lang.String getHelp()
Returns the Help

Specified by:
getHelp in interface FormElement
Returns:
String

setHelp

public void setHelp(java.lang.String help)
Sets the help

Specified by:
setHelp in interface FormElement
Parameters:
help - Help

getControl

public Control getControl()
Returns the control.

Returns:
Control

setControl

public void setControl(Control control)
Sets the control.

Parameters:
control - The control to set

getProperty

public java.lang.String getProperty()
Returns the Property name of the Control

Returns:
String

getPermission

public Permission getPermission()
Description copied from interface: AccessControlled
Returns the authorizations required to access an object If the method returns null no access rights is required.

Specified by:
getPermission in interface AccessControlled
Returns:
Permission A list with required permissions separated by ";"
See Also:
AccessControlled.getPermission()

show

public boolean show(Principal principal)
Description copied from interface: AccessControlled
Checks if the Object has a required permission.

Specified by:
show in interface AccessControlled
Parameters:
principal - the users principal object
Returns:
true if the permission exists
See Also:
AccessControlled.show(Principal)

getColSpan

public int getColSpan()
Description copied from interface: FormElement
Returns the column span for this element

Specified by:
getColSpan in interface FormElement
Returns:
column span
See Also:
FormElement.getColSpan()

setColSpan

public void setColSpan(int colspan)
Description copied from interface: FormElement
Sets the column span of this form element

Specified by:
setColSpan in interface FormElement
Parameters:
colspan - column span
See Also:
FormElement.setColSpan(int)

joinElements

public boolean joinElements()
Description copied from interface: FormElement
This method returns true when two adjacent form elements should be joined together without a separator

Specified by:
joinElements in interface FormElement
Returns:
true when the form elements should be joined
See Also:
FormElement.joinElements()

setJoin

public void setJoin(boolean join)
Description copied from interface: FormElement
This method specifies that two adjacent form elements should be joined together without a separator

Specified by:
setJoin in interface FormElement
Parameters:
join - true when the form elements should be joined
See Also:
FormElement.setJoin(boolean)

setImageRef

public void setImageRef(java.lang.String ref)
Assigns the Crumb an Image from an ImageMap

Parameters:
ref - Rule of the ImageMap to match

getAlignment

public AlignmentType getAlignment()
Description copied from interface: FormElement
Returns the horizontal alignment

Specified by:
getAlignment in interface FormElement
Returns:
alignment
See Also:
FormElement.getAlignment()

getVAlignment

public AlignmentType getVAlignment()
Description copied from interface: FormElement
Returns the vertical alignment

Specified by:
getVAlignment in interface FormElement
Returns:
alignment
See Also:
FormElement.getVAlignment()

setAlignment

public void setAlignment(AlignmentType alignment)
Description copied from interface: FormElement
Specifies the horizontal alignment of the form element within the form

Specified by:
setAlignment in interface FormElement
Parameters:
alignment - The alignment of the element
See Also:
FormElement.setAlignment(com.cc.framework.ui.AlignmentType)

setVAlignment

public void setVAlignment(AlignmentType valignment)
Description copied from interface: FormElement
Specifies the vertical alignment of the form element within the form

Specified by:
setVAlignment in interface FormElement
Parameters:
valignment - The alignment of the element
See Also:
FormElement.setVAlignment(com.cc.framework.ui.AlignmentType)

getHeight

public java.lang.String getHeight()
Description copied from interface: FormElement
Returns the height of the form element (pixel or %)

Specified by:
getHeight in interface FormElement
Returns:
height
See Also:
FormElement.getHeight()

getWidth

public java.lang.String getWidth()
Description copied from interface: FormElement
Returns the width of the form element (pixel or %)

Specified by:
getWidth in interface FormElement
Returns:
width
See Also:
FormElement.getWidth()

setHeight

public void setHeight(java.lang.String height)
Description copied from interface: FormElement
Sets the height of the form element (pixel or %)

Specified by:
setHeight in interface FormElement
Parameters:
height - The Height
See Also:
FormElement.setHeight(java.lang.String)

setWidth

public void setWidth(java.lang.String width)
Description copied from interface: FormElement
Sets the width of the form element (pixel or %)

Specified by:
setWidth in interface FormElement
Parameters:
width - The Width
See Also:
FormElement.setWidth(java.lang.String)

getNoWrap

public boolean getNoWrap()
Description copied from interface: FormElement
Indicates that the form element cell should not be wrapped

Specified by:
getNoWrap in interface FormElement
Returns:
Boolean
See Also:
FormElement.getNoWrap()

getStyle

public java.lang.String getStyle()
Description copied from interface: FormElement
Returns the Style

Specified by:
getStyle in interface FormElement
Returns:
String
See Also:
FormElement.getStyle()

getStyleId

public java.lang.String getStyleId()
Description copied from interface: FormElement
returns the StyleId

Specified by:
getStyleId in interface FormElement
Returns:
string
See Also:
FormElement.getStyleId()

getStyleClass

public java.lang.String getStyleClass()
Description copied from interface: FormElement
Returns the StyleClass

Specified by:
getStyleClass in interface FormElement
Returns:
String
See Also:
FormElement.getStyleClass()

setStyle

public void setStyle(java.lang.String style)
Description copied from interface: FormElement
Sets the Style

Specified by:
setStyle in interface FormElement
Parameters:
style - HTML style constant
See Also:
FormElement.setStyle(java.lang.String)

setStyleId

public void setStyleId(java.lang.String styleId)
Description copied from interface: FormElement
Sets the StyleId

Specified by:
setStyleId in interface FormElement
Parameters:
styleId - HTML-Id of the element
See Also:
FormElement.setStyleId(java.lang.String)

setStyleClass

public void setStyleClass(java.lang.String styleClass)
Description copied from interface: FormElement
Sets the StyleClass

Specified by:
setStyleClass in interface FormElement
Parameters:
styleClass - StyleClass
See Also:
FormElement.setStyleClass(java.lang.String)


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.