Package com.data2semantics.yasgui.client.settings

Examples of com.data2semantics.yasgui.client.settings.TabSettings


    copy.setIcon(Imgs.COPY_TAB.get());
    copy.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(MenuItemClickEvent event) {
        int tabNumber = ((QueryTabs) getTabSet()).getTabNumber(getTabObject().getID());
        TabSettings tabSettings = (TabSettings) view.getSettings().getTabArray().get(tabNumber).clone();
        tabSettings.setTabTitle("Copy of " + tabSettings.getTabTitle());
        ((QueryTabs) getTabSet()).addTab(tabSettings, true);
        view.getSettings().addTabSettings(tabSettings);
      }
    });
View Full Code Here


   */
  private void setTabsFromSettings() {
    ArrayList<TabSettings> tabArray = view.getSettings().getTabArray();
    if (tabArray.size() == 0) {
      // Don't have anything yet. Just draw a new tab with default vals
      addTab(new TabSettings(view.getSettings()));
    } else {
      for (TabSettings tabSettings : tabArray) {
        addTab(tabSettings);
      }
    }
View Full Code Here

   
    addTabButton.setHeight(25);
    addTabButton.setZIndex(ZIndexes.TAB_CONTROLS);//Otherwise the onclick of the tab bar is used..
    addTabButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        TabSettings tabSettings = new TabSettings(view.getSettings());
        if (view.getSelectedTabSettings() != null) {
          //copy current selected endpoint, to the new tab
          tabSettings.setEndpoint(view.getSelectedTabSettings().getEndpoint());
        }
        view.getSettings().addTabSettings(tabSettings);
        view.getTabs().addTab(tabSettings, true);
        LocalStorageHelper.storeSettings(view.getSettings());
        view.getHistory().setHistoryCheckpoint();
View Full Code Here

        if (selectedTab != null) {
          queryTabs.removeTab(selectedTab, false, true);
        }
      }

      TabSettings tabSettings = new TabSettings(getSettings());
      tabSettings.setValuesFromUrlParams();

      getSettings().addTabSettings(tabSettings);
      getTabs().addTab(tabSettings, true);
      LocalStorageHelper.storeSettings(getSettings());
    }
View Full Code Here

   * This method is used relatively often, so for easier use put it here
   *
   * @return
   */
  public TabSettings getSelectedTabSettings() {
    TabSettings tabSettings = null;
    try {
      tabSettings = getSettings().getSelectedTabSettings();
    } catch (SettingsException e) {
      getErrorHelper().onError(e);
    }
View Full Code Here

    queryString = null;
    endpoint = null;
  }

  public void drawIfPossible() {
    TabSettings tabSettings = view.getSelectedTabSettings();
    if (view.getSelectedTabSettings().getQueryResultsString() != null) {
      endpoint = view.getSelectedTabSettings().getEndpoint();
      doDraw(tabSettings.getQueryResultsString(), tabSettings.getQueryResultsContentType());
    } else if (view.getHistory().getHistQueryResults(tabSettings.getEndpoint(), tabSettings.getQueryString()) != null) {
      HistQueryResults queryResults = view.getHistory().getHistQueryResults(tabSettings.getEndpoint(), tabSettings.getQueryString());
      endpoint = tabSettings.getEndpoint();
      doDraw(queryResults.getString(), queryResults.getContentType());
    } else {
      resetResultArea();
      resetVariables();
    }
View Full Code Here

TOP

Related Classes of com.data2semantics.yasgui.client.settings.TabSettings

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.