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

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.TreeDesignModelImp
All Implemented Interfaces:
AccessControlled, ActionBehavior, AjaxSupport, ClientHandler, ControlDesignModel, DesignModel, ScrollSupport, java.io.Serializable, TreeDesignModel, TreeStyle

public class TreeDesignModelImp
extends ControlDesignModelImp
implements TreeDesignModel

Designmodel for the TreeControl

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

Field Summary
private  java.lang.String enableProperty
          Field enableProperty
private  ExpansionMode expansion
          Field expansion
private  boolean filter
          Specifies if all String should be converted into there HTML representation
private  boolean groupSelect
          Field groupSelect
private  ImageMap imageMap
          Field imageMap
private  java.lang.String imageProperty
          Field imageProperty
private  java.lang.String labelProperty
          Field labelProperty
private  boolean labelWrap
          Controls how labels are wrapped when displayed
private  int maxLength
          Maximum number of visible characters
private  int rowCount
          Number of visible rows
private  java.lang.String scrollHeight
          The height of the scroll container
private  SelectMode selectMode
          Selection mode
private static long serialVersionUID
          Serial Version UID
private  boolean showButtons
          Tells the control to show or hide the buttons for expanding and collapsing the tree nodes
private  boolean showCheckBoxes
          Field showCheckBoxes
private  boolean showLines
          Field showLines
private  boolean showLinesAtRoot
          Field showLinesAtRoot
private  boolean showRoot
          Field showRoot
private  java.lang.String target
          The HTML target attribute
private  java.lang.String targetProperty
          The property to retrieve the HTML target attribute
private  java.lang.String tooltipProperty
          Field tooltipProperty
 
Fields inherited from class com.cc.framework.ui.model.imp.ControlDesignModelImp
 
Fields inherited from class com.cc.framework.ui.model.imp.ClientHandlerImp
 
Constructor Summary
TreeDesignModelImp()
          Constructor
 
Method Summary
 boolean filter()
          Returns if the filter is activated (default=true).
 java.lang.String getEnableProperty()
          Liefert den Namen der Eigenschaft, welche die Spaltendaten ermittelt, zurück
 ExpansionMode getExpansionMode()
          Returns the expansion state.
 boolean getGroupSelect()
          Returns if the group nodes are selectabel.
 ImageMap getImageMap()
          Returns the associated ImageMap
 java.lang.String getImageProperty()
          Returns the image property
 java.lang.String getLabelProperty()
          Returns the Property which should be used to get the labels for the Nodes
 int getMaxLength()
          Returns the maximal number of input characters which can be inserted into the text field.
 int getRowCount()
          Returns the maximum number of lines that are depicted simultaneously.
 java.lang.String getScrollHeight()
          Returns the height of the scroll container
 SelectMode getSelectMode()
          Returns the the selection mode of the list.
 java.lang.String getTarget()
          Returns the target attribute.
 java.lang.String getTargetProperty()
          Returns the name of the property.
 java.lang.String getTooltipProperty()
          Returns the name of the property.
 void setEnableProperty(java.lang.String property)
          Setzt den Namen der Eigenschaft mit deren Hilfe der Spaltenwert bestimmt werden kann.
 void setExpansionMode(ExpansionMode mode)
          Sets the expansion state
 void setFilter(boolean filter)
          Activates the HTML encoding (filter).
 void setGroupSelect(boolean select)
          Defines if the group nodes should be selectabel.
 void setImageMap(ImageMap map)
          Specifies the name of an image map.
 void setImageProperty(java.lang.String property)
          Specifies the property using which an image can be assigned to every Row-Bean
 void setLabelProperty(java.lang.String property)
          Specifies the property using which a label can be assigned to every Row-Bean.
 void setLabelWrap(boolean wrap)
          Sets the label wrapping behavior
 void setMaxLength(int maxLength)
          Sets the maximal number of input characters which can be inserted into the text field.
 void setRowCount(int rows)
          This attribute is used to specify the maximum number of lines that are depicted simultaneously.
 void setScrollHeight(java.lang.String height)
          Sets the height of the scroll container
 void setSelectMode(SelectMode mode)
          Specifies the selection mode of the list.
 void setTarget(java.lang.String target)
          Defines a target attribute which should be inserted in all generated hyperlinks of the columns.
 void setTargetProperty(java.lang.String targetProperty)
          Specifies the name of a property with the help of which the relevant line can generate an HTML-target attribute.
 void setTooltipProperty(java.lang.String tooltipProperty)
          Specifies the name of a property with the help of which the relevant line can generate an HTML-text attribute.
 boolean showButtons()
          Returns if the icons for expanding a node are displayed.
 void showButtons(boolean show)
          Defines if the icons for expanding a node should be displayed.
 boolean showCheckBoxes()
          Returns if a checkbox is displayed before the tree entries.
 void showCheckBoxes(boolean show)
          Indicates whether a checkbox should be displayed before the tree entries
