Package javax.swing

Examples of javax.swing.AbstractListModel


    getContentPane().add(contentPanel, BorderLayout.CENTER);
    {
      CheckBoxList modList = new CheckBoxList();
      modList.setOpaque(false);
      modList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
      modList.setModel(new AbstractListModel() {
        public int getSize() {
          return modLists.length;
        }

        public Object getElementAt(int index) {
View Full Code Here


    public void recentFileListChanged() {
        ModelerPreferences pref = ModelerPreferences.getPreferences();
        final Vector<?> arr = (Vector<?>) pref.getVector(ModelerPreferences.LAST_PROJ_FILES).clone();
       
        recentsList.setModel(
            new AbstractListModel() {
                public int getSize() { return arr.size(); }
                public Object getElementAt(int i) { return arr.elementAt(i); }
            });
    }
View Full Code Here

        super(parent, modal);
        this.optionsList = new Vector<dbOptions>();
        for (LuceneBibtexDatabase db : plugin.getDatabases()) {
            optionsList.add(new dbOptions(db));
        }
        ListModel m1 = new AbstractListModel() {

            /**
       *
       */
      private static final long serialVersionUID = 1L;
View Full Code Here

    public void setListData(final Object[] listData)
    {
        // Similar a JList
        ItsNatListMultSelInternal comp = getItsNatListMultSel();
        AbstractListModel dataModel = new AbstractListModel()
        {
            public int getSize() { return listData.length; }
            public Object getElementAt(int i) { return listData[i]; }
        };
        comp.setListModel(dataModel);
View Full Code Here

    public void setListData(final List<Object> listData)
    {
        // Similar a JList
        ItsNatListMultSelInternal comp = getItsNatListMultSel();
        AbstractListModel dataModel = new AbstractListModel()
        {
            public int getSize() { return listData.size(); }
            public Object getElementAt(int i) { return listData.get(i); }
        };
        comp.setListModel(dataModel);
View Full Code Here

    public void recentFileListChanged() {

        final List<String> arr = ModelerPreferences.getLastProjFiles();

        recentsList.setModel(new AbstractListModel() {

            public int getSize() {
                return arr.size();
            }
View Full Code Here

    scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    add(scrollPane, BorderLayout.CENTER);
   
    this.list = new JList();
    this.list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    this.list.setModel(new AbstractListModel() {
      String[] values = new String[] {};
     
      @Override
      public int getSize()
      {
View Full Code Here

        for (ProfileForm profile : profiles) {
            model.add(new CheckListCellModel(profile.getName(), true));
        }

        listModel = new AbstractListModel() {

            private static final long serialVersionUID = -3790566823193174377L;

            @Override
            public int getSize() {
View Full Code Here

*/
public class SwingUtil {
 
  public static ListModel toListModel(final List elements) {
    return(
      new AbstractListModel() {
        public int getSize() {
          return(elements.size());
        }

        public Object getElementAt(int index) {
View Full Code Here

            }

            private void initUI() {
                JFrame frame = new JFrame("CheckBoxList");
                CheckBoxList list = new CheckBoxList();
                list.setModel(new AbstractListModel() {
                    private static final long serialVersionUID = 1L;

                    public int getSize() {
                        return boxes.length;
                    }
View Full Code Here

TOP

Related Classes of javax.swing.AbstractListModel

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.