本文整理汇总了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();
}
}
示例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();
}
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
}
}
示例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();
}