Examples of ListSelectionDialog


Examples of de.netsysit.view.ListSelectionDialog

                    Object[] listnames = new Object[lists.size()];
                    for (int i = 0; i < lists.size(); i++) {
                        listnames[i] = lists.get(i);
                    }

                    ListSelectionDialog lsd = new ListSelectionDialog();
                    lsd.showDialog(listnames);
                    ReceiverListModel selection = (ReceiverListModel) lsd.getResult();

                    if (selection != null) {
                        app.addReceiverList(selection);
                    }
                } else if(PolicyUtilities.isShowWarnings()) {
View Full Code Here

Examples of name.abuchen.portfolio.ui.dialogs.ListSelectionDialog

        // remove already selected items
        for (DataSeries s : selectedSeries)
            list.remove(s);

        ListSelectionDialog dialog = new ListSelectionDialog(getShell(), new DataSeriesLabelProvider());
        dialog.setTitle(Messages.ChartSeriesPickerTitle);
        dialog.setMessage(Messages.ChartSeriesPickerTitle);
        dialog.setElements(list);

        if (dialog.open() != ListSelectionDialog.OK)
            return;

        Object[] result = dialog.getResult();
        if (result == null || result.length == 0)
            return;

        for (Object object : result)
        {
View Full Code Here

Examples of net.sf.apptools.ui.swing.utils.ListSelectionDialog

            if (fc.showDialog(panel, SwingUIMessages.getString("TemplateEditor.CAPTION_SELECT_SETTINGS_FILE")) == JFileChooser.APPROVE_OPTION) { //$NON-NLS-1$
              fields[PARAMS_FILE_NAME].setText(fc.getSelectedFile().getAbsolutePath());
            }
          }
          else if (src == buttons[TARGET]) {
            ListSelectionDialog d = new ListSelectionDialog(parent,SwingUIMessages.getString("TemplateEditor.TITLE_SELECT_TARGET_CLASS"),SwingUIMessages.getString("TemplateEditor.MESSAGE_SELECT_TARGET_CLASS"),null,classes[0],new PlugInRenderer("")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            d.setVisible(true);
            int result = d.getSelectedIndex();
            if (result >= 0) {
              fields[TARGET].setText(((Class<?>) classes[0].get(result)).getName());
            }
          }
          else if (src == buttons[CONVERTER]) {
            ListSelectionDialog d = new ListSelectionDialog(parent,SwingUIMessages.getString("TemplateEditor.TITLE_SELECT_CONVERTER"),SwingUIMessages.getString("TemplateEditor.MESSAGE_SELECT_CONVERTER"),null,classes[1],new PlugInRenderer("")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            d.setVisible(true);
            int result = d.getSelectedIndex();
            if (result >= 0) {
              fields[CONVERTER].setText(((Class<?>) classes[1].get(result)).getName());
            }
          }
          else if (src == buttons[FORMATTER]) {
            ListSelectionDialog d = new ListSelectionDialog(parent,SwingUIMessages.getString("TemplateEditor.TITLE_SELECT_FORMAT"),SwingUIMessages.getString("TemplateEditor.MESSAGE_SELECT_FORMAT"),null,classes[2],new PlugInRenderer("")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            d.setVisible(true);
            int result = d.getSelectedIndex();
            if (result >= 0) {
              fields[FORMATTER].setText(((Class<?>) classes[2].get(result)).getName());
            }
          }
          else if (src == buttons[DBINPUT]) {
            ListSelectionDialog d = new ListSelectionDialog(parent,SwingUIMessages.getString("TemplateEditor.TITLE_SELECT_DBBUILDER"),SwingUIMessages.getString("TemplateEditor.MESSAGE_SELECT_DBBUILDER"),null,classes[3],new PlugInRenderer("")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            d.setVisible(true);
            int result = d.getSelectedIndex();
            if (result >= 0) {
              fields[DBINPUT].setText(((Class<?>) classes[3].get(result)).getName());
            }
          }
View Full Code Here

Examples of org.eclipse.ui.dialogs.ListSelectionDialog

      chooseProjects();
    }
  }

  private void chooseProjects() {
    ListSelectionDialog dialog= new ListSelectionDialog(
        getShell(),
        getNotYetRequiredProjects(),
        ArrayContentProvider.getInstance(),
        new WorkbenchLabelProvider(),
        "message");
    dialog.setTitle("title");
    dialog.setHelpAvailable(false);
    if (dialog.open() != Window.OK) return;
    for (Object each: dialog.getResult()) fProjectListDialogField.addElement(each);
  }
View Full Code Here

Examples of org.eclipse.ui.dialogs.ListSelectionDialog

    editSuppButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        Set<ToolPlan> allPlans = ToolProjectSupport.getAllPlansForProject(model.getProject());
        Set<ToolPlan> supplierPlans = model.getSupplierPlansAsToolPlans();
        ListSelectionDialog supplierDialog = new ListSelectionDialog(getShell(),
            allPlans,
            new IStructuredContentProvider(){

          @Override
          public void dispose() {
           
          }

          @Override
          public void inputChanged(Viewer arg0, Object arg1,
              Object arg2) {
           
          }

         

          @Override
          public Object[] getElements(Object parent) {
            if (parent instanceof Set<?>){
              return ((Set<?>)parent).toArray();
            }
            return null;
          }

         
         
        },
        new LabelProvider(),
        "Select suppier plans from list");
        supplierDialog.setInitialSelections(supplierPlans.toArray());
        supplierDialog.setTitle("Supplier Plans");
        int act = supplierDialog.open();
        switch (act){
        case Dialog.OK:
          /*
           * 1. clear the existing suppliers,
           * 2. write the selected ones
           * 3. rewrite the prx file
           */
          Object[] sups = supplierDialog.getResult();
          model.clearSuppliers();
          for (Object elem : sups){
            String name = ((ToolPlan)elem).getToolName();
            model.addSupplierPlan(name);
          }
View Full Code Here

Examples of org.eclipse.ui.dialogs.ListSelectionDialog

        case ISaveablePart2.CANCEL: // cancel
          return false;
        }
            }
            else {
              ListSelectionDialog dlg = new ListSelectionDialog(
                      shellProvider.getShell(), modelsToSave,
                      new ArrayContentProvider(),
                      new WorkbenchPartLabelProvider(), RESOURCES_TO_SAVE_MESSAGE);
              dlg.setInitialSelections(modelsToSave.toArray());
              dlg.setTitle(SAVE_RESOURCES_TITLE);
 
              // this "if" statement aids in testing.
              if (SaveableHelper.testGetAutomatedResponse()==SaveableHelper.USER_RESPONSE) {
                int result = dlg.open();
                  //Just return false to prevent the operation continuing
                  if (result == IDialogConstants.CANCEL_ID) {
            return false;
          }
 
                  modelsToSave = Arrays.asList(dlg.getResult());
              }
            }
        }
        else {
          modelsToSave = convertToSaveables(dirtyParts, closing, addNonPartSources);
View Full Code Here

Examples of org.eclipse.ui.dialogs.ListSelectionDialog

public class CsvRemoveColumnHandler extends AbstractHandler {

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    ICsvService service = new CsvService();
    ListSelectionDialog dlg = new ListSelectionDialog(Display.getCurrent().getActiveShell(), service.getTableHeaders(event), new CsvContentProvider(), new LabelProvider(), "Select the columns to delete.");
    dlg.setTitle("Delete columns");
        if (dlg.open() == Window.OK) {
          service.deleteColumn(dlg.getResult(), event);
        }
    return null;
  }
View Full Code Here

Examples of org.eclipse.ui.dialogs.ListSelectionDialog

        return;
      }

    };
    iProjects = this.getIProjects();
    ListSelectionDialog listSelectionDialog = new ListSelectionDialog(new Shell(), "WOLips", structuredContentProvider, labelProvider, "Select the projects to install.");
    listSelectionDialog.setInitialSelections(iProjects);
    listSelectionDialog.open();
    if (listSelectionDialog.getReturnCode() == Window.CANCEL) {
      return;
    }
    Object[] selectionResult = listSelectionDialog.getResult();
    IProject[] projectsSelected = new IProject[selectionResult.length];
    for (int i = 0; i < selectionResult.length; i++) {
      projectsSelected[i] = (IProject) selectionResult[i];
    }
    ProjectOrder projectOrder = ResourcesPlugin.getWorkspace().computeProjectOrder(projectsSelected);
