|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.cc.framework.ui.control.Control
com.cc.framework.ui.control.ListControl
com.cc.framework.ui.control.TreelistControl
The Tree List Control.
| Nested Class Summary |
| Nested classes inherited from class com.cc.framework.ui.control.ListControl |
ListControl.RowFilter |
| Field Summary | |
private TreeGroupDataModel |
dataModel
Data model for the control |
private TreelistDesignModel |
designModel
Design model for the control |
private static long |
serialVersionUID
Serial Version UID |
private TreelistStateModel |
stateModel
State model |
| Fields inherited from class com.cc.framework.ui.control.Control |
log |
| Fields inherited from interface com.cc.framework.ui.model.ListStateModel |
PROP_PAGE |
| Fields inherited from interface com.cc.framework.ui.model.StateModel |
PROP_CONTROL |
| Fields inherited from interface com.cc.framework.ui.model.TreeStateModel |
PROP_EXPANDED, PROP_SELECTED |
| Constructor Summary | |
TreelistControl()
Constructor |
|
| Method Summary | |
protected int |
calcAbsoulteRowIndex(int relRowIndex)
Calculates the absolute row index from a page relative row index |
protected int |
calcVisibleNodes(TreeNodeDataModel root)
Die Methode berechnet die Anzahl der sichtbaren (=aufgeklappten) Einträge des Baumes. |
void |
collapse(java.lang.String nodeKey)
The specified group node will be collapsed |
void |
collapse(TreeNodeDataModel node)
Collapses the given node |
void |
collapseAll()
Collapses all tree nodes |
protected TreelistStateModel |
doCreateStatemodel()
Creates the state model for this control instance |
void |
expand(java.lang.String key)
The specified group node will be expanded |
void |
expand(TreeNodeDataModel node)
Expands the given node |
void |
expandAll()
Expands the whole tree. |
void |
expandToLevel(int level)
Expands the tree up to the given level. |
int |
getCellPadding()
Returns the cell padding for the list cells |
int |
getCellSpacing()
Returns the cell spacing for the list cells |
ColumnDesignModel[] |
getColumns()
Returns an Array with all columns. |
int |
getCurrentPage()
Returns the zero based index of the page which is currently display. |
DataModel |
getDataModel()
Returns the data model of the Control |
ControlDesignModel |
getDesignModel()
Returns the design model of the control |
java.lang.String[] |
getDetailText()
Returns the detail text which is displayed in the caption in the format "3 to 10 from 2000" |
java.lang.String |
getEmptyText()
A text that is output in the body of the list element if there are no lines available (size() == 0) |
TreeNodeDataModel |
getFirstItemOfPage()
Liefert das erste Item der aktuell angezeigten Seite zurück |
protected TreeNodeDataModel |
getFirstNode()
Returns the first node to be displayed |
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 |
LineIterator |
getLineIterator(boolean positioned)
Creates a line iterator |
java.lang.String[] |
getMarked()
Retrieves all marked items |
int |
getMinRowCount()
Returns the minimal number of rows on the page. |
protected TreeNodeDataModel |
getNodeFromIndex(int rowIndex)
Method getNodeFromIndex |
int |
getPageButtons()
Returns the number of page buttons. |
LineIterator |
getPageLineIterator()
Creates a line iterator for the current page |
java.lang.Object |
getRowFromKey(java.lang.String rowkey)
Retrieves the row bean for the given key |
protected int |
getRowsOnCurrentPage()
Liefert die Anzahl der Zeilen welche auf der aktuellen Seite dargestellt werden sollen. |
int |
getRowsPerPage()
Returns the number of rows on a page |
java.lang.String |
getScrollHeight()
Retrieves the height of the scroll container |
java.lang.String |
getSelected()
Returns the key of the selected node |
SelectMode |
getSelectMode()
Return the selection mode of the list. |
java.lang.String |
getSortColumn()
Returns the name of the column which is currently used for sorting. |
SortOrder |
getSortOrder()
Returns the sort order |
SortOrder |
getSortOrder(java.lang.String column)
Returns the sort order for the specified column. |
StateModel |
getStateModel()
Returns the state model of the control |
OrientationType |
getTabOrientation()
Retrieves the tabulator orientation |
java.lang.String |
getTitle()
Returns the Title |
int |
getTotalPages()
Returns the total number of pages. |
int |
getTotalRowCount()
Liefert die Anzahl der tatsächlich vorhandenen Zeilen zurück. |
boolean |
isExpanded(java.lang.String nodeKey)
Checks if the specified group node is expanded |
boolean |
isExpanded(TreeNodeDataModel node)
Checks if the given node is expanded |
boolean |
isFirstPage()
Returns true if the First Page is displayed |
boolean |
isLastPage()
Returns true if the Last Page is displayed |
boolean |
isMarked(java.lang.String uniqueKey)
Checks if the specified row is selected. |
boolean |
isSelected(java.lang.String nodeKey)
Checks if the specified node is selected. |
boolean |
isSelected(TreeNodeDataModel node)
Checks if the given node is selected |
void |
mark(java.lang.String uniqueKey)
Selects a specified row. |
void |
onCheck(ControlRequestContext ctx,
java.lang.String key,
SelectMode mode,
boolean check)
Default Handler for the Check Event |
void |
onCheckAll(ControlRequestContext ctx,
SelectMode mode,
boolean check)
Default Handler for the CheckAll Event |
void |
onCollapse(ControlRequestContext ctx,
java.lang.String key)
Default Handler for the Collapse Event |
void |
onExpand(ControlRequestContext ctx,
java.lang.String key)
Default Handler for the Expand Event |
void |
onExpandEx(ControlRequestContext ctx,
java.lang.String key)
Default Handler for the ExpandEx Event |
void |
onPage(ControlRequestContext ctx,
int newPage)
Default Handler for the Page Event |
void |
onSort(ControlRequestContext ctx,
java.lang.String column,
SortOrder direction)
Default Handler for the Sort Event |
void |
reset()
Resets the actual state of a control to the initial state |
protected void |
resetExpandInfo(boolean keepExpanded)
Resets all expanded Nodes |
void |
resetSortInfo()
Resets any sorting Information |
void |
select(java.lang.String nodeKey)
Selects the specified node. |
void |
select(TreeNodeDataModel node)
Marks the given node as selected |
protected void |
setCheckboxValue(RequestContext ctx,
ControlValuePath path,
java.lang.Object rowbean,
java.lang.String property,
boolean checked,
SelectMode selectmode)
This method is called to set the value of a checkbox column |
void |
setCurrentPage(int page)
Sets the index for the page which is currently display to another value. |
void |
setDataModel(TreeGroupDataModel dataModel)
Sets the Data model |
void |
setDataModel(TreeGroupDataModel dataModel,
boolean keepState)
Sets the Data model |
void |
setDesignModel(TreelistDesignModel designModel)
Sets the DesignModel |
protected void |
setRadioValue(RequestContext ctx,
ControlValuePath path,
java.lang.Object rowbean,
java.lang.String property,
java.lang.String value)
This method is called to set the value of a radio button column |
void |
setSortInfo(java.lang.String column,
SortOrder direction)
Sets the sort order for the specified column |
void |
setStateModel(TreelistStateModel stateModel)
Sets the StateModel |
boolean |
showButton(ControlButton button)
This Method is called by the Painter before rendering a Button. |
boolean |
showFrame()
Returns true if the frame should be painted |
boolean |
showHeader()
Returns true if the header should be painted |
void |
unmark(java.lang.String uniqueKey)
Unselects a specified row. |
void |
unmarkAll()
Unselects all selected rows |
void |
unselectAll()
Unselects the current selection of the tree |
| Methods inherited from class com.cc.framework.ui.control.ListControl |
allowAjaxRendering, getAjaxId, getNavigationPosition, getVisibleColumns, onAdd, onCellClick, onCheckColumn, onCreate, onDelete, onDrilldown, onEdit, onExportList, onPrintList, onRefresh, onSelect, setControlValue, setValue |
| Methods inherited from class com.cc.framework.ui.control.Control |
addButton, execute, execute, execute, execute, execute, execute, execute, getAction, 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, 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 |
private static final long serialVersionUID
private TreeGroupDataModel dataModel
private TreelistDesignModel designModel
private TreelistStateModel stateModel
| Constructor Detail |
public TreelistControl()
| Method Detail |
protected TreelistStateModel doCreateStatemodel()
public DataModel getDataModel()
Control
getDataModel in class ControlControl.getDataModel()public void setDataModel(TreeGroupDataModel dataModel)
dataModel - TreeGroupDataModel
public void setDataModel(TreeGroupDataModel dataModel,
boolean keepState)
dataModel - TreeGroupDataModelkeepState - when set to true the treelist control will keep
its current state (Expanded nodes current page etc.)public ControlDesignModel getDesignModel()
Control
getDesignModel in class ControlControl.getDesignModel()public void setDesignModel(TreelistDesignModel designModel)
designModel - TreelistDesignModelpublic StateModel getStateModel()
Control
getStateModel in class ControlControl.getStateModel()public void setStateModel(TreelistStateModel stateModel)
stateModel - TreeListStateModelpublic int getPageButtons()
ListControl
getPageButtons in class ListControlListControl.getPageButtons()public boolean showFrame()
ListControl
showFrame in class ListControlListControl.showFrame()public boolean showHeader()
ListControl
showHeader in class ListControlListControl.showHeader()public int getCellPadding()
ListControl
getCellPadding in class ListControlListControl.getCellPadding()public int getCellSpacing()
ListControl
getCellSpacing in class ListControlListControl.getCellSpacing()public OrientationType getTabOrientation()
ListControl
getTabOrientation in class ListControlListControl.getTabOrientation()public boolean showButton(ControlButton button)
Control
showButton in class Controlbutton - ControlButton
Control.showButton(com.cc.framework.ui.control.ControlButton)public ColumnDesignModel[] getColumns()
ListControl
getColumns in class ListControlListControl.getColumns()public LineIterator getLineIterator(boolean positioned)
ListControl
getLineIterator in class ListControlpositioned - if set to true the method returns a iterator
which is positioned on the first line on the current page.
ListControl.getLineIterator(boolean)public LineIterator getPageLineIterator()
ListControl
getPageLineIterator in class ListControlListControl.getPageLineIterator()public InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
getInnerFrames in class ListControllayoutHint - The layout hint that specifies what frames should be selected:
public int getCurrentPage()
ListStateModel
getCurrentPage in interface ListStateModelgetCurrentPage in class ListControlListControl.getCurrentPage()public void setCurrentPage(int page)
ListStateModel
setCurrentPage in interface ListStateModelpage - The new page indexListStateModel.setCurrentPage(int)public java.lang.String getSortColumn()
ListStateModel
getSortColumn in interface ListStateModelListStateModel.getSortColumn()public SortOrder getSortOrder()
ListStateModel
getSortOrder in interface ListStateModelListStateModel.getSortOrder()public SortOrder getSortOrder(java.lang.String column)
ListControl
getSortOrder in class ListControlcolumn - The name of the column
ListControl.getSortOrder(java.lang.String)
public void setSortInfo(java.lang.String column,
SortOrder direction)
setSortInfo in interface ListStateModelcolumn - Name of the columndirection - The sort orderpublic void resetSortInfo()
ListStateModel
resetSortInfo in interface ListStateModelListStateModel.resetSortInfo()public void reset()
StateModel
reset in interface StateModelStateModel.reset()protected void resetExpandInfo(boolean keepExpanded)
keepExpanded - true to keep the current expansion state of the
controlpublic int getRowsPerPage()
getRowsPerPage in class ListControlpublic int getMinRowCount()
ListControl
getMinRowCount in class ListControlListControl.getMinRowCount()protected TreeNodeDataModel getFirstNode()
public int getTotalRowCount()
getTotalRowCount in class ListControlprotected int calcVisibleNodes(TreeNodeDataModel root)
root - TreeNodeDataModel
protected int calcAbsoulteRowIndex(int relRowIndex)
relRowIndex - page relative row index
protected TreeNodeDataModel getNodeFromIndex(int rowIndex)
rowIndex - absolute row index
nullpublic int getTotalPages()
ListControl
getTotalPages in class ListControlListControl.getTotalPages()protected int getRowsOnCurrentPage()
public java.lang.String getTitle()
ListControl
getTitle in class ListControlListControl.getTitle()public java.lang.String[] getDetailText()
ListControl
getDetailText in class ListControlListControl.getDetailText()public java.lang.String getScrollHeight()
ListControl
getScrollHeight in class ListControlListControl.getScrollHeight()public ImageModel getImage()
ListControl
getImage in class ListControlListControl.getImage()public java.lang.String getEmptyText()
ListControl
getEmptyText in class ListControlListControl.getEmptyText()public SelectMode getSelectMode()
ListControl
getSelectMode in class ListControlListControl.getSelectMode()public boolean isFirstPage()
public boolean isLastPage()
public TreeNodeDataModel getFirstItemOfPage()
public boolean isExpanded(TreeNodeDataModel node)
node - The node to check
true if the node is expandedpublic boolean isExpanded(java.lang.String nodeKey)
TreeStateModel
isExpanded in interface TreeStateModelnodeKey - the nodes unique key
TreeStateModel.isExpanded(java.lang.String)public void expand(TreeNodeDataModel node)
node - the node to expandpublic void expand(java.lang.String key)
TreeStateModel
expand in interface TreeStateModelkey - the nodes unique keyTreeStateModel.expand(java.lang.String)public void expandAll()
public void expandToLevel(int level)
level - Tree level (0 = root level)public void collapseAll()
TreeStateModel
collapseAll in interface TreeStateModelTreeStateModel.collapseAll()public void collapse(TreeNodeDataModel node)
node - the node to collapsepublic void collapse(java.lang.String nodeKey)
TreeStateModel
collapse in interface TreeStateModelnodeKey - the nodes unique keyTreeStateModel.collapse(java.lang.String)public void select(TreeNodeDataModel node)
node - Tree nodepublic void select(java.lang.String nodeKey)
TreeStateModel
select in interface TreeStateModelnodeKey - the nodes unique keyTreeStateModel.select(java.lang.String)public void unselectAll()
TreeStateModel
unselectAll in interface TreeStateModelTreeStateModel.unselectAll()public boolean isSelected(TreeNodeDataModel node)
node - the node to check
true if the node is checkedpublic boolean isSelected(java.lang.String nodeKey)
TreeStateModel
isSelected in interface TreeStateModelnodeKey - the nodes unique key
TreeStateModel.isSelected(java.lang.String)public java.lang.String getSelected()
TreeStateModel
getSelected in interface TreeStateModelnullTreeStateModel.getSelected()public java.lang.Object getRowFromKey(java.lang.String rowkey)
ListControl
getRowFromKey in class ListControlrowkey - The rows unique key
nullListControl.getRowFromKey(java.lang.String)
protected void setCheckboxValue(RequestContext ctx,
ControlValuePath path,
java.lang.Object rowbean,
java.lang.String property,
boolean checked,
SelectMode selectmode)
throws java.lang.Exception
setCheckboxValue in class ListControlctx - The control action contextpath - Path Name of the input elementrowbean - The row beanproperty - The Column namechecked - true if the checkbox is checkedselectmode - the selection mode of the column
java.lang.Exception - a derived class can throw an exception if the value could not
be set
protected void setRadioValue(RequestContext ctx,
ControlValuePath path,
java.lang.Object rowbean,
java.lang.String property,
java.lang.String value)
throws java.lang.Exception
setRadioValue in class ListControlctx - The control action contextpath - Path Name of the input elementrowbean - The row beanproperty - The Column namevalue - the radio button value
java.lang.Exception - a derived class can throw an exception if the value could not
be setpublic boolean isMarked(java.lang.String uniqueKey)
ListStateModel
isMarked in interface ListStateModeluniqueKey - The unique key
ListStateModel.isMarked(java.lang.String)public java.lang.String[] getMarked()
ListStateModel
getMarked in interface ListStateModelListStateModel.getMarked()public void mark(java.lang.String uniqueKey)
ListStateModel
mark in interface ListStateModeluniqueKey - The unique key of the row which should be selectedListStateModel.mark(java.lang.String)public void unmark(java.lang.String uniqueKey)
ListStateModel
unmark in interface ListStateModeluniqueKey - The unique key of the row which should be unselectedListStateModel.unmark(java.lang.String)public void unmarkAll()
ListStateModel
unmarkAll in interface ListStateModelListStateModel.unmarkAll()
public void onExpandEx(ControlRequestContext ctx,
java.lang.String key)
throws java.lang.Exception
onExpandEx in class ListControlctx - ControlRequestContextkey - Unique Id as generated by the data model to identify the Row
java.lang.Exception - is thrown when an error occurs
public void onExpand(ControlRequestContext ctx,
java.lang.String key)
throws java.lang.Exception
onExpand in class ListControlctx - ControlRequestContextkey - Unique Id as generated by the data model to identify the Row
java.lang.Exception - is thrown when an error occurs
public void onCollapse(ControlRequestContext ctx,
java.lang.String key)
throws java.lang.Exception
onCollapse in class ListControlctx - ControlRequestContextkey - Unique Id as generated by the data model to identify the Row
java.lang.Exception - is thrown when an error occurs
public void onCheck(ControlRequestContext ctx,
java.lang.String key,
SelectMode mode,
boolean check)
throws java.lang.Exception
onCheck in class ListControlctx - ControlRequestContextkey - Unique Id as generated by the data model to identify the Rowmode - SelectModecheck - true if checked
java.lang.Exception - is thrown when an error occurs
public void onCheckAll(ControlRequestContext ctx,
SelectMode mode,
boolean check)
throws java.lang.Exception
onCheckAll in class ListControlctx - ControlRequestContextmode - SelectModecheck - true if checked
java.lang.Exception - is thrown when an error occurs
public void onPage(ControlRequestContext ctx,
int newPage)
throws java.lang.Exception
onPage in class ListControlctx - ControlRequestContextnewPage - Index of the Page
java.lang.Exception - is thrown when an error occurs
public void onSort(ControlRequestContext ctx,
java.lang.String column,
SortOrder direction)
throws java.lang.Exception
onSort in class ListControlctx - ControlRequestContextcolumn - Column Namedirection - SortOrder
java.lang.Exception - is thrown when an error occurs
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||