當前位置: 首頁>>代碼示例>>Java>>正文


Java FlexTable.setCellSpacing方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.FlexTable.setCellSpacing方法的典型用法代碼示例。如果您正苦於以下問題:Java FlexTable.setCellSpacing方法的具體用法?Java FlexTable.setCellSpacing怎麽用?Java FlexTable.setCellSpacing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.FlexTable的用法示例。


在下文中一共展示了FlexTable.setCellSpacing方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: bind

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
/**
 * Processing to be done on load of this presenter.
 */
@Override
public void bind() {
    if (controller.getSelectedPlugin() != null) {
        this.dataTable = view.getViewTable();
        viewTable = new FlexTable();
        viewTable.setWidth("80%");
        viewTable.setCellSpacing(0);
        viewTable.getColumnFormatter().setWidth(0, "40%");
        viewTable.getColumnFormatter().setWidth(1, "1%");
        viewTable.getColumnFormatter().setWidth(2, "59%");
        dataTable.setWidget(0, 0, viewTable);
        dataTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
        setProperties();
        if (controller.getSelectedPlugin().getPlugin().getPluginName().equalsIgnoreCase(PluginNameConstants.CMIS_EXPORT_PLUGIN)) {
            view.getTestCMIS().setVisible(Boolean.TRUE);
        } else {
            view.getTestCMIS().setVisible(Boolean.FALSE);
        }
        enableCMISGetTokenButton();
    }
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:25,代碼來源:PluginDetailPresenter.java

示例2: bind

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
/**
 * Processing to be done on load of this presenter.
 */
@Override
public void bind() {
    if (controller.getSelectedPlugin() != null) {
        this.dataTable = view.getViewTable();
        viewTable = new FlexTable();
        viewTable.setWidth("100%");
        viewTable.setCellSpacing(0);
        viewTable.getColumnFormatter().setWidth(0, "10%");
        viewTable.getColumnFormatter().setWidth(1, "1%");
        viewTable.getColumnFormatter().setWidth(2, "70%");
        viewTable.getFlexCellFormatter().addStyleName(0, 0, "topBorder");
        viewTable.getFlexCellFormatter().addStyleName(0, 1, "topBorder");
        viewTable.getFlexCellFormatter().addStyleName(0, 2, "topBorder");
        dataTable.setWidget(0, 0, viewTable);
        dataTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
        setProperties();
    }
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:22,代碼來源:PluginDataPresenter.java

示例3: createLoadCatalogsContent

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
private Widget createLoadCatalogsContent() {
    SimpleInputField field = SimpleInputField.createByProp(_prop.makeBase("upload"));
    _uploadField= (FileUploadField)field.getField();
    _uploadField.setUploadType("TABLE");

    HTML text = GwtUtil.makeFaddedHelp("Custom catalog in IPAC table format  ");

    Label pad = new Label(" ");
    pad.setHeight("400px");

    FlexTable grid = new FlexTable();
    grid.setCellSpacing(5);
    DOM.setStyleAttribute(grid.getElement(), "padding", "5px");
    grid.setWidget(0, 0, field);
    grid.setWidget(1, 0, text);

    return grid;
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:19,代碼來源:LoadCatalogSearchUI.java

示例4: SamplePatternView

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
/**
 * Constructor.
 */
public SamplePatternView() {
    super();
    initWidget(BINDER.createAndBindUi(this));
    scrollPanel.setSize("490px", "495px");
    samplePatternTable = new FlexTable();
    samplePatternTable.setWidth("490px");
    samplePatternTable.setCellSpacing(0);
    samplePatternTable.addStyleName(AdminConstants.BORDER_RESULT_TABLE);
    backButton.setText(AdminConstants.CLOSE_BUTTON);
    patternListPanel.add(samplePatternTable);
    backButton.setFocus(true);
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:16,代碼來源:SamplePatternView.java

示例5: KVExtractionTestResultView

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
/**
 * Constructor.
 */
public KVExtractionTestResultView() {
    super();
    initWidget(BINDER.createAndBindUi(this));

    scrollPanel.setSize("500px", "300px");

    resultTable = new FlexTable();
    resultTable.setWidth("100%");
    resultTable.setCellSpacing(0);
    resultTable.addStyleName("border-result-table");
    backButton.setText(AdminConstants.CLOSE_BUTTON);
    kvExtractionListPanel.add(resultTable);
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:17,代碼來源:KVExtractionTestResultView.java

示例6: TableTestResultView

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
/**
 * Constructor.
 */
public TableTestResultView() {
    super();
    initWidget(BINDER.createAndBindUi(this));

    scrollPanel.setSize("500px", "300px");

    resultTable = new FlexTable();
    resultTable.setWidth("100%");
    resultTable.setCellSpacing(0);
    resultTable.addStyleName("border-result-table");
    backButton.setText(AdminConstants.CLOSE_BUTTON);
    tableListPanel.add(resultTable);
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:17,代碼來源:TableTestResultView.java

示例7: initModule

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
@Override
public void initModule(Element element) {
    FlexTable table = new FlexTable();
    table.setStyleName(styleNames.QP_TABLE_TABLE());

    Map<String, String> styles = styleSocket.getStyles(element);

    if (styles.containsKey(EMPIRIA_TABLE_CELLPADDING)) {
        int padding = NumberUtils.tryParseInt(styles.get(EMPIRIA_TABLE_CELLPADDING), -1);
        if (padding != -1) {
            table.setCellPadding(padding);
        }
    }

    if (styles.containsKey(EMPIRIA_TABLE_CELLSPACING)) {
        int spacing = NumberUtils.tryParseInt(styles.get(EMPIRIA_TABLE_CELLSPACING), -1);
        if (spacing != -1) {
            table.setCellSpacing(spacing);
        }
    }

    NodeList trNodes = element.getElementsByTagName("tr");
    for (int r = 0; r < trNodes.getLength(); r++) {
        NodeList tdNodes = ((Element) trNodes.item(r)).getElementsByTagName("td");
        for (int d = 0; d < tdNodes.getLength(); d++) {
            Panel dPanel = new FlowPanel();
            dPanel.setStyleName(styleNames.QP_TABLE_CELL());
            getBodyGenerator().generateBody(tdNodes.item(d), dPanel);
            table.setWidget(r, d, dPanel);

            int colspan = 1;
            if (tdNodes.item(d).getNodeType() == Node.ELEMENT_NODE && ((Element) tdNodes.item(d)).hasAttribute("colspan")) {
                colspan = NumberUtils.tryParseInt(((Element) tdNodes.item(d)).getAttribute("colspan"), 1);
            }
            if (colspan > 1) {
                table.getFlexCellFormatter().setColSpan(r, d, colspan);
            }

            int rowspan = 1;
            if (tdNodes.item(d).getNodeType() == Node.ELEMENT_NODE && ((Element) tdNodes.item(d)).hasAttribute("rowspan")) {
                rowspan = NumberUtils.tryParseInt(((Element) tdNodes.item(d)).getAttribute("rowspan"), 1);
            }
            if (rowspan > 1) {
                table.getFlexCellFormatter().setRowSpan(r, d, rowspan);
            }
        }
    }
    tablePanel.add(table);
}
 
開發者ID:YoungDigitalPlanet,項目名稱:empiria.player,代碼行數:50,代碼來源:TableModule.java

示例8: GridPanelComponent

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
public GridPanelComponent() {
    FlexTable grid = new FlexTable();
    grid.setCellPadding(0);
    grid.setCellSpacing(0);
    setPanelWidget(grid);
}
 
開發者ID:openremote,項目名稱:WebConsole,代碼行數:7,代碼來源:GridPanelComponent.java

示例9: buildPanel

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
@Override
    public void buildPanel() {
        csVPanel = new ViewerPanel();
        createPrimitives(csVPanel.getViewer().scene());
        applyColorMaterial(rectangle);

        commonMaterialLBox = new ListBox();
        commonMaterialLBox.addChangeHandler(new MChangeHandler());
        commonMaterialLBox.addItem("Select", "0");
        commonMaterialLBox.addItem("Color", "1");
        commonMaterialLBox.addItem("Image", "2");

        proceduralTexturesLBox = new ListBox();
        proceduralTexturesLBox.addChangeHandler(new MChangeHandler());
        proceduralTexturesLBox.addItem("Select", "0");
        proceduralTexturesLBox.addItem("Checkerboard", "1");
        proceduralTexturesLBox.addItem("Dot", "2");
        proceduralTexturesLBox.addItem("Grid", "3");
        proceduralTexturesLBox.addItem("Stripe", "4");

        baseMaterialsLBox = new ListBox();
        baseMaterialsLBox.addChangeHandler(new MChangeHandler());
        baseMaterialsLBox.addItem("Select", "0");
        baseMaterialsLBox.addItem("Alpha Map", "1");
        baseMaterialsLBox.addItem("Bump Map", "2");
        baseMaterialsLBox.addItem("Diffuse", "3");
        baseMaterialsLBox.addItem("Emission Map", "4");
        baseMaterialsLBox.addItem("Normal Map", "5");
        baseMaterialsLBox.addItem("Specular Map", "6");

        miscMaterialsLBox = new ListBox();
        miscMaterialsLBox.addChangeHandler(new MChangeHandler());
        miscMaterialsLBox.addItem("Select", "0");
        miscMaterialsLBox.addItem("Rim Lighting", "1");
        miscMaterialsLBox.addItem("Water", "2");

        exampleCompositeMaterialsLBox = new ListBox();
        exampleCompositeMaterialsLBox.addChangeHandler(new MChangeHandler());
        exampleCompositeMaterialsLBox.addItem("Select", "0");
        exampleCompositeMaterialsLBox.addItem("Composite Example", "1");

        polylineMaterialsLBox = new ListBox();
        polylineMaterialsLBox.addChangeHandler(new MChangeHandler());
        polylineMaterialsLBox.addItem("Select", "0");
        polylineMaterialsLBox.addItem("Polyline Arrow", "1");
        polylineMaterialsLBox.addItem("Polyline Glow", "2");
        polylineMaterialsLBox.addItem("Polyline Outline", "3");

        FlexTable flexTable = new FlexTable();
        flexTable.setCellSpacing(1);
        flexTable.setCellPadding(1);
        flexTable.setHTML(1, 0, "<font color=\"white\">Common materials</font>");
        flexTable.setWidget(1, 1, commonMaterialLBox);
        flexTable.setHTML(2, 0, "<font color=\"white\">Procedural textures</font>");
        flexTable.setWidget(2, 1, proceduralTexturesLBox);
        flexTable.setHTML(3, 0, "<font color=\"white\">Base materials</font>");
        flexTable.setWidget(3, 1, baseMaterialsLBox);
        flexTable.setHTML(4, 0, "<font color=\"white\">Misc materials</font>");
        flexTable.setWidget(4, 1, miscMaterialsLBox);
        flexTable.setHTML(5, 0, "<font color=\"white\">Example composite materials</font>");
        flexTable.setWidget(5, 1, exampleCompositeMaterialsLBox);
        flexTable.setHTML(6, 0, "<font color=\"white\">Polyline materials</font>");
        flexTable.setWidget(6, 1, polylineMaterialsLBox);
//
        AbsolutePanel aPanel = new AbsolutePanel();
        aPanel.add(csVPanel);
        aPanel.add(flexTable, 20, 20);

        contentPanel.add(new HTML("<p>Browse Cesium's built in materials and define new ones using the Fabric schema.</p>"));
        contentPanel.add(aPanel);

        initWidget(contentPanel);
    }
 
開發者ID:iSergio,項目名稱:gwt-cs,代碼行數:74,代碼來源:Materials.java

示例10: createTableView

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
private void createTableView(final Document document) {
    verticalPanel.clear();
    tableNameVsButtonMap.clear();
    List<DataTable> dataTablesList = null;
    selectedDocument = document;
    if (document.getDataTables() != null && document.getDataTables().getDataTable() != null) {
        dataTablesList = document.getDataTables().getDataTable();
    }

    if (dataTablesList == null || dataTablesList.isEmpty()) {
        TableExtractionView.this.fireEvent(new TableViewDisplayEvent(0));
    } else {
        TableExtractionView.this.fireEvent(new TableViewDisplayEvent(dataTablesList.size()));
        for (final DataTable dataTable : dataTablesList) {
            HeaderRow headerRow = dataTable.getHeaderRow();
            final Document doc = document;
            final Rows rows = dataTable.getRows();
            tableNameVsCheckBoxMap.put(dataTable.getName(), new ArrayList<CheckBox>());
            if (dataTable != null && headerRow != null && headerRow.getColumns() != null
                    && headerRow.getColumns().getColumn() != null && !headerRow.getColumns().getColumn().isEmpty()) {
                final List<Column> columnList = headerRow.getColumns().getColumn();
                final FlexTable flexTable = new FlexTable();
                selectedDataTableName = dataTable.getName();
                flexTable.setCellSpacing(0);
                flexTable.setBorderWidth(1);
                flexTable.setWidth("100%");
                addHeaderColumns(columnList, flexTable);
                flexTable.getRowFormatter().setStyleName(0, "header");
                setTableUI(flexTable, dataTable);
                // if (rows != null && rows.getRow() != null && !rows.getRow().isEmpty()) {
                if (rows != null && rows.getRow() != null) {
                    presenter.rpcService.getColumnRegexPattern(selectedDocument.getType(), dataTable.getName(),
                            new AsyncCallback<List<String>>() {

                                @Override
                                public void onSuccess(final List<String> listOfColumnPatterns) {
                                    columnPattern = listOfColumnPatterns;
                                    tableNameVsColumnPattern.put(dataTable.getName(), listOfColumnPatterns);
                                    createTableList(flexTable, rows.getRow(), columnList, dataTable, doc);
                                }

                                @Override
                                public void onFailure(final Throwable arg0) {
                                    final ConfirmationDialog confirmationDialog = ConfirmationDialogUtil.showConfirmationDialog(
                                            LocaleDictionary.get().getMessageValue(ReviewValidateMessages.REGEX_RETRIEVAL_FAIL),
                                            LocaleDictionary.get().getConstantValue(ReviewValidateConstants.REGEX_RETRIEVAL_FAIL),
                                            Boolean.TRUE);

                                    confirmationDialog.addDialogListener(new DialogListener() {

                                        @Override
                                        public void onOkClick() {
                                            confirmationDialog.hide();
                                            createTableList(flexTable, rows.getRow(), columnList, dataTable, doc);
                                        }

                                        @Override
                                        public void onCancelClick() {
                                            confirmationDialog.hide();
                                            presenter.setFocus();
                                        }
                                    });

                                }
                            });
                }
                tableNameVsViewMap.put(dataTable.getName(), flexTable);
            }
        }
    }
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:72,代碼來源:TableExtractionView.java

示例11: displayDetailsDialog

import com.google.gwt.user.client.ui.FlexTable; //導入方法依賴的package包/類
/**
 * Displays a Details dialog box.<br>
 * Renders a table with 2 columns: name and value pairs.
 * @param caption title of the dialog
 * @param values  values to be displayed; each element is an array (name-value pair) which defines a row
 */
public static void displayDetailsDialog( final String caption, final Object[][] values ) {
    final DialogBox dialogBox = new DialogBox( true );
    dialogBox.setText( caption );
    dialogBox.setGlassEnabled( true );
    
    final VerticalPanel content = new VerticalPanel();
    content.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
    
    final FlexTable table = new FlexTable();
    table.setBorderWidth( 1 );
    table.setCellSpacing( 0 );
    table.setCellPadding( 3 );
    
    
    final CellFormatter cellFormatter = table.getCellFormatter();
    for ( int i = 0; i < values.length; i++ ) {
        // Name
        table.setWidget( i, 0, new Label( values[ i ][ 0 ].toString() ) );
        cellFormatter.addStyleName( i, 0, "headerRow" );
        
        final Object value = values[ i ] [ 1 ];
        
        if ( value == null )
            table.setWidget( i, 1, new Label() );
        else if ( value instanceof Widget ) 
            table.setWidget( i, 1, (Widget) value );
        else if ( value instanceof Date )
            table.setWidget( i, 1, createTimestampWidget( (Date) value ) );
        else {
            String stringValue;
            if ( value instanceof String )
                stringValue = (String) value;
            else if ( value instanceof Number )
                stringValue = NUMBER_FORMAT   .format( (Number) value );
            else
                stringValue = value.toString();
            table.setWidget( i, 1, new Label( stringValue ) );
        }
        cellFormatter.addStyleName( i, 1, "row" + ( i & 0x01 ) );
        cellFormatter.setHorizontalAlignment( i, 1, HasHorizontalAlignment.ALIGN_LEFT );
    }
    
    content.add( table );
    
    content.add( createVerticalEmptyWidget( 8 ) );
    content.add( ClientUtils.createDialogCloseButton( dialogBox, "Close" ) );
    content.add( createVerticalEmptyWidget( 8 ) );
    
    dialogBox.setWidget( content );
    
    dialogBox.center();
}
 
開發者ID:icza,項目名稱:sc2gears,代碼行數:59,代碼來源:ClientUtils.java


注:本文中的com.google.gwt.user.client.ui.FlexTable.setCellSpacing方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。