Package simtools.ui

Examples of simtools.ui.CheckBoxList


            while(it.hasNext()){
                sheets.add(((JComponent)it.next()) );
            }
        }

        sheetsList = new CheckBoxList(sheets);
       
        // sheetsList.setVisibleRowCount(5);
        JScrollPane tlistScrollPane = new JScrollPane(sheetsList);
       
        addOnCurrentRow(new JLabel(resources.getString("selectSheets")));
View Full Code Here


        };
        boolean[] checkedItems= {
            true, false, true, true,
            false, false, true, false,
        };
      final CheckBoxList list = new CheckBoxList(listItems, checkedItems);
       
        // show list
        JScrollPane scroller =
            new JScrollPane (list,
                            ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
                            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        JFrame frame = new JFrame (CheckBoxListTest.class.getName());
        frame.getContentPane().add (scroller);
        frame.pack();
        frame.setVisible(true);
       
    frame.addWindowListener(new WindowAdapter(){

      public void windowClosing(WindowEvent e) {
        boolean[] res=list.getCheckedItems();
        for(int i=0;i<listItems.length;i++){
          System.out.println(listItems[i]+" "+res[i]);
        }
        System.exit(0);
      }
View Full Code Here

TOP

Related Classes of simtools.ui.CheckBoxList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.