The tree entries must implement the Checkable Interface, so that the control element can draw the checkboxes.
 boolean showLines()
          Returns if a line between the nodes is displayed.
 void showLines(boolean show)
          Defines if a line between the nodes should be displayed.
 boolean showLinesAtRoot()
          Returns whether lines should be drawn to the construction elements of the uppermost (displayed) level.
 void showLinesAtRoot(boolean show)
          Specifies whether lines should be drawn to the construction elements of the uppermost (displayed) level.
 boolean showRoot()
          Returns if the root element should be displayed
 void showRoot(boolean show)
          Specifies whether the root of the tree element should be displayed.
 boolean wrapLabels()
           
 
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
 
Methods inherited from interface com.cc.framework.ui.model.TreeStyle
getStyle, getStyleClass, getStyleId, isDisabled, setDisabled, setStyle, setStyleClass, setStyleId
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

expansion

private ExpansionMode expansion
Field expansion


rowCount

private int rowCount
Number of visible rows


showButtons

private boolean showButtons
Tells the control to show or hide the buttons for expanding and collapsing the tree nodes


showLines

private boolean showLines
Field showLines


showLinesAtRoot

private boolean showLinesAtRoot
Field showLinesAtRoot


showCheckBoxes

private boolean showCheckBoxes
Field showCheckBoxes


showRoot

private boolean showRoot
Field showRoot


groupSelect

private boolean groupSelect
Field groupSelect


imageProperty

private java.lang.String imageProperty
Field imageProperty


labelProperty

private java.lang.String labelProperty
Field labelProperty


labelWrap

private boolean labelWrap
Controls how labels are wrapped when displayed


tooltipProperty

private java.lang.String tooltipProperty
Field tooltipProperty


target

private java.lang.String target
The HTML target attribute


targetProperty

private java.lang.String targetProperty
The property to retrieve the HTML target attribute


enableProperty

private java.lang.String enableProperty
Field enableProperty


imageMap

private ImageMap imageMap
Field imageMap


selectMode

private SelectMode selectMode
Selection mode


filter

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


maxLength

private int maxLength
Maximum number of visible characters


scrollHeight

private java.lang.String scrollHeight
The height of the scroll container

Constructor Detail

TreeDesignModelImp

public TreeDesignModelImp()
Constructor

Method Detail

getRowCount

public int getRowCount()
Description copied from interface: TreeDesignModel
Returns the maximum number of lines that are depicted simultaneously. When the total number of available lines in the data model is greater than the number of lines displayed, buttons are automatically generated for navigation through pages.

Specified by:
getRowCount in interface TreeDesignModel
Returns:
Number of rows to show per page. -1 means that all rows are displayed.
See Also:
TreeDesignModel.getRowCount()

setRowCount

public void setRowCount(int rows)
Description copied from interface: TreeDesignModel
This attribute is used to specify the maximum number of lines that are depicted simultaneously.

Specified by:
setRowCount in interface TreeDesignModel
Parameters:
rows - The number of rows to show
See Also:
TreeDesignModel.setRowCount(int)

getExpansionMode

public ExpansionMode getExpansionMode()
Description copied from interface: TreeStyle
Returns the expansion state.

Specified by:
getExpansionMode in interface TreeStyle
Returns:
The expansion mode
See Also:
TreeStyle.getExpansionMode()

setExpansionMode

public void setExpansionMode(ExpansionMode mode)
Description copied from interface: TreeStyle
Sets the expansion state

Specified by:
setExpansionMode in interface TreeStyle
Parameters:
mode - The expansion mode
See Also:
TreeStyle.setExpansionMode(ExpansionMode)

showButtons

public boolean showButtons()
Description copied from interface: TreeStyle
Returns if the icons for expanding a node are displayed. Note: The class which implements this interface must be aware of the settings of the expansion mode. If the nodes are always expanded this method should return false.

Specified by:
showButtons in interface TreeStyle
Returns:
boolean
See Also:
TreeStyle.showButtons()

showButtons

public void showButtons(boolean show)
Description copied from interface: TreeStyle
Defines if the icons for expanding a node should be displayed.

Specified by:
showButtons in interface TreeStyle
Parameters:
show - true if the icons should be displayed;
false otherwise.
See Also:
TreeStyle.showButtons(boolean)

showLines

public boolean showLines()
Description copied from interface: TreeStyle
Returns if a line between the nodes is displayed.

Specified by:
showLines in interface TreeStyle
Returns:
true if a line between the nodes is displayed;
false otherwise.
See Also:
TreeStyle.showLines()

showLines

public void showLines(boolean show)
Description copied from interface: TreeStyle
Defines if a line between the nodes should be displayed.

