com.cc.framework.ui.control
Class FormMessageElement

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

public class FormMessageElement
extends java.lang.Object
implements FormElement

messages within forms

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

Field Summary
private  AlignmentType alignment
          The horizontal alignment of the form element
private  int colspan
          The ColumnSpan of this element
private  boolean filter
          Defines if the message should be HTML encoded
private  java.lang.String height
          The height of the form element
private  java.lang.String help
          The Help Identifier for this element
private  boolean join
          This flag indicates that this element should be joined with the preceding element without a separator
private  java.lang.String message
          The message text
private  FormElementContainer parent
          The parent container
private  Permission permission
          permissions for this form element
private  Severity severity
          Severity for this Message
private  java.lang.String style
          HTML-Style
private  java.lang.String styleClass
          Style Class -> HTML class attribute
private  java.lang.String styleId
          Style ID
private  AlignmentType valignment
          The vertical alignment of the form element
private  java.lang.String width
          The width of the form element
 
Constructor Summary
FormMessageElement()
          Constructor
 
Method Summary
 boolean filter()
          Returns the filter.
 AlignmentType getAlignment()
          Returns the horizontal alignment
 int getColSpan()
          Returns the column span for this element
 java.lang.String getHeight()
          Returns the height of the form element (pixel or %)
 java.lang.String getHelp()
          Returns the Help id that is associated with this form element.
 java.lang.String getMessage()
          Returns the message.
 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.
 Severity getSeverity()
          Returns the severity.
 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 joinElements()
          This method returns true when two adjacent form elements should be joined together without a separator
 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 setFilter(boolean filter)
          Sets the filter.
 void setHeight(java.lang.String height)
          Sets the height of the form element (pixel or %)
 void setHelp(java.lang.String helpId)
          Associates this form element with a help id
 void setJoin(boolean join)
          This method specifies that two adjacent form elements should be joined together without a separator
 void setMessage(java.lang.String message)
          Sets the message.
 void setParent(FormElementContainer parent)
           
 void setPermission(Permission permission)
          Sets the elements permission
 void setSeverity(Severity severity)
          Sets the severity.
 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

severity

private Severity severity
Severity for this Message


parent

private FormElementContainer parent
The parent container


filter

private boolean filter
Defines if the message should be HTML encoded


message

private java.lang.String message
The message text


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


styleId

private java.lang.String styleId
Style ID


styleClass

private java.lang.String styleClass
Style Class -> HTML class attribute


style

private java.lang.String style
HTML-Style


help

private java.lang.String help
The Help Identifier for this element


permission

private Permission permission
permissions for this 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

FormMessageElement

public FormMessageElement()
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)

getMessage

public java.lang.String getMessage()
Returns the message.

Returns:
String

getSeverity

public Severity getSeverity()
Returns the severity.

Returns:
Severity

setMessage

public void setMessage(java.lang.String message)
Sets the message.

Parameters:
message - The message to set

setSeverity

public void setSeverity(Severity severity)
Sets the severity.

Parameters:
severity - The severity to set

filter

public boolean filter()
Returns the filter.

Returns:
boolean

setFilter

public void setFilter(boolean filter)
Sets the filter.

Parameters:
filter - The filter to set

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()

setPermission

public void setPermission(Permission permission)
Sets the elements permission

Parameters:
permission - required permission

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)

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)

getHelp

public java.lang.String getHelp()
Description copied from interface: FormElement
Returns the Help id that is associated with this form element. If a control has a help id a little icon with a link to the help system will be created

Specified by:
getHelp in interface FormElement
Returns:
String returns the Help id of the element. The semantic of this id is completely in the responsibility of the applications help system
See Also:
FormElement.getHelp()

setHelp

public void setHelp(java.lang.String helpId)
Description copied from interface: FormElement
Associates this form element with a help id

Specified by:
setHelp in interface FormElement
Parameters:
helpId - The Help Help id of the element. The semantic of this id is completely in the responsibility of the applications help system
See Also:
FormElement.setHelp(java.lang.String)


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