de.schwarzrot.ui.control.model
Class EventToggleListModel<L extends Entity,R extends Entity>
java.lang.Object
ca.odell.glazedlists.swing.DefaultEventListModel<L>
de.schwarzrot.ui.control.model.EventToggleListModel<L,R>
- Type Parameters:
L
- the entity of the left listboxR
- the entity of the right listbox
- All Implemented Interfaces:
- ca.odell.glazedlists.event.ListEventListener<L>, EventListener, ListModel
public class EventToggleListModel<L extends Entity,R extends Entity>
- extends ca.odell.glazedlists.swing.DefaultEventListModel<L>
model implementation for toggle list component. The model is the
ListModel
for the left toggle box, which may serve as a master for
detail editors. The model contains another ListModel
, which is used
for the right toggle box.
Default implementation supposes, that L
is the same class as
R
. Other models should override transform
and
contains
.
- Author:
- Reinhard Mantey
Fields inherited from class ca.odell.glazedlists.swing.DefaultEventListModel |
listDataEvent, source |
Constructor Summary |
EventToggleListModel(ca.odell.glazedlists.EventList<L> selection,
ca.odell.glazedlists.EventList<R> pooled)
|
Method Summary |
void |
addAll(ca.odell.glazedlists.EventList<R> selection)
|
boolean |
contains(R elem)
checks whether the given instance from the right toggle box is already
attached to the left toggle box. |
ca.odell.glazedlists.EventList<R> |
getPooledList()
|
ca.odell.glazedlists.swing.DefaultEventListModel<R> |
getPoolModel()
|
ca.odell.glazedlists.EventList<L> |
getSelectionList()
|
void |
removeAll(ca.odell.glazedlists.EventList<L> selection)
|
void |
setPoolModel(ca.odell.glazedlists.swing.DefaultEventListModel<R> poolModel)
|
L |
transform(R elem)
creates an instance from the given instance, usable to insert in the left
toggle box |
Methods inherited from class ca.odell.glazedlists.swing.DefaultEventListModel |
addListDataListener, dispose, fireListDataEvent, getElementAt, getSize, listChanged, removeListDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventToggleListModel
public EventToggleListModel(ca.odell.glazedlists.EventList<L> selection,
ca.odell.glazedlists.EventList<R> pooled)
addAll
public void addAll(ca.odell.glazedlists.EventList<R> selection)
contains
public boolean contains(R elem)
- checks whether the given instance from the right toggle box is already
attached to the left toggle box. The default implementation supposes,
that both toggle boxes contain the same entity.
- Parameters:
elem
- an instance from the right toggle box
- Returns:
- true if the elem is already attached to the left toggle box,
otherwise false
getPooledList
public final ca.odell.glazedlists.EventList<R> getPooledList()
getPoolModel
public final ca.odell.glazedlists.swing.DefaultEventListModel<R> getPoolModel()
getSelectionList
public final ca.odell.glazedlists.EventList<L> getSelectionList()
removeAll
public void removeAll(ca.odell.glazedlists.EventList<L> selection)
setPoolModel
public final void setPoolModel(ca.odell.glazedlists.swing.DefaultEventListModel<R> poolModel)
transform
public L transform(R elem)
- creates an instance from the given instance, usable to insert in the left
toggle box
- Parameters:
elem
- an instance from the right toggle box
- Returns:
- an instance for the left toggle box
Submit
a bug or request a feature
SRJRCFrames is published according to the
GNU General Public License
Copyright 2005-2012
Reinhard Mantey - some rights reserved.