Package util.ui.customizableitems

Examples of util.ui.customizableitems.SelectableItemList


      }
    }

    mDownloadBtn.setEnabled(!selectedItems.isEmpty());

    mSoftwareUpdateItemList = new SelectableItemList(selectedItems.toArray(new SoftwareUpdateItem[selectedItems.size()]),itemArr);
    mSoftwareUpdateItemList.addListSelectionListener(this);
    mSoftwareUpdateItemList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    mSoftwareUpdateItemList.setListUI(new MyListUI());
    mSoftwareUpdateItemList.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
View Full Code Here


      allCategories.add(name);
      if ((category & mCategories) == category) {
        checkedCategories.add(name);
      }
    }
    mList = new SelectableItemList(checkedCategories.toArray(), allCategories
        .toArray());
    panel.add(mList, BorderLayout.CENTER);
    return panel;
  }
View Full Code Here

      allItems[i] = item;
      if (bitSet(mSelectedBits, infoBits[i])) {
        selectedItems.add(item);
      }
    }
    mList = new SelectableItemList(selectedItems.toArray(), allItems);
    mList.addCenterRendererComponent(String.class,
        new SelectableItemRendererCenterComponentIf() {
          private DefaultListCellRenderer mRenderer = new DefaultListCellRenderer();

          @Override
View Full Code Here

        selectedDays.add(allDays[day]);
      }
      bit <<= 1;
    }

    mList = new SelectableItemList(selectedDays.toArray(), allDays);
    content.add(mList, BorderLayout.CENTER);
    return content;
  }
View Full Code Here

    Collections.sort(list, new Comparator<Marker>() {
      public int compare(Marker arg0, Marker arg1) {
        return (arg0.toString().compareTo(arg1.toString()));
      }});

    mPluginItemList = new SelectableItemList(mResultPluginArr, list.toArray());

    int pos = 1;
    layout.appendRow(RowSpec.decode("fill:default:grow"));
    layout.appendRow(RowSpec.decode("3dlu"));
    contentPane.add(mPluginItemList, cc.xy(1,pos));
View Full Code Here

    pb.addRow();
    pb.add(mMarkItems, cc.xyw(2,pb.getRow(),4));

    pb.addParagraph(mLocalizer.msg("interface", "Interface"));

    mExporterList = new SelectableItemList(mPlugin.getExporterFactory().getActiveExporters(), mPlugin.getExporterFactory().getAllExporters());
    pb.addRow("120");
    pb.add(mExporterList, cc.xyw(2,pb.getRow(),3));

    final JButton settings = new JButton(Localizer.getLocalization(Localizer.I18N_SETTINGS));
    settings.setEnabled(false);
View Full Code Here

      msg = mLocalizer.msg("chooseSearchFieldHelp",
        "Please select the fields to search for");
      main.add(UiUtilities.createHelpTextArea(msg + "\n"), BorderLayout.NORTH);

      mSelectableItemList = new SelectableItemList(selectedTypeArr,getSearchableFieldTypes());
      main.add(mSelectableItemList, BorderLayout.CENTER);

      JPanel buttonPn = new JPanel(new FlowLayout(FlowLayout.TRAILING));
      main.add(buttonPn, BorderLayout.SOUTH);
View Full Code Here

    if(type == ORDER_CHOOSER) {
      mChannelOrderChooser = new OrderChooser(mResultChannelArr, Plugin.getPluginManager().getSubscribedChannels());
      mChannelItemList = null;
    }
    else {
      mChannelItemList = new SelectableItemList(mResultChannelArr, Plugin.getPluginManager().getSubscribedChannels());
      mChannelOrderChooser = null;
    }

    int pos = 1;
    layout.appendRow(RowSpec.decode("fill:default:grow"));
View Full Code Here

        if(tempIf.getId().compareTo(caller.getId()) != 0) {
          list.add(tempIf);
        }
      }

      mPluginItemList = new SelectableItemList(mResultPluginArr,
          list.toArray(), disabledList.toArray());
    } else {
      mPluginItemList = new SelectableItemList(mResultPluginArr,
          tempProgramReceiveIf, disabledList.toArray());
    }

    mPluginItemList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    int pos = 1;
    layout.appendRow(RowSpec.decode("fill:default:grow"));
    layout.appendRow(RowSpec.decode("3dlu"));

    if (targetTable != null) {
      JSplitPane splitPane = new JSplitPane();

      splitPane.setLeftComponent(mPluginItemList);

      final JPanel targetPanel = new JPanel();
      targetPanel.setLayout(new BorderLayout());

      // JScrollPane targetScrollPane = new JScrollPane(mTargetPanel);
      // targetScrollPane.getVerticalScrollBar().setUnitIncrement(10);

      mPluginItemList.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
          try {
            if (!e.getValueIsAdjusting()) {
              targetPanel.removeAll();
              SelectableItem pluginItem = (SelectableItem) mPluginItemList
                  .getSelectedValue();

              final ProgramReceiveIf plugin = (ProgramReceiveIf) pluginItem
                  .getItem();
              mCurrentTargets = plugin.getProgramReceiveTargets();

              if (mCurrentTargets != null) {
                Arrays.sort(mCurrentTargets);
                ArrayList<ProgramReceiveTarget> targets = mReceiveTargetTable
                    .get(plugin);
                if (targets == null || !pluginItem.isSelected()) {
                  targets = new ArrayList<ProgramReceiveTarget>();
                }
                if (pluginItem.isSelected() && targets.isEmpty()) {
                  targets.add(mCurrentTargets[0]);
                }
                mReceiveTargetTable.put(plugin, targets);
                final SelectableItemList targetList = new SelectableItemList(
                    targets.toArray(), mCurrentTargets, disabledReceiveTargets);
                targetPanel.add(targetList, BorderLayout.CENTER);
                targetList
                    .addListSelectionListener(new ListSelectionListener() {

                      @Override
                      public void valueChanged(ListSelectionEvent listEvent) {
                        if (!listEvent.getValueIsAdjusting()) {
                          SelectableItem currPluginItem = (SelectableItem) mPluginItemList
                              .getSelectedValue();
                          ProgramReceiveIf currPlugin = (ProgramReceiveIf) currPluginItem
                              .getItem();
                          Object[] sel = targetList.getSelection();
                          ArrayList<ProgramReceiveTarget> selTargets = new ArrayList<ProgramReceiveTarget>(
                              sel.length);
                          for (Object obj : sel) {
                            selTargets.add((ProgramReceiveTarget) obj);
                          }
View Full Code Here

TOP

Related Classes of util.ui.customizableitems.SelectableItemList

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.