com.cc.framework.ui.model.imp
Class FrameDesignModelImp

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.ClientHandlerImp
      extended bycom.cc.framework.ui.model.imp.ControlDesignModelImp
          extended bycom.cc.framework.ui.model.imp.FrameDesignModelImp
All Implemented Interfaces:
AccessControlled, ActionBehavior, AjaxSupport, ButtonContainer, ClientHandler, ControlDesignModel, DesignModel, FrameContainer, FrameDesignModel, java.io.Serializable

public class FrameDesignModelImp
extends ControlDesignModelImp
implements FrameDesignModel

Designmodel for frames

Since:
1.0
Version:
$Revision: 1.10 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  ButtonContainer buttons
          The users permission which is necessary to see any buttons
private  java.lang.String caption
          The title of the frame
private  java.lang.String detail
          The frames subtitle
private  java.util.ArrayList frames
          Inner Frames
private  ImageModel image
          The optional title image
private static long serialVersionUID
          Serial Version UID
private  boolean showFrame
          Enables or disables the frames frame
 
Fields inherited from class com.cc.framework.ui.model.imp.ControlDesignModelImp
 
Fields inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
 
Constructor Summary
FrameDesignModelImp()
          Constructor for FrameDesignModelImp
 
Method Summary
 void addInnerFrame(InnerFrame frame)
          Adds a inner frame to the List
 Permission getButtonPermission(ControlButton button)
          Retrieves the permission for the given button
 java.lang.String getCaption()
          Returns the Caption of the Frame
 java.lang.String getDetail()
          Returns the Detail, which is displayed right of the Caption
 ImageModel getImage()
          Returns the image for the frames title
 InnerFrame[] getInnerFrames(Principal principal, java.lang.Object layoutHint)
          Retrieves a list of only the inner frames that are matching the given layout hint
 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 setDetail(java.lang.String detail)
          Sets the Detail
 void setImage(ImageModel img)
          Sets an image for the frames title
 void setShowFrame(boolean show)
          Disables the frames border
 boolean showButton(ControlButton button, Principal principal)
          Checks if the button can be displayed.
 boolean showFrame()
           
 
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.ControlDesignModel
addDesignRule, getAction, getBorder, getDesignRules, getHeight, getHelp, getId, getLocaleName, getName, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getWidth, hasShadow, 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
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

caption

private java.lang.String caption
The title of the frame


detail

private java.lang.String detail
The frames subtitle


showFrame

private boolean showFrame
Enables or disables the frames frame


image

private ImageModel image
The optional title image


buttons

private ButtonContainer buttons
The users permission which is necessary to see any buttons


frames

private java.util.ArrayList frames
Inner Frames

Constructor Detail

FrameDesignModelImp

public FrameDesignModelImp()
Constructor for FrameDesignModelImp

Method Detail

getCaption

public java.lang.String getCaption()
Description copied from interface: FrameDesignModel
Returns the Caption of the Frame

Specified by:
getCaption in interface FrameDesignModel
Returns:
String
See Also:
FrameDesignModel.getCaption()

setCaption

public void setCaption(java.lang.String caption)
Description copied from interface: FrameDesignModel
Sets the Caption

Specified by:
setCaption in interface FrameDesignModel
Parameters:
caption - Caption
See Also:
FrameDesignModel.setCaption(java.lang.String)

getDetail

public java.lang.String getDetail()
Description copied from interface: FrameDesignModel
Returns the Detail, which is displayed right of the Caption

Specified by:
getDetail in interface FrameDesignModel
Returns:
String
See Also:
FrameDesignModel.getDetail()

setDetail

public void setDetail(java.lang.String detail)
Description copied from interface: FrameDesignModel
Sets the Detail

Specified by:
setDetail in interface FrameDesignModel
Parameters:
detail - Detail String
See Also:
FrameDesignModel.setDetail(java.lang.String)

setShowFrame

public void setShowFrame(boolean show)
Description copied from interface: FrameDesignModel
Disables the frames border

Specified by:
setShowFrame in interface FrameDesignModel
Parameters:
show - true if the frame should be shown
See Also:
FrameDesignModel.setShowFrame(boolean)

showFrame

public boolean showFrame()
Specified by:
showFrame in interface FrameDesignModel
Returns:
true if the frame should be shown
See Also:
FrameDesignModel.showFrame()

addInnerFrame

public void addInnerFrame(InnerFrame frame)
Description copied from interface: FrameContainer
Adds a inner frame to the List

Specified by:
addInnerFrame in interface FrameContainer
Parameters:
frame - the inner frame to add
See Also:
FrameContainer.addInnerFrame(com.cc.framework.ui.model.InnerFrame)

getInnerFrames

public InnerFrame[] getInnerFrames(Principal principal,
                                   java.lang.Object layoutHint)
Description copied from interface: FrameContainer
Retrieves a list of only the inner frames that are matching the given layout hint

Specified by:
getInnerFrames in interface FrameContainer
Parameters:
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
Returns:
Frame list
See Also:
FrameContainer.getInnerFrames(com.cc.framework.security.Principal, java.lang.Object)

getImage

public ImageModel getImage()
Description copied from interface: FrameContainer
Returns the image for the frames title

Specified by:
getImage in interface FrameContainer
Returns:
ImageModel
See Also:
FrameContainer.getImage()

setImage

public void setImage(ImageModel img)
Description copied from interface: FrameContainer
Sets an image for the frames title

Specified by:
setImage in interface FrameContainer
Parameters:
img - ImageModel
See Also:
FrameContainer.setImage(com.cc.framework.ui.model.ImageModel)

getButtonPermission

public Permission getButtonPermission(ControlButton button)
Description copied from interface: ButtonContainer
Retrieves the permission for the given button

Specified by:
getButtonPermission in interface ButtonContainer
Parameters:
button - Button constant
Returns:
Permission or null
See Also:
ButtonContainer.getButtonPermission(com.cc.framework.ui.control.ControlButton)

showButton

public boolean showButton(ControlButton button,
                          Principal principal)
Description copied from interface: ButtonContainer
Checks if the button can be displayed.

Specified by:
showButton in interface ButtonContainer
Parameters:
button - The Button to query
principal - The principal object
Returns:
boolean true if the button should be displayed
See Also:
ButtonContainer.showButton(com.cc.framework.ui.control.ControlButton, com.cc.framework.security.Principal)

setButtonPermission

public void setButtonPermission(ControlButton button,
                                Permission permission)
Description copied from interface: ButtonContainer
Sets whether a command button should be displayed by specifying an Access Control List.

Specified by:
setButtonPermission in interface ButtonContainer
Parameters:
button - The Button to query
permission - Permission
See Also:
ButtonContainer.setButtonPermission(com.cc.framework.ui.control.ControlButton, com.cc.framework.security.Permission)


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