Specified by:
showLines in interface TreeStyle
Parameters:
show - true if a line between the nodes should be displayed;
false otherwise.
See Also:
TreeStyle.showLines(boolean)

showLinesAtRoot

public boolean showLinesAtRoot()
Description copied from interface: TreeStyle
Returns whether lines should be drawn to the construction elements of the uppermost (displayed) level.

Specified by:
showLinesAtRoot in interface TreeStyle
Returns:
boolean
See Also:
TreeStyle.showLinesAtRoot()

showLinesAtRoot

public void showLinesAtRoot(boolean show)
Description copied from interface: TreeStyle
Specifies whether lines should be drawn to the construction elements of the uppermost (displayed) level.

Specified by:
showLinesAtRoot in interface TreeStyle
Parameters:
show - true if the line should be visible on the uppermost level; false otherwise
See Also:
TreeStyle.showLinesAtRoot(boolean)

showRoot

public boolean showRoot()
Description copied from interface: TreeStyle
Returns if the root element should be displayed

Specified by:
showRoot in interface TreeStyle
Returns:
boolean true if the root element should be displayed; false otherwise
See Also:
TreeStyle.showRoot()

showRoot

public void showRoot(boolean show)
Description copied from interface: TreeStyle
Specifies whether the root of the tree element should be displayed.

Specified by:
showRoot in interface TreeStyle
Parameters:
show - true if the root element should be displayed
See Also:
TreeStyle.showRoot(boolean)

showCheckBoxes

public boolean showCheckBoxes()
Description copied from interface: TreeStyle
Returns if a checkbox is displayed before the tree entries.

Specified by:
showCheckBoxes in interface TreeStyle
Returns:
boolean true if a checkbox is displayed;
false otherwise
See Also:
TreeStyle.showCheckBoxes()

showCheckBoxes

public void showCheckBoxes(boolean show)
Description copied from interface: TreeStyle
Indicates whether a checkbox should be displayed before the tree entries
The tree entries must implement the Checkable Interface, so that the control element can draw the checkboxes. Group nodes must not implement this interface, since the Check-State of groups can be automatically calculated with the help of the state of the pages.

Specified by:
showCheckBoxes in interface TreeStyle
Parameters:
show - true if checkbox should be displayed;
false otherwise
See Also:
TreeStyle.showCheckBoxes(boolean)

setImageProperty

public void setImageProperty(java.lang.String property)
Description copied from interface: TreeDesignModel
Specifies the property using which an image can be assigned to every Row-Bean

Specified by:
setImageProperty in interface TreeDesignModel
Parameters:
property - Name of the property
See Also:
TreeDesignModel.setImageProperty(String)

getImageProperty

public java.lang.String getImageProperty()
Description copied from interface: TreeDesignModel
Returns the image property

Specified by:
getImageProperty in interface TreeDesignModel
Returns:
Name of the property
See Also:
TreeDesignModel.getImageProperty()

setLabelProperty

public void setLabelProperty(java.lang.String property)
Description copied from interface: TreeDesignModel
Specifies the property using which a label can be assigned to every Row-Bean.

Specified by:
setLabelProperty in interface TreeDesignModel
Parameters:
property - Name of the property
See Also:
TreeDesignModel.setLabelProperty(String)

getLabelProperty

public java.lang.String getLabelProperty()
Description copied from interface: TreeDesignModel
Returns the Property which should be used to get the labels for the Nodes

Specified by:
getLabelProperty in interface TreeDesignModel
Returns:
Name of the property
See Also:
TreeDesignModel.getLabelProperty()

setImageMap

public void setImageMap(ImageMap map)
Description copied from interface: TreeDesignModel
Specifies the name of an image map.

Specified by:
setImageMap in interface TreeDesignModel
Parameters:
map - ImageMap
See Also:
TreeDesignModel.setImageMap(ImageMap)

getImageMap

public ImageMap getImageMap()
Description copied from interface: TreeDesignModel
Returns the associated ImageMap

Specified by:
getImageMap in interface TreeDesignModel
Returns:
ImageMap
See Also:
TreeDesignModel.getImageMap()

setGroupSelect

public void setGroupSelect(boolean select)
Description copied from interface: TreeStyle
Defines if the group nodes should be selectabel.

Specified by:
setGroupSelect in interface TreeStyle
Parameters:
select - true if the group nodes should be selectabel;
false otherwise
See Also:
TreeStyle.setGroupSelect(boolean)

getGroupSelect

public boolean getGroupSelect()
Description copied from interface: TreeStyle
Returns if the group nodes are selectabel.

Specified by:
getGroupSelect in interface TreeStyle
Returns:
boolean true if the group nodes are selectabel;
false otherwise
See Also:
TreeStyle.getGroupSelect()

setTarget

