net.sf.jguiraffe.gui.platform.swing.builder.components
Class SwingMultiListBoxHandler

java.lang.Object
  extended by net.sf.jguiraffe.gui.platform.swing.builder.components.SwingComponentHandler
      extended by net.sf.jguiraffe.gui.platform.swing.builder.components.SwingListModelHandler
          extended by net.sf.jguiraffe.gui.platform.swing.builder.components.SwingListBoxHandler
              extended by net.sf.jguiraffe.gui.platform.swing.builder.components.SwingMultiListBoxHandler
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ListSelectionListener, ListComponentHandler, ComponentHandler, SwingEventSource

 class SwingMultiListBoxHandler
extends SwingListBoxHandler

A Swing specific component handler implementation that deals with multi selection lists.

A multi selection list can have multiple items selected at the same time. So the component's data is an array of selected objects.

Version:
$Id: SwingMultiListBoxHandler.java 71 2007-06-16 20:47:48Z oheger $
Author:
Oliver Heger

Constructor Summary
SwingMultiListBoxHandler(javax.swing.JList list, ListModel listModel)
          Creates a new instance of SwingMultiListBoxHandler.
 
Method Summary
 java.lang.Object getData()
          Returns this component's data.
 java.lang.Class getType()
          Returns this component's data type.
 void setData(java.lang.Object data)
          Sets the data of this component.
 
Methods inherited from class net.sf.jguiraffe.gui.platform.swing.builder.components.SwingListBoxHandler
getList, getOuterComponent, initComponentModel, registerChangeListener, unregisterChangeListener, valueChanged
 
Methods inherited from class net.sf.jguiraffe.gui.platform.swing.builder.components.SwingListModelHandler
addItem, createSwingListModel, getListModel, removeItem
 
Methods inherited from class net.sf.jguiraffe.gui.platform.swing.builder.components.SwingComponentHandler
addActionListener, addChangeListener, addFocusListener, fireChangeEvent, getComponent, getJComponent, isEnabled, removeActionListener, removeChangeListener, removeFocusListener, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jguiraffe.gui.forms.ComponentHandler
getComponent, isEnabled, setEnabled
 

Constructor Detail

SwingMultiListBoxHandler

public SwingMultiListBoxHandler(javax.swing.JList list,
                                ListModel listModel)
Creates a new instance of SwingMultiListBoxHandler.

Parameters:
list - the list component
listModel - the model
Method Detail

getData

public java.lang.Object getData()
Returns this component's data. Based on the selection objects from the list model will be returned.

Specified by:
getData in interface ComponentHandler
Overrides:
getData in class SwingListBoxHandler
Returns:
the component's data

setData

public void setData(java.lang.Object data)
Sets the data of this component.

Specified by:
setData in interface ComponentHandler
Overrides:
setData in class SwingListBoxHandler
Parameters:
data - the new data (which should be an array with items of the list model)

getType

public java.lang.Class getType()
Returns this component's data type. This is a generic array type.

Specified by:
getType in interface ComponentHandler
Overrides:
getType in class SwingListModelHandler
Returns:
the data type of this component


Copyright 2007 null. All Rights Reserved.