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

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.SwapSelectDesignModelImp
All Implemented Interfaces:
AccessControlled, ActionBehavior, AjaxSupport, ButtonContainer, ClientHandler, ControlDesignModel, DesignModel, java.io.Serializable, SwapSelectDesignModel

public class SwapSelectDesignModelImp
extends ControlDesignModelImp
implements SwapSelectDesignModel

Designmodel for the SwapSelectControl

Since:
1.4.082
Version:
$Revision: 1.17 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  ButtonContainer buttons
          The users permission which is necessary to see any buttons
private  boolean filter
          Specifies if all String should be converted into there HTML representation
private  java.lang.String labelLeft
          Label for the left selection window
private  java.lang.String[] labelRight
          Label for the right selection window
private  boolean multiple
          Defines the control as a multi swap select control
private  OrientationType orientation
          Specifies the orientation of the selection windows: horizontal = from top to bottom vertical = from left to right
private  boolean retainOrder
          Tells the control to retain the sort order in the "from" option list
private static long serialVersionUID
          Serial Version UID
private  int[] size
          Number of character positions to allocate.
private  SortOrder sortOrder
          Specifies the sort order: none = no sort order asc = ascending sort order desc = descending sort order
 
Fields inherited from class com.cc.framework.ui.model.imp.ControlDesignModelImp
 
Fields inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
 
Constructor Summary
SwapSelectDesignModelImp()
          Constructor
 
Method Summary
 boolean filter()
          Returns if the filter is activated (default=true).
 Permission getButtonPermission(ControlButton button)
          Retrieves the permission for the given button
 java.lang.String getLabelLeft()
          Retrieves the label for the left selection window
 java.lang.String[] getLabelRight()
          Retrieves the label for the right selection window
 OrientationType getOrientation()
          Retrieves the orientation of the selection windows
 int[] getSize()
          Returns the number of visible items for each individual select box.
 SortOrder getSortOrder()
          Retrieves the sort order of the control
 boolean isMultiple()
           
 boolean retainOrder()
           
 void setButtonPermission(ControlButton button, Permission permission)
          Sets whether a command button should be displayed by specifying an Access Control List.
 void setFilter(boolean filter)
          Activates the HTML encoding (filter).
 void setLabelLeft(java.lang.String label)
          Sets the label for the left selection window
 void setLabelRight(java.lang.String label)
          Sets the label for the right selection window
 void setLabelRight(java.lang.String[] label)
          Sets the label for the right selection window
 void setMultiple(boolean multiple)
          Tells the control behave as a multiple swap select control with multiple shift targets. the number of targets is specified by the number of array elements of the data model.
 void setOrientation(OrientationType orientation)
          Specifies the orientation of the selection windows: horizontal = from top to bottom vertical = from left to right
 void setRetainOrder(boolean retainOrder)
          Tells the control to retain the sort order in the "from" option list
 void setSize(int size)
          Sets the size of the input field.
 void setSize(int[] size)
          Sets the size of the input field.
 void setSortOrder(SortOrder sortOrder)
          Specifies the sort order: none = no sort order asc = ascending sort order desc = descending sort order
 boolean showButton(ControlButton button, Principal principal)
          Checks if the button can be displayed.
 
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

size

private int[] size
Number of character positions to allocate.


labelLeft

private java.lang.String labelLeft
Label for the left selection window


labelRight

private java.lang.String[] labelRight
Label for the right selection window


filter

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


retainOrder

private boolean retainOrder
Tells the control to retain the sort order in the "from" option list


multiple

private boolean multiple
Defines the control as a multi swap select control


orientation

private OrientationType orientation
Specifies the orientation of the selection windows:


sortOrder

private SortOrder sortOrder
Specifies the sort order:


buttons

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

Constructor Detail

SwapSelectDesignModelImp

public SwapSelectDesignModelImp()
Constructor

Method Detail

getSize

public int[] getSize()
Description copied from interface: SwapSelectDesignModel
Returns the number of visible items for each individual select box.

Specified by:
getSize in interface SwapSelectDesignModel
Returns:
number of visible items
See Also:
SwapSelectDesignModel.getSize()

setSize

public void setSize(int size)
Description copied from interface: SwapSelectDesignModel
Sets the size of the input field.

Specified by:
setSize in interface SwapSelectDesignModel
Parameters:
size - The size of the input field.
See Also:
SwapSelectDesignModel.setSize(int)

setSize

public void setSize(int[] size)
Description copied from interface: SwapSelectDesignModel
Sets the size of the input field.

Specified by:
setSize in interface SwapSelectDesignModel
Parameters:
size - The size of the input field.
See Also:
SwapSelectDesignModel.setSize(int[])

