Package org.locationtech.udig.catalog.ui.workflow

Examples of org.locationtech.udig.catalog.ui.workflow.DataSourceSelectionState


    @Override
    protected Workflow createWorkflow() {
        // FIXME Andrea: Jody, this is the part that breaks DnD. Uncomment it to have it working
        // ResourceSearchState searchState = new ResourceSearchState();
        DataSourceSelectionState dsState = new DataSourceSelectionState(true);
        ResourceSelectionState rsState = new ResourceSelectionState();

        Workflow workflow = new Workflow(new State[]{dsState, rsState});
        // Workflow workflow = new Workflow(new State[] { searchState, rsState });
        return workflow;
View Full Code Here


     * in your workflow are covered by the {@link #createPageMapping()} method.
     *
     * @return workflow
     */
    protected Workflow createWorkflow() {
        DataSourceSelectionState state = new DataSourceSelectionState(false);
        Workflow workflow = new Workflow(new State[] { state });

        return workflow;
    }
View Full Code Here

   */
  public void createControl(Composite parent) {
    Composite comp = new Composite(parent, SWT.NONE);
        comp.setLayout(new FillLayout());
   
        DataSourceSelectionState state = (DataSourceSelectionState) getState();
        List<UDIGConnectionFactoryDescriptor> descriptorList;
        if (state.getShortlist() != null) {
            descriptorList = state.getShortlist();
        }
        else {
            descriptorList = getDescriptors();
        }
       
    viewer = new WizardViewer(comp, SWT.SINGLE | SWT.BORDER);
    viewer.setInput(descriptorList.toArray());
    viewer.addDoubleClickListener(new IDoubleClickListener() {
      public void doubleClick(DoubleClickEvent event) {
        IWizardContainer container = getContainer();
        if (container instanceof Dialog) {
          Dialog d = (Dialog) container;
          Button button = findButton(d.buttonBar,
              IDialogConstants.NEXT_ID);
          if (button != null)
            button.notifyListeners(SWT.Selection, new Event());
        }
      }
    });
    viewer.addSelectionChangedListener(this);

    // check the state for an initial selection
    if (state.getDescriptor() != null){
      viewer.setSelection(new StructuredSelection(state.getDescriptor()));
    }
    setControl(comp);
  }
View Full Code Here

      // change the page description + image
      setImageDescriptor(descriptor.getDescriptionImage(0));
      setMessage(descriptor.getDescription(0));

      // update the underlying state
      DataSourceSelectionState state = getState();
      state.setDescriptor(descriptor);
    }

    // update the container buttons
    getWizard().getContainer().updateButtons();
    }
View Full Code Here

  DataSourceSelectionPage page;

  @Before
  public void setUp() throws Exception {
    state = new DataSourceSelectionState(true);
    page = new DataSourceSelectionPage();

    Map<Class< ? extends State>, WorkflowWizardPageProvider> map = new HashMap<Class< ? extends State>, WorkflowWizardPageProvider>();
    map.put(state.getClass(), new BasicWorkflowWizardPageFactory(page));
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.ui.workflow.DataSourceSelectionState

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.