com::cosylab::gui::components::r2::CheckListModel Class Reference

List of all members.

Classes

class  CheckListElement

Public Member Functions

 CheckListModel ()
void add (int index, Object element)
void addElement (Object element)
boolean contains (Object element)
void copyInto (Object[] anArray)
Object elementAt (int index)
Object firstElement ()
Object get (int index)
Object getElementAt (int index)
int indexOf (Object element)
int indexOf (Object element, int index)
void insertElementAt (Object element, int index)
boolean isChecked (int index)
Object lastElement ()
int lastIndexOf (Object element)
int lastIndexOf (Object element, int index)
Object remove (int index)
boolean removeElement (Object element)
Object set (int index, Object element)
void setChecked (int index, boolean value)
Object[] toArray ()
void toggleChecked (int index)

Protected Member Functions

Object convertFromModel (CheckListElement element)
CheckListElement convertToModel (Object element)
CheckListElement internalGet (int index)

Detailed Description

Data model used by JCheckList to store the checked state for each entry. The data model provides this functionality transparently. Each object that is added to the model will be wraped together with a boolean variable indicating its checked state. Model provides complete functionality of the javax.swing.DefaultListModel.

Creation date: (12/25/2001 16:27:43)

Author:
: Ales Pucelj (ales.pucelj@kgb.ijs.si)

Constructor & Destructor Documentation

com::cosylab::gui::components::r2::CheckListModel::CheckListModel (  )  [inline]

CheckListModel constructor comment.


Member Function Documentation

void com::cosylab::gui::components::r2::CheckListModel::add ( int  index,
Object  element 
) [inline]

Adds element to the model, inserting it at the location specified by index.

Creation date: (12/25/2001 16:38:26)

Parameters:
index int Index of the element
element java.lang.Object element to insert.

References convertToModel().

Referenced by com::cosylab::gui::components::r2::JCheckList::getCheckedItems().

void com::cosylab::gui::components::r2::CheckListModel::addElement ( Object  element  )  [inline]

Appends element to the end of the list.

Creation date: (12/25/2001 16:43:03)

Parameters:
element Object element to add

References convertToModel().

Referenced by com::cosylab::logging::settings::FilterChooserDialog::ButtonListener::actionPerformed(), com::cosylab::logging::settings::FilterChooserDialog::setupFields(), and com::cosylab::logging::settings::FieldChooserDialog::setupFields().

boolean com::cosylab::gui::components::r2::CheckListModel::contains ( Object  element  )  [inline]

Returns whether the element is in the model.

Creation date: (12/25/2001 16:44:17)

Returns:
boolean
Parameters:
element java.lang.Object

References convertToModel().

Object com::cosylab::gui::components::r2::CheckListModel::convertFromModel ( CheckListElement  element  )  [inline, protected]

Internal method to unwrap the element stored in CheckListElement.

Creation date: (12/25/2001 16:34:57)

Returns:
java.lang.Object
Parameters:
element com.cosylab.gui.components.CheckListElement

References com::cosylab::gui::components::r2::CheckListModel::CheckListElement::getElement().

Referenced by firstElement(), get(), lastElement(), lastIndexOf(), remove(), and set().

CheckListElement com::cosylab::gui::components::r2::CheckListModel::convertToModel ( Object  element  )  [inline, protected]

Internal method to wrap the element to the list.

Creation date: (12/25/2001 16:30:33)

Returns:
com.cosylab.gui.components.CheckListElement
Parameters:
item java.lang.Object

Referenced by add(), addElement(), contains(), indexOf(), insertElementAt(), lastIndexOf(), removeElement(), and set().

void com::cosylab::gui::components::r2::CheckListModel::copyInto ( Object[]  anArray  )  [inline]

Copies the contents of this model into the array. Array must contain sufficient space.

Creation date: (12/25/2001 16:45:22)

Parameters:
anArray java.lang.Object[]

Referenced by toArray().

Object com::cosylab::gui::components::r2::CheckListModel::elementAt ( int  index  )  [inline]

Returns the element at the specified index.

Creation date: (12/25/2001 16:46:59)

Returns:
java.lang.Object
Parameters:
index int
Object com::cosylab::gui::components::r2::CheckListModel::firstElement (  )  [inline]

Returns first element of the list.

