Examples of TabConfiguration


Examples of edu.stanford.bmir.protege.web.client.rpc.data.layout.TabConfiguration

        }

        public AbstractTab createTab() {
            final Project project = getProject();
            UserDefinedTab userDefinedTab = new UserDefinedTab(project);
            TabConfiguration userDefinedTabConfiguration = getUserDefinedTabConfiguration();
            project.getLayoutManager().setupTab(userDefinedTab, userDefinedTabConfiguration);
            project.getProjectLayoutConfiguration().addTab(userDefinedTabConfiguration);
            return userDefinedTab;
        }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.rpc.data.layout.TabConfiguration

            project.getProjectLayoutConfiguration().addTab(userDefinedTabConfiguration);
            return userDefinedTab;
        }

        private TabConfiguration getUserDefinedTabConfiguration() {
            TabConfiguration tabConfiguration = new TabConfiguration();
            tabConfiguration.setLabel(labelTextField.getValueAsString().trim());
            List<TabColumnConfiguration> tabColConf = new ArrayList<TabColumnConfiguration>(colNo);
            // TabColumnConfiguration[] tabColConf = new
            // TabColumnConfiguration[colNo];
            for (int i = 0; i < colNo; i++) {
                TabColumnConfiguration tabCol = new TabColumnConfiguration();
                String widthStr = colTextFields[i].getValueAsString();
                int width = 0;
                try {
                    width = Integer.parseInt(widthStr);
                } catch (NumberFormatException e) {
                }
                // tabColConf[i].setWidth(width == 0 ? 0 : 1/width);
                tabCol.setWidth(width == 0 ? 0 : (float) width / 100);
                tabColConf.add(tabCol);
            }
            tabConfiguration.setColumns(tabColConf);
            tabConfiguration.setName(UserDefinedTab.class.getName());
            return tabConfiguration;
        }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.rpc.data.layout.TabConfiguration

    portletConfiguration.setWidth(((Portlet)portlet).getWidth());
    return portletConfiguration;
  }
 
  public void removeTab(AbstractTab tab) {
    TabConfiguration tabConfig = tab.getTabConfiguration();
    if (tabConfig == null) { return; }
    project.getProjectLayoutConfiguration().removeTab(tabConfig);
  }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.rpc.data.layout.TabConfiguration

     * </p>
     *
     * @return the default configuration of this tab
     */
    public TabConfiguration getDefaultTabConfiguration() {
        final TabConfiguration tabConfiguration = new TabConfiguration();
        final List<TabColumnConfiguration> colList = new ArrayList<TabColumnConfiguration>();
        final TabColumnConfiguration column = new TabColumnConfiguration();
        column.setWidth((float) 1.0);
        colList.add(column);
        tabConfiguration.setColumns(colList);
        tabConfiguration.setName(this.getClass().getName());
        return tabConfiguration;
    }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.rpc.data.layout.TabConfiguration

  }

  @Override
  public void setup() { 
    super.setup();
    TabConfiguration tabConfiguration = getTabConfiguration();
    if (tabConfiguration == null) { return; }
    EntityPortlet controllingPortlet = getControllingPortlet();
    if (controllingPortlet == null) { //TODO: just a fix until we can set from the UI the controlling portlet
      try {
        String firstPortlet = tabConfiguration.getColumns().iterator().next().getPortlets().iterator().next().getName();
        setControllingPortlet(getPortletByClassName(firstPortlet));
      } catch (Exception e) { } //FIXME
    }
  }
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.