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

java.lang.Object
  extended bycom.cc.framework.ui.model.imp.ListStateModelImp
All Implemented Interfaces:
ListStateModel, java.io.Serializable, StateModel

public class ListStateModelImp
extends java.lang.Object
implements ListStateModel, java.io.Serializable

Implementation of the ListState model

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

Field Summary
private  int currentPage
          Current Page, which is displayed
private  java.util.HashSet highlight
          Collection with the highlight rows
private static long serialVersionUID
          Serial Version UID
private  java.lang.String sortColumn
          Column to sort
private  SortOrder sortOrder
          The sort order
 
Fields inherited from interface com.cc.framework.ui.model.ListStateModel
PROP_PAGE
 
Fields inherited from interface com.cc.framework.ui.model.StateModel
PROP_CONTROL
 
Constructor Summary
ListStateModelImp()
           
 
Method Summary
 int getCurrentPage()
          Returns the zero based index of the page which is currently display.
 java.lang.String[] getMarked()
          Retrieves all marked items
 java.lang.String getSortColumn()
          Returns the name of the column which is currently used for sorting.
 SortOrder getSortOrder()
          Returns the sort order
 boolean isMarked(java.lang.String uniqueKey)
          Checks if the specified row is selected.
 void mark(java.lang.String uniqueKey)
          Selects a specified row.
 void reset()
          Resets the actual state of a control to the initial state
 void resetSortInfo()
          Resets any sorting Information
 void setCurrentPage(int page)
          Sets the index for the page which is currently display to another value.
 void setSortInfo(java.lang.String column, SortOrder direction)
          Sets the sort order for the specified column
 void synchronizeState(PropertyMap properties)
          This method applies the given state properties to the controls state model
 void unmark(java.lang.String uniqueKey)
          Unselects a specified row.
 void unmarkAll()
          Unselects all selected rows
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

currentPage

private int currentPage
Current Page, which is displayed


sortColumn

private java.lang.String sortColumn
Column to sort


sortOrder

private SortOrder sortOrder
The sort order


highlight

private java.util.HashSet highlight
Collection with the highlight rows

Constructor Detail

ListStateModelImp

public ListStateModelImp()
Method Detail

getCurrentPage

public int getCurrentPage()
Description copied from interface: ListStateModel
Returns the zero based index of the page which is currently display.

Specified by:
getCurrentPage in interface ListStateModel
Returns:
Zero based index of the page which is currently displayed
See Also:
ListStateModel.getCurrentPage()

getSortColumn

public java.lang.String getSortColumn()
Description copied from interface: ListStateModel
Returns the name of the column which is currently used for sorting.

Specified by:
getSortColumn in interface ListStateModel
Returns:
The name of the column which is currently used for sorting
See Also:
ListStateModel.getSortColumn()

getSortOrder

public SortOrder getSortOrder()
Description copied from interface: ListStateModel
Returns the sort order

Specified by:
getSortOrder in interface ListStateModel
Returns:
The sort order
See Also:
ListStateModel.getSortOrder()

isMarked

public boolean isMarked(java.lang.String uniqueKey)
Description copied from interface: ListStateModel
Checks if the specified row is selected.

Specified by:
isMarked in interface ListStateModel
Parameters:
uniqueKey - The unique key
Returns:
boolean Returns true if the row is selected; false otherwise
See Also:
ListStateModel.isMarked(java.lang.String)

getMarked

public java.lang.String[] getMarked()
Description copied from interface: ListStateModel
Retrieves all marked items

Specified by:
getMarked in interface ListStateModel
Returns:
Array with the keys of the marked items
See Also:
ListStateModel.getMarked()

mark

public void mark(java.lang.String uniqueKey)
Description copied from interface: ListStateModel
Selects a specified row.

Specified by:
mark in interface ListStateModel
Parameters:
uniqueKey - The unique key of the row which should be selected
See Also:
ListStateModel.mark(java.lang.String)

setCurrentPage

public void setCurrentPage(int page)
Description copied from interface: ListStateModel
Sets the index for the page which is currently display to another value.

Specified by:
setCurrentPage in interface ListStateModel
Parameters:
page - The new page index
See Also:
ListStateModel.setCurrentPage(int)

setSortInfo

public void setSortInfo(java.lang.String column,
                        SortOrder direction)
Description copied from interface: ListStateModel
Sets the sort order for the specified column

Specified by:
setSortInfo in interface ListStateModel
Parameters:
column - Name of the column
direction - The sort order
See Also:
ListStateModel.setSortInfo(java.lang.String, com.cc.framework.common.SortOrder)

resetSortInfo

public void resetSortInfo()
Description copied from interface: ListStateModel
Resets any sorting Information

Specified by:
resetSortInfo in interface ListStateModel
See Also:
ListStateModel.resetSortInfo()

unmark

public void unmark(java.lang.String uniqueKey)
Description copied from interface: ListStateModel
Unselects a specified row.

Specified by:
unmark in interface ListStateModel
Parameters:
uniqueKey - The unique key of the row which should be unselected
See Also:
ListStateModel.unmark(java.lang.String)

unmarkAll

public void unmarkAll()
Description copied from interface: ListStateModel
Unselects all selected rows

Specified by:
unmarkAll in interface ListStateModel
See Also:
ListStateModel.unmarkAll()

reset

public void reset()
Description copied from interface: StateModel
Resets the actual state of a control to the initial state

Specified by:
reset in interface StateModel
See Also:
StateModel.reset()

synchronizeState

public void synchronizeState(PropertyMap properties)
                      throws java.lang.Exception
Description copied from interface: StateModel
This method applies the given state properties to the controls state model

Specified by:
synchronizeState in interface StateModel
Parameters:
properties - State properties
Throws:
java.lang.Exception - is thrown when an error occurs during execution
See Also:
StateModel.synchronizeState(com.cc.framework.util.PropertyMap)


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