当前位置: 首页>>代码示例>>Java>>正文


Java Grid.setCellPadding方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.Grid.setCellPadding方法的典型用法代码示例。如果您正苦于以下问题:Java Grid.setCellPadding方法的具体用法?Java Grid.setCellPadding怎么用?Java Grid.setCellPadding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.Grid的用法示例。


在下文中一共展示了Grid.setCellPadding方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadLayoutStructure

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
private void loadLayoutStructure() {
	
	page = new VerticalPanel();
	mainView = new HorizontalPanel();
	leftPanel = new VerticalPanel();
	
	mainView.setStyleName("mainViewLayer");
	mainView.setWidth("100%");
	leftPanel.setStyleName("leftPanelLayer");
	leftPanel.setWidth("700px");
	page.setWidth("100%");
	
	Label title = new Label("Import configuration");
	title.setStyleName("title");
	
	//Main layout
	page.add(title);
	page.add(mainView);
	
	//Left layout
	mainView.add(leftPanel);
	grid = new Grid(1,2);
	grid.setCellPadding(5);
	leftPanel.add(grid);
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:26,代码来源:ConfigImportModule.java

示例2: ColourPickerTableView

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public ColourPickerTableView() {
    Grid grid = new Grid(50, 50);
    grid.setBorderWidth(0);
    grid.setCellPadding(0);
    grid.setCellSpacing(0);
    final double columnCount = grid.getColumnCount();
    final double rowCount = grid.getRowCount();
    for (int row = 0; row < rowCount; row++) {
        for (int column = 0; column < columnCount; column++) {
            final Element element = grid.getCellFormatter().getElement(row, column);
            final int rowValue = 255 - (int) (row / (rowCount - 1) * 255);
            final int columnValue = (int) (column / (columnCount - 1) * 255);
            final int colourValue = (int) (columnValue * (1 - row / (rowCount - 1)));
            element.setAttribute("style", "height:5px;width:5px;border:0px none;font-size:1px;color:#FFFFFF;background:rgb(" + colourValue + "," + rowValue + "," + rowValue + ")");
        }
    }
    add(grid);
}
 
开发者ID:languageininteraction,项目名称:GraphemeColourSynaesthesiaApp,代码行数:19,代码来源:ColourPickerTableView.java

示例3: buildBannerTable

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public HTMLTable buildBannerTable(final int rows, final int cols) {

	final Grid gridLayout = new Grid(rows, cols);
	gridLayout.addStyleName(ProjectView.STYLE_HEADER_BANNER_FLEX);
	gridLayout.setCellPadding(0);
	gridLayout.setCellSpacing(0);
	gridLayout.setWidth("100%");
	gridLayout.setHeight("100%");

	for (int i = 0; i < gridLayout.getColumnCount() - 1; i++) {
		gridLayout.getColumnFormatter().setWidth(i, "325px");
	}

	return gridLayout;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:20,代码来源:ProjectView.java

示例4: createProjectBannerPanel

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * Creates the project banner panel.
 *
 * @return The project banner panel.
 */
private Component createProjectBannerPanel() {

	// Main panel.
	projectBannerPanel = Panels.content(I18N.CONSTANTS.loading()); // Temporary title.

	// Main grid.
	projectBannerGrid = new Grid(1, 2);
	projectBannerGrid.addStyleName(STYLE_HEADER_BANNER);
	projectBannerGrid.setCellPadding(0);
	projectBannerGrid.setCellSpacing(0);
	projectBannerGrid.setWidth("100%");
	projectBannerGrid.setHeight("100%");

	// Logo cell style.
	projectBannerGrid.getCellFormatter().setStyleName(HEADER_BANNER_LOGO_CELL.left, HEADER_BANNER_LOGO_CELL.right, STYLE_HEADER_BANNER_LOGO);

	projectBannerPanel.add(projectBannerGrid);

	return projectBannerPanel;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:ProjectView.java

示例5: createOrgUnitBannerPanel

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * Creates the OrgUnit banner panel.
 * 
 * @return The OrgUnit banner panel.
 */
private Component createOrgUnitBannerPanel() {

	// Main panel.
	orgUnitBannerPanel = Panels.content(I18N.CONSTANTS.orgunit()); // Temporary title.

	// Main grid.
	orgUnitBannerGrid = new Grid(1, 2);
	orgUnitBannerGrid.addStyleName(ProjectView.STYLE_HEADER_BANNER);
	orgUnitBannerGrid.setCellPadding(0);
	orgUnitBannerGrid.setCellSpacing(0);
	orgUnitBannerGrid.setWidth("100%");
	orgUnitBannerGrid.setHeight("100%");

	// Logo cell.
	orgUnitBannerGrid.getCellFormatter().setStyleName(HEADER_BANNER_LOGO_CELL.left, HEADER_BANNER_LOGO_CELL.right, ProjectView.STYLE_HEADER_BANNER_LOGO);
	orgUnitBannerGrid.setWidget(HEADER_BANNER_LOGO_CELL.left, HEADER_BANNER_LOGO_CELL.right, OrgUnitImageBundle.ICONS.orgUnitLarge().createImage());

	orgUnitBannerPanel.add(orgUnitBannerGrid);

	return orgUnitBannerPanel;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:27,代码来源:OrgUnitView.java

示例6: buildStructure

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
private void buildStructure(Rendering rendering) {
    switch (rendering) {
        case HORIZONTAL:
            Grid g = new Grid(1, 2);
            g.setWidget(0, 0, tb);
            g.setWidget(0, 1, img);
            initWidget(g);

            g.setCellSpacing(0);
            g.setCellPadding(0);
            g.setBorderWidth(0);
            break;
        case VERTICAL:
        default:
            FlowPanel fp = new FlowPanel();
            fp.add(img);
            fp.add(tb);
            initWidget(fp);

            setPixelSize(150, 80);
            break;
    }
}
 
开发者ID:inepex,项目名称:ineform,代码行数:24,代码来源:CaptchaWidget.java

示例7: setProjectType

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void setProjectType(final ProjectModelType type) {

	final Grid iconGrid = new Grid(1, 2);
	iconGrid.setCellPadding(0);
	iconGrid.setCellSpacing(0);

	iconGrid.setWidget(0, 0, FundingIconProvider.getProjectTypeIcon(type, IconSize.MEDIUM).createImage());
	DOM.setStyleAttribute(iconGrid.getCellFormatter().getElement(0, 0), "paddingTop", "2px");
	iconGrid.setText(0, 1, ProjectModelType.getName(type));
	DOM.setStyleAttribute(iconGrid.getCellFormatter().getElement(0, 1), "paddingLeft", "5px");

	projectTypeField.setValue(iconGrid.getElement().getString());
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:18,代码来源:LinkedProjectView.java

示例8: MouseListBox

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
    * Used by {@link ListBoxDragController} to create a draggable listbox
    * containing the selected items.
    */
   MouseListBox(int size) {
grid = new Grid(size, 1);
initWidget(grid);
grid.setCellPadding(0);
grid.setCellSpacing(0);
addStyleName(CSS_DEMO_MOUSELISTBOX);
for (int i = 0; i < size; i++) {
    grid.getCellFormatter().addStyleName(i, 0, CSS_DEMO_DUAL_LIST_EXAMPLE_ITEM);
    setWidget(i, null);
}
   }
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:16,代码来源:MouseListBox.java

示例9: FormPanelComponent

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public FormPanelComponent() {
	Grid grid = new Grid(1,1);
	grid.setCellPadding(0);
	grid.setCellSpacing(0);
	setPanelWidget(grid);
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:7,代码来源:FormPanelComponent.java

示例10: ParagraphFindAndReplace

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public ParagraphFindAndReplace(Model mod) {
		model = mod;
		Grid grid = new Grid(2,3);
		grid.setCellPadding(3);
		grid.getColumnFormatter().setWidth(0,"1%");
		grid.getColumnFormatter().setWidth(1,"98%");
		grid.getColumnFormatter().setWidth(2,"1%");
		grid.setSize("100%", "100%");
		grid.setWidget(0, 0, new Label(appConstants.findReplaceFindText()));
		grid.setWidget(1, 0, new Label(appConstants.findReplaceReplaceText()));
		ClickHandler clickHandler = new ClickHandler() {
			public void onClick(ClickEvent event) {
				if (event.getSource()==find) {
					start();
				} else if (event.getSource()==replace) {
					startReplace();
				}
			}
		};
		findText = new TextBox();
		findText.setWidth("100%");
		grid.setWidget(0, 1, findText);
		replaceText = new TextBox();
		replaceText.setWidth("100%");
		grid.setWidget(1, 1, replaceText);
		find = new Button(appConstants.findReplaceFindButton(),clickHandler);
		grid.setWidget(0, 2, find);
		replace = new Button(appConstants.findReplaceReplaceButton(),clickHandler);
		grid.setWidget(1, 2, replace);
		replace.setEnabled(false);
		add(grid);
		setCellHeight(grid, "1%");
		setCellWidth(grid, "100%");
		
		HorizontalPanel panel = new HorizontalPanel();
		panel.setSize("100%", "100%");
		panel.setSpacing(2);
		caseCencetive = new CheckBox(appConstants.findReplaceCaseSencetive());
		panel.add(caseCencetive);
		panel.setCellWidth(caseCencetive, "1%");
//		wholeWord = new CheckBox(appConstants.findReplaceWholeWord());
//		panel.add(wholeWord);
//		panel.setCellWidth(wholeWord, "99%");
		add(panel);
		setCellHeight(panel, "1%");
		setCellWidth(panel, "100%");
		
		matches = new VerticalPanel();
		matches.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		matches.setStyleName("editor_panel");
		matches.setSpacing(2);
		matches.setSize("100%", "100%");
		scrollContainer = new ScrollContainer();
		scrollContainer.addStyleName(Styles.BORDER);
		scrollContainer.setScrollWidget(matches);
		add(scrollContainer);
		setCellHeight(scrollContainer, "99%");
		setCellWidth(scrollContainer, "100%");
		scrollContainer.resetHeight();
	}
 
开发者ID:Antokolos,项目名称:iambookmaster,代码行数:61,代码来源:ParagraphFindAndReplace.java

示例11: onInitialize

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * Initialize this example.
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
  // Create a static tree and a container to hold it
  Tree staticTree = createStaticTree();
  staticTree.setAnimationEnabled(true);
  staticTree.ensureDebugId("cwTree-staticTree");
  ScrollPanel staticTreeWrapper = new ScrollPanel(staticTree);
  staticTreeWrapper.ensureDebugId("cwTree-staticTree-Wrapper");
  staticTreeWrapper.setSize("300px", "300px");

  // Wrap the static tree in a DecoratorPanel
  DecoratorPanel staticDecorator = new DecoratorPanel();
  staticDecorator.setWidget(staticTreeWrapper);

  // Create a dynamically generated tree and a container to hold it
  final Tree dynamicTree = createDynamicTree();
  dynamicTree.ensureDebugId("cwTree-dynamicTree");
  ScrollPanel dynamicTreeWrapper = new ScrollPanel(dynamicTree);
  dynamicTreeWrapper.ensureDebugId("cwTree-dynamicTree-Wrapper");
  dynamicTreeWrapper.setSize("300px", "300px");

  // Wrap the dynamic tree in a DecoratorPanel
  DecoratorPanel dynamicDecorator = new DecoratorPanel();
  dynamicDecorator.setWidget(dynamicTreeWrapper);

  // Combine trees onto the page
  Grid grid = new Grid(2, 3);
  grid.setCellPadding(2);
  grid.getRowFormatter().setVerticalAlign(1, HasVerticalAlignment.ALIGN_TOP);
  grid.setHTML(0, 0, constants.cwTreeStaticLabel());
  grid.setHTML(0, 1, "&nbsp;&nbsp;&nbsp;");
  grid.setHTML(0, 2, constants.cwTreeDynamicLabel());
  grid.setWidget(1, 0, staticDecorator);
  grid.setHTML(1, 1, "&nbsp;&nbsp;&nbsp;");
  grid.setWidget(1, 2, dynamicDecorator);

  // Wrap the trees in DecoratorPanels
  return grid;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:44,代码来源:CwTree.java

示例12: Application

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * Constructor.
 */
public Application() {
  // Setup the main layout widget
  FlowPanel layout = new FlowPanel();
  initWidget(layout);

  // Setup the top panel with the title and links
  createTopPanel();
  layout.add(topPanel);

  // Add the main menu
  bottomPanel = new HorizontalPanel();
  bottomPanel.setWidth("100%");
  bottomPanel.setSpacing(0);
  bottomPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
  layout.add(bottomPanel);
  createMainMenu();
  bottomPanel.add(mainMenu);

  // Setup the content layout
  contentLayout = new Grid(2, 1);
  contentLayout.setCellPadding(0);
  contentLayout.setCellSpacing(0);
  contentDecorator = new DecoratorPanel();
  contentDecorator.setWidget(contentLayout);
  contentDecorator.addStyleName(DEFAULT_STYLE_NAME + "-content-decorator");
  bottomPanel.add(contentDecorator);
  if (LocaleInfo.getCurrentLocale().isRTL()) {
    bottomPanel.setCellHorizontalAlignment(contentDecorator,
        HasHorizontalAlignment.ALIGN_LEFT);
    contentDecorator.getElement().setAttribute("align", "LEFT");
  } else {
    bottomPanel.setCellHorizontalAlignment(contentDecorator,
        HasHorizontalAlignment.ALIGN_RIGHT);
    contentDecorator.getElement().setAttribute("align", "RIGHT");
  }
  CellFormatter formatter = contentLayout.getCellFormatter();
  formatter.setStyleName(0, 0, DEFAULT_STYLE_NAME + "-content-title");

  setContentTitle(new HTML("jCommerce Administation"));

  // Add the content wrapper
  contentWrapper = new SimplePanel();
  contentLayout.setWidget(1, 0, contentWrapper);
  formatter.setStyleName(1, 0, DEFAULT_STYLE_NAME + "-content-wrapper");
  setContent(null);
  
  rightButton.setVisible(false);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:52,代码来源:Application.java


注:本文中的com.google.gwt.user.client.ui.Grid.setCellPadding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。