gishur.core
Class ClipList

java.lang.Object
  |
  +--gishur.core.BasicList
        |
        +--gishur.core.SimpleList
              |
              +--gishur.core.List
                    |
                    +--gishur.core.ClipList
All Implemented Interfaces:
java.lang.Cloneable, Cloneable, ControlledCloneable, Owner, java.io.Serializable

public class ClipList
extends List

A list type supporting clipping features. These features allow the list to be bounded temporarily into specified intervals.

Version:
1.0
Author:
Thomas Wolf
See Also:
List, ListItem, SimpleListItem, Serialized Form

Fields inherited from class gishur.core.BasicList
ANY_ACCESS, KEY, LISTITEM, NO_ACCESS, VALUE
 
Fields inherited from interface gishur.core.ControlledCloneable
DEEP, FLAT
 
Constructor Summary
ClipList()
          Empty constructor.
ClipList(BasicList L)
          Conversion constructor.
ClipList(ListItem start, int count)
          Copy-constructor.
ClipList(ListItem start, ListItem end)
          Copy-constructor.
ClipList(java.lang.Object[] array, int startindex, int length)
          Constructor receiving its arguments in an array.
 
Method Summary
 void clip(ListItem start, ListItem end)
          Bounds the list into the interval from start to end.
 java.lang.Object clone(java.util.Hashtable h, int level)
          clones the entire list according to ControlledCloneable.
 void removeClip()
          Removes the bounds created by clip() and restores the list's former state.
 java.lang.String toString()
          Overrides java.lang.Object.toString().
 
Methods inherited from class gishur.core.List
add, findForValue, findForValue, insert
 
Methods inherited from class gishur.core.SimpleList
add, add, add, add, add, add, add, at, bottom, clear, clone, concat, contains, contains, convertKeysToArray, convertValuesToArray, copy, copy, cut, cut, cycle, cycle, cyclicRelative, cyclicRelativeValue, empty, find, find, find, findBigger, findBigger, findClass, findClass, findClass, findSmaller, findSmaller, first, firstKey, firstValue, getDistance, getIndex, getKeyAt, getListView, getValueAt, insert, insert, insert, insert, insert, insert, insert, insert, key, keys, last, lastKey, lastValue, length, max, min, move, move, move, next, next, paste, paste, peek, Peek, pop, Pop, popBoolean, PopBoolean, popDouble, PopDouble, popFloat, PopFloat, popInt, PopInt, popLong, PopLong, prev, prev, push, push, push, push, push, push, Push, relative, remove, remove, reverse, sort, sort, top, value, values
 
Methods inherited from class gishur.core.BasicList
add, add, allowAccess, copy, copy, copy, cut, enumerate, equals, find, findClass, findClosest, getIndex, getListItem, getListItemArray, getListString, move, reconnect, reconnect, remove, requestAccess, reverse, storeInArray, toString, unconnect
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClipList

public ClipList()
Empty constructor.

ClipList

public ClipList(BasicList L)
Conversion constructor. Assimilates all elements of BasicList L into this ClipList.
Parameters:
L - BasicList to be converted into a ClipList

ClipList

public ClipList(ListItem start,
                ListItem end)
Copy-constructor. Pastes a partial list into this list. If the partial list to be pasted is part of structure, a copy of it should normally be created and inserted, thus the source structure won't be changed in this case.
Parameters:
start - starting element of the sequence to be copied
end - last element of the copied (partial) list

ClipList

public ClipList(ListItem start,
                int count)
Copy-constructor. Pastes a partial list into this list. If the partial list to be pasted is part of structure, a copy of it should normally be created and inserted, thus the source structure won't be changed in this case.
Parameters:
start - starting element of the partial list to be copied
count - length of the sequence to be copied

ClipList

public ClipList(java.lang.Object[] array,
                int startindex,
                int length)
Constructor receiving its arguments in an array. The list is constructed using the first length elements of array following startindex.
Parameters:
array - an array containing the Objects to be stored in the list
startindex - the index of the first element which shall be stored
length - the number of elements to be stored
Method Detail

toString

public java.lang.String toString()
Overrides java.lang.Object.toString().
Overrides:
toString in class List
See Also:
Object.toString()

clone

public java.lang.Object clone(java.util.Hashtable h,
                              int level)
clones the entire list according to ControlledCloneable. That means, all ListItems are cloned and connected proper.
Overrides:
clone in class SimpleList
Parameters:
h - Hashtable to indicate which objects are already cloned
level - indicates how deep the objects should be cloned
Returns:
cloned object
Throws:
InternalError - - if the Object could not be cloned properly
See Also:
ControlledCloneable

clip

public void clip(ListItem start,
                 ListItem end)
Bounds the list into the interval from start to end. If start or end are not members of this list, a ListException will occur.
Parameters:
start - starting element of the clipping zone
end - last element of the clipping zone

removeClip

public void removeClip()
Removes the bounds created by clip() and restores the list's former state. If several clip()-operations were performed, the state before the first clipping is restored.