getLabelLeft

public java.lang.String getLabelLeft()
Description copied from interface: SwapSelectDesignModel
Retrieves the label for the left selection window

Specified by:
getLabelLeft in interface SwapSelectDesignModel
Returns:
the label
See Also:
SwapSelectDesignModel.getLabelLeft()

getLabelRight

public java.lang.String[] getLabelRight()
Description copied from interface: SwapSelectDesignModel
Retrieves the label for the right selection window

Specified by:
getLabelRight in interface SwapSelectDesignModel
Returns:
the label
See Also:
SwapSelectDesignModel.getLabelRight()

getOrientation

public OrientationType getOrientation()
Description copied from interface: SwapSelectDesignModel
Retrieves the orientation of the selection windows

Specified by:
getOrientation in interface SwapSelectDesignModel
Returns:
the orientation
See Also:
SwapSelectDesignModel.getOrientation()

setLabelLeft

public void setLabelLeft(java.lang.String label)
Description copied from interface: SwapSelectDesignModel
Sets the label for the left selection window

Specified by:
setLabelLeft in interface SwapSelectDesignModel
Parameters:
label - the label
See Also:
SwapSelectDesignModel.setLabelLeft(java.lang.String)

setLabelRight

public void setLabelRight(java.lang.String label)
Description copied from interface: SwapSelectDesignModel
Sets the label for the right selection window

Specified by:
setLabelRight in interface SwapSelectDesignModel
Parameters:
label - the label
See Also:
SwapSelectDesignModel.setLabelRight(java.lang.String)

setLabelRight

public void setLabelRight(java.lang.String[] label)
Description copied from interface: SwapSelectDesignModel
Sets the label for the right selection window

Specified by:
setLabelRight in interface SwapSelectDesignModel
Parameters:
label - the label
See Also:
SwapSelectDesignModel.setLabelRight(java.lang.String[])

setOrientation

public void setOrientation(OrientationType orientation)
Description copied from interface: SwapSelectDesignModel
Specifies the orientation of the selection windows:

Specified by:
setOrientation in interface SwapSelectDesignModel
Parameters:
orientation - The orientation of the control
See Also:
SwapSelectDesignModel.setOrientation(com.cc.framework.ui.OrientationType)

setSortOrder

public void setSortOrder(SortOrder sortOrder)
Description copied from interface: SwapSelectDesignModel
Specifies the sort order:

Specified by:
setSortOrder in interface SwapSelectDesignModel
Parameters:
sortOrder - The sort order of the control
See Also:
SwapSelectDesignModel.setSortOrder(com.cc.framework.common.SortOrder)

getSortOrder

public SortOrder getSortOrder()
Description copied from interface: SwapSelectDesignModel
Retrieves the sort order of the control

Specified by:
getSortOrder in interface SwapSelectDesignModel
Returns:
the sort order
See Also:
SwapSelectDesignModel.getSortOrder()

filter

public boolean filter()
Description copied from interface: SwapSelectDesignModel
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 SwapSelectDesignModel
Returns:
true if string will be HTML encoded; false otherwise
See Also:
SwapSelectDesignModel.filter()

setFilter

public void setFilter(boolean filter)
Description copied from interface: SwapSelectDesignModel
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 SwapSelectDesignModel
Parameters:
filter - true if strings should be HTML encoded; false otherwise
See Also:
SwapSelectDesignModel.setFilter(boolean)

retainOrder

public boolean retainOrder()
Specified by:
retainOrder in interface SwapSelectDesignModel
Returns:
returns true when the control should retain the sort order in the "from" option list
See Also:
SwapSelectDesignModel.retainOrder()

setMultiple

public void setMultiple(boolean multiple)
Description copied from interface: SwapSelectDesignModel
Tells the control behave as a multiple swap select control with multiple shift targets. the number of targets is specified by the number of array elements of the data model.

Specified by:
setMultiple in interface SwapSelectDesignModel
Parameters:
multiple - true if the element should act as a multiple swap select
See Also:
SwapSelectDesignModel.setMultiple(boolean)

isMultiple

public boolean isMultiple()
Specified by:
isMultiple in interface SwapSelectDesignModel
Returns:
returns true when the control should be rendered as a multiple swap select control with multiple shift targets
See Also:
SwapSelectDesignModel.isMultiple()

setRetainOrder

public void setRetainOrder(boolean retainOrder)
Description copied from interface: SwapSelectDesignModel
Tells the control to retain the sort order in the "from" option list

Specified by:
setRetainOrder in interface SwapSelectDesignModel
Parameters:
retainOrder - true if the element should retain the sort order
See Also:
SwapSelectDesignModel.setRetainOrder(boolean)

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.