com.cc.framework.ui.control
Class ListLineIterator

java.lang.Object
  extended bycom.cc.framework.ui.control.ListLineIterator
All Implemented Interfaces:
LineIterator

public class ListLineIterator
extends java.lang.Object
implements LineIterator

Class ListLineIterator

Version:
$Revision: 1.22 $
Author:
Harald Schulz

Field Summary
private  int current
          The current position
private  ListDataModel dataModel
          The data model
private  int maxRows
          The maximum number of rows the iterator can handle before returning done() = true
private  Principal principal
          The principal object with the users permission
private  ListStateModel state
          The state model
 
Constructor Summary
ListLineIterator(ListStateModel state, ListDataModel dataModel, int current, int maxRows, Principal principal)
          Constructor
ListLineIterator(ListStateModel state, ListDataModel dataModel, int current, Principal principal)
          Constructor
 
Method Summary
 java.lang.Object current()
          Returns the Object at the current position
 java.lang.Object current(java.lang.String property)
          Method current
 int currentCheckState()
          Returns the Check state -1 = The Item can not be checked.
 int currentIndex()
          Returns the current row index
 java.lang.String currentKey()
          Method curentKey
 boolean done()
          Checks if all items are processed
 int getMaxRows()
           
 Principal getPrincipal()
           
 boolean isMarked()
          Checks if the current Item is highlighted
 boolean isValidProperty(java.lang.String property)
          Checks if the current iteration element has the given property
 void next()
          Moves to the next element
 void prev()
          Moves to the previous element
 void reset()
          resets the iterator to the first element of the collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

current

private int current
The current position


maxRows

private int maxRows
The maximum number of rows the iterator can handle before returning done() = true


state

private ListStateModel state
The state model


dataModel

private ListDataModel dataModel
The data model


principal

private Principal principal
The principal object with the users permission

Constructor Detail

ListLineIterator

public ListLineIterator(ListStateModel state,
                        ListDataModel dataModel,
                        int current,
                        Principal principal)
Constructor

Parameters:
state - The state model
dataModel - The data model for the list to be processed
current - The index from which to start
principal - The principal object

ListLineIterator

public ListLineIterator(ListStateModel state,
                        ListDataModel dataModel,
                        int current,
                        int maxRows,
                        Principal principal)
Constructor

Parameters:
state - The state model
dataModel - The data model for the list to be processed
current - The index from which to start
maxRows - The maximum number of rows the iterator can handle before returning done() = true
principal - The principal object
Method Detail

done

public boolean done()
Description copied from interface: LineIterator
Checks if all items are processed

Specified by:
done in interface LineIterator
Returns:
boolean
See Also:
LineIterator.done()

current

public java.lang.Object current()
Description copied from interface: LineIterator
Returns the Object at the current position

Specified by:
current in interface LineIterator
Returns:
Object
See Also:
LineIterator.current()

current

public java.lang.Object current(java.lang.String property)
Description copied from interface: LineIterator
Method current

Specified by:
current in interface LineIterator
Parameters:
property - Bean Property Name
Returns:
Property Value
See Also:
LineIterator.current(String property)

isValidProperty

public boolean isValidProperty(java.lang.String property)
Description copied from interface: LineIterator
Checks if the current iteration element has the given property

Specified by:
isValidProperty in interface LineIterator
Parameters:
property - the property name
Returns:
true if the current bean possesses a matching property
See Also:
LineIterator.isValidProperty(java.lang.String)

currentKey

public java.lang.String currentKey()
Description copied from interface: LineIterator
Method curentKey

Specified by:
currentKey in interface LineIterator
Returns:
String
See Also:
LineIterator.currentKey()

currentCheckState

public int currentCheckState()
Description copied from interface: LineIterator
Returns the Check state

Specified by:
currentCheckState in interface LineIterator
Returns:
integer
See Also:
LineIterator.currentCheckState()

currentIndex

public int currentIndex()
Returns the current row index

Specified by:
currentIndex in interface LineIterator
Returns:
row index

next

public void next()
Description copied from interface: LineIterator
Moves to the next element

Specified by:
next in interface LineIterator
See Also:
LineIterator.next()

prev

public void prev()
Description copied from interface: LineIterator
Moves to the previous element

Specified by:
prev in interface LineIterator
See Also:
LineIterator.prev()

isMarked

public boolean isMarked()
Description copied from interface: LineIterator
Checks if the current Item is highlighted

Specified by:
isMarked in interface LineIterator
Returns:
boolean True if the current item is selected
See Also:
LineIterator.isMarked()

reset

public void reset()
Description copied from interface: LineIterator
resets the iterator to the first element of the collection

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

getPrincipal

public Principal getPrincipal()
Returns:
Returns the principal.

getMaxRows

public int getMaxRows()
Returns:
returns the maximum number of rows the iterator can handle before returning done() = true


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