Java Code Examples for com.google.gwt.user.client.ui.Label#setWidth()

The following examples show how to use com.google.gwt.user.client.ui.Label#setWidth() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ParameterPanel.java    From EasyML with Apache License 2.0 6 votes vote down vote up
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);
}
 
Example 2
Source File: ReportList.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor of ReportWidgets
 * @param report GalleryAppReport
 */
private ReportWidgets(final GalleryAppReport report) {

  reportTextLabel = new Label(report.getReportText());
  reportTextLabel.addStyleName("ode-ProjectNameLabel");
  reportTextLabel.setWordWrap(true);
  reportTextLabel.setWidth("200px");

  appLabel = new Label(report.getApp().getTitle());
  appLabel.addStyleName("primary-link");

  DateTimeFormat dateTimeFormat = DateTimeFormat.getMediumDateTimeFormat();
  Date dateCreated = new Date(report.getTimeStamp());
  dateCreatedLabel = new Label(dateTimeFormat.format(dateCreated));

  appAuthorlabel = new Label(report.getOffender().getUserName());
  appAuthorlabel.addStyleName("primary-link");

  reporterLabel = new Label(report.getReporter().getUserName());
  reporterLabel.addStyleName("primary-link");

  sendEmailButton = new Button(MESSAGES.buttonSendEmail());

  deactiveAppButton = new Button(MESSAGES.labelDeactivateApp());

  markAsResolvedButton = new Button(MESSAGES.labelmarkAsResolved());

  seeAllActions = new Button(MESSAGES.labelSeeAllActions());
}
 
Example 3
Source File: ClientUtils.java    From sc2gears with Apache License 2.0 4 votes vote down vote up
/**
 * Creates an empty widget with a fixed horizontal width.
 * @param width width of the widget to create
 * @return an empty widget with a fixed horizontal width
 */
public static Widget createHorizontalEmptyWidget( final int width ) {
	final Label l = new Label();
	l.setWidth( width + "px" );
	return l;
}