com.cc.framework.ui.control
Class FrameControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.FrameControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, FrameStateModel, java.io.Serializable, StateModel

public class FrameControl
extends Control
implements FrameStateModel

A frame control

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

Field Summary
private  FrameDataModel dataModel
          Data model
private  FrameDesignModel designModel
          Design model
private static long serialVersionUID
          Serial Version UID
private  FrameStateModel stateModel
          State Model
 
Fields inherited from class com.cc.framework.ui.control.Control
log
 
Fields inherited from interface com.cc.framework.ui.model.StateModel
PROP_CONTROL
 
Constructor Summary
FrameControl()
          Constructor
 
Method Summary
 void close()
          Changes the state of the frame to closed
protected  FrameStateModel doCreateStatemodel()
          Creates the state model for this control instance
 java.lang.String getCaption()
          Returns the caption of the frame
 DataModel getDataModel()
          Returns the data model of the Control
 ControlDesignModel getDesignModel()
          Returns the design model of the control
 java.lang.String getDetail()
          Returns the detail text
 ImageModel getImage()
          Returns the image for the frames title
 InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
          Retrieves a list of inner frames that are matching the given layout hint
 StateModel getStateModel()
          Returns the state model of the control
 boolean isClosed()
           
 boolean isMaximized()
           
 boolean isMinimized()
           
 boolean isOpen()
           
 void maximize()
          Maximizes the frame
 void minimize()
          Minimizes the frame
 void onClose(ControlRequestContext ctx)
          Default Handler for the Close Event
 void onMaximize(ControlRequestContext ctx)
          Default Handler for the Maximize Event
 void onMinimize(ControlRequestContext ctx)
          Default Handler for the Minimize Event
 void onRestore(ControlRequestContext ctx)
          Default Handler for the Restore Event
 void open()
          Changes the state of the frame to opened
 void reset()
          Resets the state model
 void restore()
          Restores the frame
 void setDataModel(FrameDataModel dataModel)
          Sets the data model
 void setDesignModel(FrameDesignModel designModel)
          Sets the design model
 void setStateModel(FrameStateModel stateModel)
          Sets the StateModel
 boolean showButton(ControlButton button)
          This Method is called by the Painter before rendering a Button.
 boolean showFrame()
           
 
Methods inherited from class com.cc.framework.ui.control.Control
addButton, allowAjaxRendering, execute, execute, execute, execute, execute, execute, execute, getAction, getAjaxId, getButtons, getControlName, getDesignRules, getFrameworkString, getHandler, getHandlers, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getPrincipal, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getUniqueStyleId, getWidth, isAjaxEnabled, isDisabled, isFormElement, markDirty, onHelp, setAjaxAttribute, setHandler, setPrincipal, setValue, show, synchronizeState, synchronizeState
 
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.StateModel
synchronizeState
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

dataModel

private FrameDataModel dataModel
Data model


designModel

private FrameDesignModel designModel
Design model


stateModel

private FrameStateModel stateModel
State Model

Constructor Detail

FrameControl

public FrameControl()
Constructor

Method Detail

doCreateStatemodel

protected FrameStateModel doCreateStatemodel()
Creates the state model for this control instance

Returns:
State model instance

getDataModel

public DataModel getDataModel()
Description copied from class: Control
Returns the data model of the Control

Specified by:
getDataModel in class Control
Returns:
The data model
See Also:
Control.getDataModel()

setDataModel

public void setDataModel(FrameDataModel dataModel)
Sets the data model

Parameters:
dataModel - The data model of the frame

getDesignModel

public ControlDesignModel getDesignModel()
Description copied from class: Control
Returns the design model of the control

Specified by:
getDesignModel in class Control
Returns:
The ControlDesignModel
See Also:
Control.getDesignModel()

getStateModel

public StateModel getStateModel()
Description copied from class: Control
Returns the state model of the control

Specified by:
getStateModel in class Control
Returns:
The state model
See Also:
Control.getStateModel()

