Package org.apache.oodt.cas.workflow.gui.perspective.view

Examples of org.apache.oodt.cas.workflow.gui.perspective.view.ViewState


        List<ModelGraph> graphs = new Vector<ModelGraph>();
        for (ModelGraph graph : repo.getGraphs())
          if (graph.getModel().getFile().equals(file))
            graphs.add(graph);
        System.out.println(graphs);
        perspective.addState(new ViewState(file, null, graphs, repo
            .getGlobalConfigGroups()));
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here


      this.activeState = ((ViewChange.NEW_ACTIVE_STATE) change).getObject();
      this.refresh();
    } else if (change instanceof ViewChange.REFRESH_VIEW) {
      this.refresh();
    } else if (change instanceof ViewChange.STATE_NAME_CHANGE) {
      ViewState state = ((ViewChange.STATE_NAME_CHANGE) change).getObject();
      this.refresh();
    } else if (change instanceof ViewChange.VIEW_MODEL) {
      String modelId = ((ViewChange.VIEW_MODEL) change).getObject();
      for (ViewState state : this.stateViews.keySet()) {
        for (ModelGraph graph : state.getGraphs()) {
          ModelGraph found = graph.recursiveFindByModelId(modelId);
          if (found != null && !found.getModel().isRef()) {
            this.activeState = state;
            this.activeState.setSelected(found);
            break;
View Full Code Here

      return (View) this.tabbedPane.getSelectedComponent();
    }

    public void refresh() {
      if (this.getActiveView() != null) {
        ViewState viewState = null;
        if (this.state.getSelected() != null && findSelectedInTab) {
          TOP: for (Entry<View, ViewState> entry : this.mainViews.entrySet()) {
            for (ModelGraph graph : entry.getValue().getGraphs()) {
              ModelGraph found = graph.recursiveFindByModelId(this.state
                  .getSelected().getModel().getModelId());
              if (found != null && !found.getModel().isRef()) {
                viewState = entry.getValue();
                viewState.setSelected(found);
                this.tabbedPane.setSelectedComponent(entry.getKey());
                break TOP;
              }
            }
          }
View Full Code Here

    public void stateChangeNotify(ViewChange<?> change) {
      if (change instanceof ViewChange.NEW_VIEW) {
        this.addMainView(
            createMainView(((ViewChange.NEW_VIEW) change).getObject()
                .getModel().getModelId()),
            new ViewState(this.state.getFile(), null, Collections
                .singletonList(GuiUtils.find(this.state.getGraphs(),
                    ((ViewChange.NEW_VIEW) change).getObject().getModel()
                        .getId())), this.state.getGlobalConfigGroups()));
        this.refresh();
      }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.workflow.gui.perspective.view.ViewState

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.