Creation date: (12/25/2001 16:47:48)

Returns:
java.lang.Object

References convertFromModel().

Object com::cosylab::gui::components::r2::CheckListModel::get ( int  index  )  [inline]
Object com::cosylab::gui::components::r2::CheckListModel::getElementAt ( int  index  )  [inline]

Returns element at the specified position.

Creation date: (12/25/2001 16:49:14)

Returns:
java.lang.Object
Parameters:
index int
int com::cosylab::gui::components::r2::CheckListModel::indexOf ( Object  element,
int  index 
) [inline]

Returns index of first occurence of the object after the specified index.

Creation date: (12/25/2001 16:59:13)

Returns:
int
Parameters:
element java.lang.Object
index int

References convertToModel().

int com::cosylab::gui::components::r2::CheckListModel::indexOf ( Object  element  )  [inline]

Returns index of the object or -1 if the object is not in the list.

Creation date: (12/25/2001 16:58:29)

Returns:
int
Parameters:
element java.lang.Object

References convertToModel().

void com::cosylab::gui::components::r2::CheckListModel::insertElementAt ( Object  element,
int  index 
) [inline]

Inserts element to the specified position in the list.

Creation date: (12/25/2001 16:59:53)

Parameters:
element java.lang.Object
index int

References convertToModel().

CheckListElement com::cosylab::gui::components::r2::CheckListModel::internalGet ( int  index  )  [inline, protected]

Internal helper routine. Only performs type-cast on the internal element.

Creation date: (12/25/2001 18:20:16)

Referenced by isChecked(), setChecked(), and toggleChecked().

boolean com::cosylab::gui::components::r2::CheckListModel::isChecked ( int  index  )  [inline]
Object com::cosylab::gui::components::r2::CheckListModel::lastElement (  )  [inline]

Returns the last element of the list.

Creation date: (12/25/2001 17:00:27)

Returns:
java.lang.Object

References convertFromModel().

int com::cosylab::gui::components::r2::CheckListModel::lastIndexOf ( Object  element,
int  index 
) [inline]

Returns last occurence of the object in the list after specified index.

Creation date: (12/25/2001 17:01:50)

Returns:
int
Parameters:
element java.lang.Object
index int

References convertFromModel().

int com::cosylab::gui::components::r2::CheckListModel::lastIndexOf ( Object  element  )  [inline]

Returns index of the last ocurrence of the object or -1 if there is no such entry in the list.

Creation date: (12/25/2001 17:01:09)

Returns:
int
Parameters:
element java.lang.Object

References convertToModel().

Object com::cosylab::gui::components::r2::CheckListModel::remove ( int  index  )  [inline]

Removes element specified by index from the list.

Creation date: (12/25/2001 18:15:03)

Returns:
java.lang.Object
Parameters:
index int

References convertFromModel().

boolean com::cosylab::gui::components::r2::CheckListModel::removeElement ( Object  element  )  [inline]

Removes the element from the list. If the element is not in the list, this method returns false.

Creation date: (12/25/2001 18:16:12)

Returns:
boolean
Parameters:
element java.lang.Object

References convertToModel().

Object com::cosylab::gui::components::r2::CheckListModel::set ( int  index,
Object  element 
) [inline]

Sets new value for the element at the specified index.

Creation date: (12/25/2001 18:17:13)

Returns:
java.lang.Object
Parameters:
index int
element java.lang.Object

References convertFromModel(), and convertToModel().

Referenced by com::cosylab::logging::settings::FilterChooserDialog::ButtonListener::actionPerformed().

void com::cosylab::gui::components::r2::CheckListModel::setChecked ( int  index,
boolean  value 
) [inline]
Object [] com::cosylab::gui::components::r2::CheckListModel::toArray (  )  [inline]

Returns contents of this list as an array.

Creation date: (12/25/2001 18:18:37)

Returns:
java.lang.Object[]

References copyInto().

void com::cosylab::gui::components::r2::CheckListModel::toggleChecked ( int  index  )  [inline]

Toggles the checked state of the element at specified index.

Creation date: (12/25/2001 18:21:17)

Parameters:
index int

References com::cosylab::gui::components::r2::CheckListModel::CheckListElement::getElement(), internalGet(), and com::cosylab::gui::components::r2::CheckListModel::CheckListElement::toggleChecked().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2