public void setTarget(java.lang.String target)
Description copied from interface: TreeStyle
Defines a target attribute which should be inserted in all generated hyperlinks of the columns.
Note: The same attribute will be used in all rows!

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

getTarget

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

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

setTargetProperty

public void setTargetProperty(java.lang.String targetProperty)
Description copied from interface: TreeStyle
Specifies the name of a property with the help of which the relevant line can generate an HTML-target attribute.
Note: Valid Java designator/label. The Row-Bean must implement a suitable property-getter method. The attribute can be defined individual within each row (In difference to the method setTarget)

Specified by:
setTargetProperty in interface TreeStyle
Parameters:
targetProperty - The name of the property to use
See Also:
TreeStyle.setTargetProperty(java.lang.String)

getTargetProperty

public java.lang.String getTargetProperty()
Description copied from interface: TreeStyle
Returns the name of the property.

Specified by:
getTargetProperty in interface TreeStyle
Returns:
The name of the property.
See Also:
TreeStyle.getTargetProperty()

getSelectMode

public SelectMode getSelectMode()
Description copied from interface: TreeStyle
Returns the the selection mode of the list.

Specified by:
getSelectMode in interface TreeStyle
Returns:
SelectMode
See Also:
TreeStyle.getSelectMode()

setSelectMode

public void setSelectMode(SelectMode mode)
Description copied from interface: TreeStyle
Specifies the selection mode of the list.
This is only used if a Check column is to be displayed here as well.

Specified by:
setSelectMode in interface TreeStyle
Parameters:
mode - The select mode
See Also:
TreeStyle.setSelectMode(SelectMode)

getTooltipProperty

public java.lang.String getTooltipProperty()
Description copied from interface: TreeStyle
Returns the name of the property.

Specified by:
getTooltipProperty in interface TreeStyle
Returns:
The name of the property.
See Also:
TreeStyle.getTooltipProperty()

setTooltipProperty

public void setTooltipProperty(java.lang.String tooltipProperty)
Description copied from interface: TreeStyle
Specifies the name of a property with the help of which the relevant line can generate an HTML-text attribute. Note: Valid Java designator/label. The Row-Bean must implement a suitable property-getter method. The attribute can be defined individual within each row

Specified by:
setTooltipProperty in interface TreeStyle
Parameters:
tooltipProperty - The target attribute
See Also:
TreeStyle.setTooltipProperty(java.lang.String)

getEnableProperty

public java.lang.String getEnableProperty()
Description copied from interface: TreeStyle
Liefert den Namen der Eigenschaft, welche die Spaltendaten ermittelt, zurück

Specified by:
getEnableProperty in interface TreeStyle
Returns:
Property
See Also:
TreeStyle.getEnableProperty()

setEnableProperty

public void setEnableProperty(java.lang.String property)
Description copied from interface: TreeStyle
Setzt den Namen der Eigenschaft mit deren Hilfe der Spaltenwert bestimmt werden kann.

Specified by:
setEnableProperty in interface TreeStyle
Parameters:
property - Der Name der Eigenschaft
See Also:
TreeStyle.setEnableProperty(java.lang.String)

getMaxLength

public int getMaxLength()
Description copied from interface: TreeDesignModel
Returns the maximal number of input characters which can be inserted into the text field.

Specified by:
getMaxLength in interface TreeDesignModel
Returns:
Maximum number of input characters to accept
See Also:
TreeDesignModel.getMaxLength()

setMaxLength

public void setMaxLength(int maxLength)
Description copied from interface: TreeDesignModel
Sets the maximal number of input characters which can be inserted into the text field.

Specified by:
setMaxLength in interface TreeDesignModel
Parameters:
maxLength - Maximum number of input characters to accept
See Also:
TreeDesignModel.setMaxLength(int)

filter

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

setFilter

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

getScrollHeight

public java.lang.String getScrollHeight()
Description copied from interface: ScrollSupport
Returns the height of the scroll container

Specified by:
getScrollHeight in interface ScrollSupport
Returns:
String
See Also:
ScrollSupport.getScrollHeight()

setScrollHeight

public void setScrollHeight(java.lang.String height)
Description copied from interface: ScrollSupport
Sets the height of the scroll container

Specified by:
setScrollHeight in interface ScrollSupport
Parameters:
height - height
See Also:
ScrollSupport.setScrollHeight(java.lang.String)

setLabelWrap

public void setLabelWrap(boolean wrap)
Description copied from interface: TreeStyle
Sets the label wrapping behavior

Specified by:
setLabelWrap in interface TreeStyle
Parameters:
wrap - true to wrap labels
See Also:
TreeStyle.setLabelWrap(boolean)

wrapLabels

public boolean wrapLabels()
Specified by:
wrapLabels in interface TreeStyle
Returns:
returns true when the tree should wrap labels
See Also:
TreeStyle.wrapLabels()


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