Package edu.stanford.bmir.protege.web.client.rpc.data.layout

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


            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


        return portlets;
    }

    public void addPortlet(final EntityPortlet portlet, final int column) {
        GWT.log("Adding portlet to tab: " + portlet.getClass().getName());
        final TabColumnConfiguration col = getTabColumnConfigurationAt(column);
        if (col == null) {
            GWT.log("Column does not exist: " + column, null);
            return;
        }
        final PortletConfiguration portletConfiguration = ((AbstractEntityPortlet) portlet).getPortletConfiguration();
View Full Code Here

            }
        }
    }

    public PortalColumn getPortalColumnAt(final int index) {
        final TabColumnConfiguration config = getTabColumnConfigurationAt(index);
        return config == null ? null : tabColumnConfigToColumn.get(config);
    }
View Full Code Here

        if (tabCols.size() < index) {
            return null;
        }
        int i = -1;
        for (final TabColumnConfiguration tabColumnConfiguration : tabCols) {
            final TabColumnConfiguration col = tabColumnConfiguration;
            i++;
            if (i == index) {
                return col;
            }
        }
View Full Code Here

     * @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

TOP

Related Classes of edu.stanford.bmir.protege.web.client.rpc.data.layout.TabColumnConfiguration

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.