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


Java Grid.setWidth方法代码示例

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


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

示例1: createGrid

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * Create a Grid that describes the job
 */
@SuppressWarnings("deprecation")
private Grid createGrid() {
	Grid grid = new Grid(2, 2);
	grid.setWidth("280px");
	grid.setWidget(0, 0, new Label(Constants.studioUIMsg.jobName()));
	/**
	 * Panel information
	 */

	namebox.setStyleName("boxstyle");
	grid.setWidget(0, 1, namebox);
	grid.setWidget(1, 0, new Label(Constants.studioUIMsg.jobDescription()));

	SubmitListener sl = new SubmitListener();
	namebox.addKeyboardListener(sl);

	descArea.setStyleName("boxstyle");
	descArea.setHeight("auto");
	grid.setWidget(1, 1, descArea);
	grid.setStyleName("bda-newjob-grid");
	return grid;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:26,代码来源:JobDescPopupPanel.java

示例2: initGridHead

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
protected void initGridHead(int size){
	this.setSpacing(3);
	paramsGrid = new Grid(size, 3);

	paramsGrid.setStyleName("gridstyle");
	paramsGrid.setBorderWidth(1);
	paramsGrid.setWidth("250px");
	Label nameLabel = new Label(Constants.studioUIMsg.parameter());
	nameLabel.setWidth("65px");
	paramsGrid.setWidget(0, 0, nameLabel);

	Label typeLabel = new Label(Constants.studioUIMsg.type());
	typeLabel.setWidth("40px");
	paramsGrid.setWidget(0, 1, typeLabel);

	Label valueLabel = new Label(Constants.studioUIMsg.value());
	paramsGrid.setWidget(0, 2, valueLabel);
	paramsGrid.setVisible(false);
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:20,代码来源:ParameterPanel.java

示例3: SimpleView

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public SimpleView() {
        headerPanel = new Grid(1, 3);
        headerPanel.setWidth("100%");
        headerPanel.setStylePrimaryName("headerPanel");
        footerPanel = new HorizontalPanel();
        borderedContentPanel = new VerticalPanel();
        borderedContentPanel.setStylePrimaryName("contentPanel");
        footerPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
        addNorth(headerPanel, 50);
//        addSouth(footerPanel, 50);
        scrollPanel = new ScrollPanel();
        borderedContentPanel.add(scrollPanel);
        borderedContentPanel.add(footerPanel);
        footerPanel.setVisible(false);
        add(borderedContentPanel);
    }
 
开发者ID:languageininteraction,项目名称:GraphemeColourSynaesthesiaApp,代码行数:17,代码来源:SimpleView.java

示例4: 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

示例5: 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

示例6: 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

示例7: SimpleView

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public SimpleView() {
        headerPanel = new Grid(1, 3);
        headerPanel.setWidth("100%");
        headerPanel.setStylePrimaryName("headerPanel");
        footerPanel = new HorizontalPanel();
        borderedContentPanel = new VerticalPanel();
        borderedContentPanel.setStylePrimaryName("contentPanel");
        footerPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
        addNorth(headerPanel, HEADER_SIZE);
//        addSouth(footerPanel, 50);
        scrollPanel = new ScrollPanel();
        borderedContentPanel.add(scrollPanel);
        borderedContentPanel.add(footerPanel);
        footerPanel.setVisible(false);
        add(borderedContentPanel);
    }
 
开发者ID:languageininteraction,项目名称:LanguageMemoryApp,代码行数:17,代码来源:SimpleView.java

示例8: ProjectList

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * Creates a new ProjectList
 */
public ProjectList() {
  projects = new ArrayList<Project>();
  selectedProjects = new ArrayList<Project>();
  projectWidgets = new HashMap<Project, ProjectWidgets>();

  sortField = SortField.DATE_MODIFIED;
  sortOrder = SortOrder.DESCENDING;

  // Initialize UI
  table = new Grid(1, 5); // The table initially contains just the header row.
  table.addStyleName("ode-ProjectTable");
  table.setWidth("100%");
  table.setCellSpacing(0);
  nameSortIndicator = new Label("");
  dateCreatedSortIndicator = new Label("");
  dateModifiedSortIndicator = new Label("");
  publishedSortIndicator = new Label("");
  refreshSortIndicators();
  setHeaderRow();

  VerticalPanel panel = new VerticalPanel();
  panel.setWidth("100%");

  panel.add(table);
  initWidget(panel);

  // It is important to listen to project manager events as soon as possible.
  Ode.getInstance().getProjectManager().addProjectManagerEventListener(this);

  gallery = GalleryClient.getInstance();
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:35,代码来源:ProjectList.java

示例9: SlideBar

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public SlideBar() {
	Element element = getElement();
	this.setWidth("100%");
	this.setHeight("100%");
	this.setStylePrimaryName(BAR_CLASS_NAME);
	DOM.setStyleAttribute(element, "overflow", "hidden");
	BrowserUtils.setStyleAttributeAllBrowsers(element, "boxSizing", "border-box");
	
	track = new Grid();

	track.setWidth("100%");
	track.setHeight("100%");
	track.setStylePrimaryName(TRACK_CLASS_NAME);

	BrowserUtils.setStyleAttributeAllBrowsers(track.getElement(), "boxSizing", "border-box");
	minTrack = new TrackMinMax();
	minTrack.setHeight("100%");
	minTrack.setWidth("100%");
	minTrack.setStylePrimaryName(TRACK_CLASS_NAME + "Min");
	BrowserUtils.setStyleAttributeAllBrowsers(minTrack.getElement(), "boxSizing", "border-box");
	maxTrack = new TrackMinMax();
	maxTrack.setHeight("100%");
	maxTrack.setWidth("100%");
	maxTrack.setStylePrimaryName(TRACK_CLASS_NAME + "Max");
	BrowserUtils.setStyleAttributeAllBrowsers(maxTrack.getElement(), "boxSizing", "border-box");
	
	this.add(track,0,0);
	
	if (!isPassive)
	{
		this.addStyleName(INTERACTIVE_CLASS_NAME);
	}
}
 
开发者ID:openremote,项目名称:WebConsole,代码行数:34,代码来源:SliderComponent.java

示例10: setContentTitle

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
 * Set the title of the content area.
 * 
 * @param title the content area title
 */
public void setContentTitle(Widget title) {
    Grid grid = new Grid(1, 2);
    grid.setWidth("100%");
    grid.setWidget(0, 0, title);
    HorizontalPanel p = new HorizontalPanel();
    p.setWidth("100%");
    p.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);  
    p.add(rightButton);
    grid.setWidget(0, 1, p);      
    contentLayout.setWidget(0, 0, grid);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:17,代码来源:Application.java

示例11: redraw

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public void redraw(IPhoneCanvas canvas) {
	canvas.clear();
	HashMap<String,InvVar> inv = core.getInvent();
	Grid grid = new Grid(inv.size()+1,2);
	grid.setWidth("100%");
	CellFormatter formatter = grid.getCellFormatter();
	IPhoneFlatButton button = new IPhoneFlatButton(core.getInventoryName());
	canvas.addClickHandler(button, inventoryHandler);
	grid.setWidget(0, 0, button);
	formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_CENTER);
	grid.getCellFormatter().setWidth(0, 0, "99%");
	int row=1;
	for (Entry<String,InvVar> entry : inv.entrySet()) {
		ClickHandler handler = new InventoryClickHandler(entry.getKey(),entry.getValue());
		button = new IPhoneFlatButton(entry.getKey());
		grid.setWidget(row, 0, button);
		canvas.addClickHandler(button, handler);
		formatter.setHorizontalAlignment(row, 0, HasHorizontalAlignment.ALIGN_LEFT);
		
		InvVar var = entry.getValue();
		String text;
		if (var.getType()==InvVar.FLOAT) {
			if (var.getFloat()==1.0) {
				text = "";
			} else {
				text = String.valueOf(var.getFloat());
			}
		} else if (var.getType()==InvVar.STRING) {
			text = var.getString();
		} else if (var.getInt()>1) {
			text= String.valueOf(var.getInt());
		} else {
			text = "";
		}
		grid.setWidget(row, 1, new Label(text,false));
		formatter.setHorizontalAlignment(row, 1, HasHorizontalAlignment.ALIGN_CENTER);
		row++;
	}
	canvas.add(grid);
	IPhoneButton iPhoneButton = new IPhoneButton("Назад");
	canvas.addClickHandler(iPhoneButton, backHandler);
	canvas.add(iPhoneButton);
	
	canvas.done();
}
 
开发者ID:Antokolos,项目名称:iambookmaster,代码行数:46,代码来源:IPhoneURQInventory.java

示例12: initialize

import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
@Override
public void initialize() {
	form = Forms.panel(130);
	
	// Location name field.
	locationNameField = Forms.text(I18N.CONSTANTS.location(), true);
	locationNameField.setName(SiteDTO.LOCATION_NAME);
	
	// Location axe field.
       locationAxeField = Forms.text(I18N.CONSTANTS.axeFieldLabel(), false);
	locationAxeField.setName(SiteDTO.LOCATION_AXE);
	
	// Admin levels.
	adminLevelBoxes = new ArrayList<ComboBox<AdminEntityDTO>>();
	
	// Map.
	mapPanel = Panels.content(null, new FitLayout());
	latitudeField = new CoordinateField(CoordinateField.Axis.LATITUDE);
	longitudeField = new CoordinateField(CoordinateField.Axis.LONGITUDE);
	
	worldMap = WorldMapFactory.createInstance();
	worldMap.setSize("100%", "300px");
	
	pin = new Pin(true);
	worldMap.addPin(pin);
	
	final ToolBar coordinateBar = new ToolBar();
	coordinateBar.add(new LabelToolItem(I18N.CONSTANTS.lat()));
	coordinateBar.add(latitudeField);
	coordinateBar.add(new LabelToolItem(I18N.CONSTANTS.lng()));
	coordinateBar.add(longitudeField);
	
	mapPanel.add(worldMap.asWidget());
	mapPanel.setBottomComponent(coordinateBar);
	
	// Save button.
	saveButton = Forms.button(I18N.CONSTANTS.save(), IconImageBundle.ICONS.save());
	
	// Cancel button.
	cancelButton = Forms.button(I18N.CONSTANTS.cancel(), IconImageBundle.ICONS.cancel());
	
	// Building form
	form.add(locationNameField, Forms.data());
	form.add(locationAxeField, Forms.data());
	
	final Grid mainContainer = new Grid(2, 2);
	mainContainer.setWidth("100%");
	mainContainer.getElement().getStyle().setTableLayout(Style.TableLayout.FIXED);
	mainContainer.getColumnFormatter().getElement(0).getStyle().setProperty("width", "50%");
	mainContainer.getColumnFormatter().getElement(1).getStyle().setProperty("width", "50%");
	mainContainer.getRowFormatter().setVerticalAlign(1, HasVerticalAlignment.ALIGN_TOP);

	mainContainer.setWidget(0, 0, Forms.label(I18N.CONSTANTS.locationTitle()));
	mainContainer.setWidget(0, 1, Forms.label(I18N.CONSTANTS.geoPosition()));
	mainContainer.setWidget(1, 0, form);
	mainContainer.setWidget(1, 1, mapPanel);
	getPopup().addButton(cancelButton);
	getPopup().addButton(saveButton);
	
	initPopup(mainContainer);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:62,代码来源:EditSiteView.java


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