Class ReorderListPanel

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible

    public class ReorderListPanel
    extends JPanel
    Panel for organizing elements in a list.
     
     <!--applet
    	code="com.iamsoft.util.ui.swing.ReorderListPanel$ExampleApplet.class"
    	archive="../../../../util.jar, ../../../../log4j-api.jar, ../../../../log4j-core.jar, ../../../../commons-collections.jar"
    	width="200"
    	height="125"
     >
    	<img src="doc-files/reorder_list_panel.gif" alt="ReorderListPanel Example" />
    	<param name="draggable" value="true" />
     </applet-->
     
     
    See Also:
    Serialized Form
    • Constructor Detail

      • ReorderListPanel

        public ReorderListPanel​(ReorderableListModel pModel,
                                String pTitle)
        Actions should update list model but needn't change list's selection indices. Selection will automatically be updated.
        Parameters:
        pModel - Underlying model to be updated as elements are moved.
    • Method Detail

      • getMainPanel

        protected JPanel getMainPanel()
        Panel which all widgets are added to. Has a gridbag layout. List is bounded by (0, 0) and (0, 1). The two buttons occupy positions (1, 0) and (1, 1) respectively.
      • getList

        public final JList getList()
        List used for selecting items to be moved up or down.
      • main

        public static void main​(String[] pArgs)
        Creates a JFrame and runs a sample instance of the reorder panel with some dummy data.