Package vg.core.request

Examples of vg.core.request.UIRequestCloseTab


            IUIRequestOwner bufOwner = request.getOwner();
            if(bufOwner != null) {
              bufOwner.callRequestOwner(new AUIRequest(EUIRequestType.PROCESS, null) {});
            }
            // execute query
            UIRequestCloseTab req = (UIRequestCloseTab)request;
            Set<Integer>tabSet = req.getTabSet();
            if(tabSet != null) {
              for(Integer buf : tabSet) {
                closeTab(buf);
              }
            }
            // call request owner method (OK REQUEST)
            if(bufOwner != null) {
              bufOwner.callRequestOwner(new AUIRequest(EUIRequestType.OK, null) {});
            }
            break;
          }
          case DEF_OPEN_SUB_GRAPH:
          {
            // call request owner method (PROCESS REQUEST)
            IUIRequestOwner bufOwner = request.getOwner();
            if(bufOwner != null) {
              bufOwner.callRequestOwner(new AUIRequest(EUIRequestType.PROCESS, null) {});
            }
            // execute query
            UIRequestOpenSubGraph req = (UIRequestOpenSubGraph)request;
            final IGraphView igv = req.getSubGraphView();
            SwingUtilities.invokeLater(new Runnable() {
              public void run() {
                if(igv != null) {
                  addTab(igv.getTitle(), igv);
                }         
              }
            });
            // call request owner method (OK REQUEST)
            if(bufOwner != null) {
              bufOwner.callRequestOwner(new AUIRequest(EUIRequestType.OK, null) {});
            }
            break;
          }
          case DEF_SELECT_TAB:
          {
            // call request owner method (PROCESS REQUEST)
            IUIRequestOwner bufOwner = request.getOwner();
            if(bufOwner != null) {
              bufOwner.callRequestOwner(new AUIRequest(EUIRequestType.PROCESS, null) {});
            }
            // execute query
            UIRequestSelectTab req = (UIRequestSelectTab)request;
            final Integer tabId = req.getTabId();
            // find tab
            SwingUtilities.invokeLater(new Runnable() {
              public void run() {
                tabs.setSelectedIndex(DesktopPanel.this.comTabIdAndTab.get(tabId));
              }
            });
            // call request owner method (OK REQUEST)
            if(bufOwner != null) {
              bufOwner.callRequestOwner(new AUIRequest(EUIRequestType.OK, null) {});
            }
            break;
          }
          case DEF_REPLACE_CURRENT_TAB:
          {
            // call request owner method (PROCESS REQUEST)
            IUIRequestOwner bufOwner = request.getOwner();
            if(bufOwner != null) {
              bufOwner.callRequestOwner(new AUIRequest(EUIRequestType.PROCESS, null) {});
            }
            // execute query
            UIRequestReplaceCurrentTab req = (UIRequestReplaceCurrentTab)request;
            int index = this.tabs.getSelectedIndex();
            if(index >= 0) {
              for(Integer buf : this.comTabIdAndTab.keySet()) {
                Integer value = this.comTabIdAndTab.get(buf);
                if(value != null && value.equals(index)) {
                  closeTab(buf);
                  IGraphView igv = req.getSubGraphView();
                  if(igv != null) {
                    addTab(igv.getTitle(), igv);
                  }
                  break;
                }
View Full Code Here


    this.userInterface.addRequest(req);
  }
  private void closeAllTab() {
    synchronized (this.tabSet) {
      Set<Integer> tmpTabSet = new HashSet<Integer>(this.tabSet);
      UIRequestCloseTab req = new UIRequestCloseTab(this.owner, tmpTabSet);
      this.userInterface.addRequest(req);     
    }
  }
View Full Code Here

TOP

Related Classes of vg.core.request.UIRequestCloseTab

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.