setStateModel

public void setStateModel(FrameStateModel stateModel)
Sets the StateModel

Parameters:
stateModel - FrameStateModel

close

public void close()
Description copied from interface: FrameStateModel
Changes the state of the frame to closed

Specified by:
close in interface FrameStateModel
See Also:
FrameStateModel.close()

isClosed

public boolean isClosed()
Specified by:
isClosed in interface FrameStateModel
Returns:
returns true when the Frame is closed
See Also:
FrameStateModel.isClosed()

isMaximized

public boolean isMaximized()
Specified by:
isMaximized in interface FrameStateModel
Returns:
returns true when the Frame is maximized
See Also:
FrameStateModel.isMaximized()

isMinimized

public boolean isMinimized()
Specified by:
isMinimized in interface FrameStateModel
Returns:
returns true when the Frame is minimized
See Also:
FrameStateModel.isMinimized()

isOpen

public boolean isOpen()
Specified by:
isOpen in interface FrameStateModel
Returns:
returns true when the Frame is opened
See Also:
FrameStateModel.isOpen()

maximize

public void maximize()
Description copied from interface: FrameStateModel
Maximizes the frame

Specified by:
maximize in interface FrameStateModel
See Also:
FrameStateModel.maximize()

minimize

public void minimize()
Description copied from interface: FrameStateModel
Minimizes the frame

Specified by:
minimize in interface FrameStateModel
See Also:
FrameStateModel.minimize()

open

public void open()
Description copied from interface: FrameStateModel
Changes the state of the frame to opened

Specified by:
open in interface FrameStateModel
See Also:
FrameStateModel.open()

restore

public void restore()
Description copied from interface: FrameStateModel
Restores the frame

Specified by:
restore in interface FrameStateModel
See Also:
FrameStateModel.restore()

setDesignModel

public void setDesignModel(FrameDesignModel designModel)
Sets the design model

Parameters:
designModel - The design model of the frame

getCaption

public java.lang.String getCaption()
Returns the caption of the frame

Returns:
String

getDetail

public java.lang.String getDetail()
Returns the detail text

Returns:
String

getImage

public ImageModel getImage()
Returns the image for the frames title

Returns:
ImageModel

showFrame

public boolean showFrame()
Returns:
true if the fram should be shown

reset

public void reset()
Resets the state model

Specified by:
reset in interface StateModel

showButton

public boolean showButton(ControlButton button)
Description copied from class: Control
This Method is called by the Painter before rendering a Button. By overwriting this method a derived class can show or hide buttons.

Overrides:
showButton in class Control
Parameters:
button - ControlButton
Returns:
boolean
See Also:
Control.showButton(com.cc.framework.ui.control.ControlButton)

getInnerFrames

public InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
Retrieves a list of inner frames that are matching the given layout hint

Parameters:
layoutHint - The layout hint that specifies what frames should be selected: AlignmentType.TOP - header frames AlignmentType.BOTTOM - footer frames
Returns:
Frame list

onClose

public void onClose(ControlRequestContext ctx)
             throws java.lang.Exception
Default Handler for the Close Event

Parameters:
ctx - ControlRequestContext
Throws:
java.lang.Exception - is thrown when an error occurs

onMinimize

public void onMinimize(ControlRequestContext ctx)
                throws java.lang.Exception
Default Handler for the Minimize Event

Parameters:
ctx - ControlRequestContext
Throws:
java.lang.Exception - is thrown when an error occurs

onMaximize

public void onMaximize(ControlRequestContext ctx)
                throws java.lang.Exception
Default Handler for the Maximize Event

Parameters:
ctx - ControlRequestContext
Throws:
java.lang.Exception - is thrown when an error occurs

onRestore

public void onRestore(ControlRequestContext ctx)
               throws java.lang.Exception
Default Handler for the Restore Event

Parameters:
ctx - ControlRequestContext
Throws:
java.lang.Exception - is thrown when an error occurs


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