All Packages Class Hierarchy This Package Previous Next Index
Class com.netobjects.nfx.ui.TwoListPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.JPanel
|
+----com.netobjects.nfx.ui.TwoListPanel
- public class TwoListPanel
- extends JPanel
Component: TwoListPanel
Description:
This components provides the functionality to move items from one
ListModel to another. This component assumes that the model be at
least a derivative of DefaultListModel. However, the default model
for both lists are OrderedListModel, a derivative of the
DefaultListModel that implements ordering (in particular, ascending
by the String representation of the object.
- Version:
- : 1.0 9/21/98
- Author:
- : Toby Karyadi
Application Methods, Inc.
6300 Southcenter Blvd.
Seattle, WA 98188
(206) 244-2400
http://www.appmethods.com
- See Also:
- :
-
_btnToLeft
-
-
_btnToRight
-
-
_lblLeftList
-
-
_lblRightList
-
-
_lstLeft
-
-
_lstRight
-
-
_moveSrcItems
-
-
_scpLeft
-
-
_scpRight
-
-
_scrollPaneWidth
-
-
TwoListPanel()
- Constructor
-
TwoListPanel(OrderedListModel, String, OrderedListModel, String)
- Constructor
-
copyFromTo(JList, JList)
- This method copies an item from one ListModel to the other.
-
copyToRight()
- This method is called by the ActionListener of the
_btnLeft
-
getLeftList()
- Accessor method to the left JList sub component.
-
getLeftListLabel()
- Accessor method to the JLabel sub component of the left list.
-
getRightList()
- Accessor method to the right JList sub component.
-
getRightListLabel()
- Accessor method to the JLabel sub component of the left list.
-
getToLeftButton()
- Accessor method to the JButton sub component to move items to
the left list.
-
getToRightButton()
- Accessor method to the JButton sub component to move items to
the right list.
-
handleListSelection(ListSelectionEvent)
-
-
initComponentListeners()
- This method hooks up the sub components to the event handler
methods that are implemented in this class.
-
initControls()
-
-
initLayout()
- This is a method that is responsible for laying out the sub
components.
-
moveFromTo(JList, JList)
- This method moves an item from one ListModel to the other.
-
moveToLeft()
- This method is called by the ActionListener of the
_btnRight
-
moveToRight()
- This method is called by the ActionListener of the
_btnLeft
-
removeFrom(JList)
- This method removes items from a ListModel.
-
removeFromRight()
- This method is called by the ActionListener of the
_btnLeft
-
setMoveSrcItems(boolean)
- Set to true if source items are to be removed, not just coppied,
from the left and right list.
_lblLeftList
private JLabel _lblLeftList
_lblRightList
private JLabel _lblRightList
_lstLeft
private JList _lstLeft
_lstRight
private JList _lstRight
_btnToLeft
private JButton _btnToLeft
_btnToRight
private JButton _btnToRight
_scpLeft
private JScrollPane _scpLeft
_scpRight
private JScrollPane _scpRight
_moveSrcItems
private boolean _moveSrcItems
_scrollPaneWidth
private int _scrollPaneWidth
TwoListPanel
public TwoListPanel()
- Constructor
TwoListPanel
public TwoListPanel(OrderedListModel modelLeft,
String titleLeft,
OrderedListModel modelRight,
String titleRight)
- Constructor
- Parameters:
- modelLeft - the model for the left list.
- titleLeft - the list title for the left list.
- modelRight - the model for the right list.
- titleRight - he list title for the right list.
initControls
protected void initControls()
initLayout
protected void initLayout()
- This is a method that is responsible for laying out the sub
components.
initComponentListeners
protected void initComponentListeners()
- This method hooks up the sub components to the event handler
methods that are implemented in this class.
getLeftListLabel
public JLabel getLeftListLabel()
- Accessor method to the JLabel sub component of the left list.
getRightListLabel
public JLabel getRightListLabel()
- Accessor method to the JLabel sub component of the left list.
getLeftList
public JList getLeftList()
- Accessor method to the left JList sub component.
getRightList
public JList getRightList()
- Accessor method to the right JList sub component.
getToRightButton
public JButton getToRightButton()
- Accessor method to the JButton sub component to move items to
the right list.
getToLeftButton
public JButton getToLeftButton()
- Accessor method to the JButton sub component to move items to
the left list.
moveToRight
protected void moveToRight()
- This method is called by the ActionListener of the
_btnLeft
moveToLeft
protected void moveToLeft()
- This method is called by the ActionListener of the
_btnRight
copyToRight
protected void copyToRight()
- This method is called by the ActionListener of the
_btnLeft
removeFromRight
protected void removeFromRight()
- This method is called by the ActionListener of the
_btnLeft
setMoveSrcItems
protected void setMoveSrcItems(boolean set)
- Set to true if source items are to be removed, not just coppied,
from the left and right list. The default is false.
- Parameters:
- set - true/false
moveFromTo
protected void moveFromTo(JList lstSrc,
JList lstDst)
- This method moves an item from one ListModel to the other.
This method only assumes that the ListModel be at least a
derivative of DefaultListModel.
copyFromTo
protected void copyFromTo(JList lstSrc,
JList lstDst)
- This method copies an item from one ListModel to the other.
This method only assumes that the ListModel be at least a
derivative of OrderedListModel.
removeFrom
protected void removeFrom(JList lst)
- This method removes items from a ListModel.
This method only assumes that the ListModel be at least a
derivative of DefaultListModel.
handleListSelection
protected void handleListSelection(ListSelectionEvent e)
All Packages Class Hierarchy This Package Previous Next Index