View Full Code Here

Examples of org.eclipse.ui.dialogs.ListSelectionDialog

        EODatabaseConfig activeDatabaseConfig = model.getActiveDatabaseConfig();
        ClassLoader eomodelClassLoader = IEOClassLoaderFactory.Utility.createClassLoader(model);
        IEOSQLReverseEngineer reverseEngineer = IEOSQLReverseEngineerFactory.Utility.reverseEngineerFactory().reverseEngineer(activeDatabaseConfig, eomodelClassLoader);
        List<String> tableNames = reverseEngineer.reverseEngineerTableNames();

        ListSelectionDialog dlg = new ListSelectionDialog(getWindow().getShell(), tableNames, new StringContentProvider(), new StringLabelProvider(), "Select the tables to reverse engineer:");
        dlg.setInitialSelections(tableNames.toArray());
        dlg.setTitle("Reverse Engineer");
        if (dlg.open() == Window.OK) {
          Object[] selectedTableNameObjs = dlg.getResult();
          String[] selectedTableNames = new String[selectedTableNameObjs.length];
          System.arraycopy(selectedTableNameObjs, 0, selectedTableNames, 0, selectedTableNameObjs.length);
          List<String> selectedTableNamesList = Arrays.asList(selectedTableNames);
          File reverseEngineeredEOModelFolder = reverseEngineer.reverseEngineerWithTableNamesIntoModel(selectedTableNamesList);
          Set<EOModelVerificationFailure> failures = new HashSet<EOModelVerificationFailure>();
View Full Code Here

Examples of org.eclipse.ui.dialogs.ListSelectionDialog

      } else updateStatus("You may select only one resource.");
    }
  }
 
  private void handleUmlModelBrowse() {
    ListSelectionDialog dialog =
      new ListSelectionDialog(getShell(),
          project,
          new IStructuredContentProvider() {

            @Override
            public Object[] getElements(Object inputElement) {
              if (inputElement instanceof ModelingProject) {
                ModelingProject prj = (ModelingProject)inputElement;
                return prj.getAllResources(UmlResource.class).values().toArray();
              }
             
              if (inputElement instanceof UmlResource) return new Object[0];
              return new Object[0];
            }

            @Override
            public void dispose() {
            }

            @Override
            public void inputChanged(Viewer viewer,Object oldInput, Object newInput) {
            }
          },
          new LabelProvider() {
            @Override
            public String getText(Object element) {
              if (element instanceof UmlResource) return ((UmlResource)element).getName();
              return null;
            }
          },
          "Select an UML model"
          );
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        if (result[0] instanceof UmlResource) {
          umlResource = (UmlResource) result[0];
          umlModelPathText.setText(umlResource.getLocation());
        } else updateStatus("Invalid resource selected.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.