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

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.ButtonDesignModelImp
All Implemented Interfaces:
AccessControlled, ActionBehavior, AjaxSupport, ButtonDesignModel, ClientHandler, ControlDesignModel, DesignModel, java.io.Serializable, WebResourceAccess
Direct Known Subclasses:
FormButtonElement, MenuButtonDesignModelImp

public class ButtonDesignModelImp
extends ControlDesignModelImp
implements ButtonDesignModel

The design model for the Spin control

Since:
1.2
Version:
$Revision: 1.18 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.String base
          Image Base directory
private  int buttonStyle
          The button style id.
private  ButtonType buttonType
          The button type
private  boolean filter
          Specifies if all String should be converted into there HTML representation
private static long serialVersionUID
          Serial Version UID
private  java.lang.String src
          URL to image resource
private  java.lang.String target
          Target Attribute
private  java.lang.String text
          Text
 
Fields inherited from class com.cc.framework.ui.model.imp.ControlDesignModelImp
 
Fields inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
 
Constructor Summary
ButtonDesignModelImp()
          Constructor
 
Method Summary
 boolean filter()
          Returns if the filter is activated (default=true).
 java.lang.String getBase()
          Gets the Base Directory for the Resource
 int getButtonStyle()
          Returns the style for a text button If text buttons with different background images are needed they can be distinguished by the buttonStyle id.
 ButtonType getButtonType()
          Returns the type of the button
 java.lang.String getSrc()
          Returns the src.
 java.lang.String getTarget()
          Returns the target attribute.
 java.lang.String getText()
          Returns the text.
 void setBase(java.lang.String base)
          Sets the resoure base directory
 void setButtonStyle(int buttonStyle)
          Sets the button style indicating the background image of the text button
 void setButtonType(ButtonType buttonType)
          Sets the type of the button
 void setFilter(boolean filter)
          Activates the HTML encoding (filter).
 void setSrc(java.lang.String src)
          Sets the src.
 void setTarget(java.lang.String target)
          Defines a target attribute.
 void setText(java.lang.String text)
          Sets the text.
 
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

src

private java.lang.String src
URL to image resource


text

private java.lang.String text
Text


base

private java.lang.String base
Image Base directory


buttonType

private ButtonType buttonType
The button type


buttonStyle

private int buttonStyle
The button style id. The id is used to provide text buttons with different background images.


filter

private boolean filter
Specifies if all String should be converted into there HTML representation


target

private java.lang.String target
Target Attribute

Constructor Detail

ButtonDesignModelImp

public ButtonDesignModelImp()
Constructor

Method Detail

getSrc

public java.lang.String getSrc()
Description copied from interface: ButtonDesignModel
Returns the src.

Specified by:
getSrc in interface ButtonDesignModel
Returns:
String
See Also:
ButtonDesignModel.getSrc()

setSrc

public void setSrc(java.lang.String src)
Description copied from interface: ButtonDesignModel
Sets the src.

Specified by:
setSrc in interface ButtonDesignModel
Parameters:
src - The src to set
See Also:
ButtonDesignModel.setSrc(java.lang.String)

getText

public java.lang.String getText()
Description copied from interface: ButtonDesignModel
Returns the text.

Specified by:
getText in interface ButtonDesignModel
Returns:
String
See Also:
ButtonDesignModel.getText()

setText

public void setText(java.lang.String text)
Description copied from interface: ButtonDesignModel
Sets the text.

Specified by:
setText in interface ButtonDesignModel
Parameters:
text - The text to set
See Also:
ButtonDesignModel.setText(java.lang.String)

getBase

public java.lang.String getBase()
Description copied from interface: WebResourceAccess
Gets the Base Directory for the Resource

Specified by:
getBase in interface WebResourceAccess
Returns:
base directory or null
See Also:
WebResourceAccess.getBase()

setBase

public void setBase(java.lang.String base)
Description copied from interface: WebResourceAccess
Sets the resoure base directory

Specified by:
setBase in interface WebResourceAccess
Parameters:
base - Base Directory
See Also:
WebResourceAccess.setBase(java.lang.String)

getButtonStyle

public int getButtonStyle()
Description copied from interface: ButtonDesignModel
Returns the style for a text button If text buttons with different background images are needed they can be distinguished by the buttonStyle id.

Specified by:
getButtonStyle in interface ButtonDesignModel
Returns:
The style
See Also:
ButtonDesignModel.getButtonStyle()

setButtonStyle

public void setButtonStyle(int buttonStyle)
Description copied from interface: ButtonDesignModel
Sets the button style indicating the background image of the text button

Specified by:
setButtonStyle in interface ButtonDesignModel
Parameters:
buttonStyle - The button style id
See Also:
ButtonDesignModel.setButtonStyle(int)

getButtonType

public ButtonType getButtonType()
Description copied from interface: ButtonDesignModel
Returns the type of the button

Specified by:
getButtonType in interface ButtonDesignModel
Returns:
The type of the button
See Also:
ButtonDesignModel.getButtonType()

setButtonType

public void setButtonType(ButtonType buttonType)
Description copied from interface: ButtonDesignModel
Sets the type of the button

Specified by:
setButtonType in interface ButtonDesignModel
Parameters:
buttonType - The button type
See Also:
ButtonDesignModel.setButtonType(com.cc.framework.ui.model.ButtonType)

filter

public boolean filter()
Description copied from interface: ButtonDesignModel
Returns if the filter is activated (default=true). This means that all Strings which should be displayed in the HTML page are HTML encoded

Specified by:
filter in interface ButtonDesignModel
Returns:
true if string will be HTML encoded; false otherwise
See Also:
ButtonDesignModel.filter()

setFilter

public void setFilter(boolean filter)
Description copied from interface: ButtonDesignModel
Activates the HTML encoding (filter). Default is true. This means that all Strings which should be displayed in the HTML page will be HTML encoded.

Specified by:
setFilter in interface ButtonDesignModel
Parameters:
filter - true if strings should be HTML encoded; false otherwise
See Also:
ButtonDesignModel.setFilter(boolean)

setTarget

public void setTarget(java.lang.String target)
Description copied from interface: ButtonDesignModel
Defines a target attribute.

Specified by:
setTarget in interface ButtonDesignModel
Parameters:
target - The target attribute
See Also:
ButtonDesignModel.setTarget(java.lang.String)

getTarget

public java.lang.String getTarget()
Description copied from interface: ButtonDesignModel
Returns the target attribute.

Specified by:
getTarget in interface ButtonDesignModel
Returns:
The target attribute.
See Also:
ButtonDesignModel.getTarget()


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