Java Code Examples for com.google.gwt.user.client.ui.HTML#setStylePrimaryName()

The following examples show how to use com.google.gwt.user.client.ui.HTML#setStylePrimaryName() . 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: MotdUi.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new output panel for MOTD.
 */
private MotdUi() {
  // Initialize UI
  text = new HTML();
  text.setSize("100%", "100%");
  text.setStylePrimaryName("ode-Motd");

  panel = new VerticalPanel();
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
Example 2
Source File: MessagesOutput.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new output panel for messages.
 */
private MessagesOutput() {
  // Initialize UI
  text = new HTML();
  text.setSize("100%", "100%");
  text.setStylePrimaryName("ode-MessagesOutput");

  panel = new VerticalPanel();
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
Example 3
Source File: VButtonValueRenderer.java    From vaadin-grid-util with MIT License 5 votes vote down vote up
/**
 * dirty hack - before we fire onClick we keep last clicked button because of the lost of RelativeElement during converting and the
 * issue of different layouts
 */
@Override
public FlowPanel createWidget() {
	FlowPanel buttonBar = GWT.create(FlowPanel.class);
	buttonBar.setStylePrimaryName("v-button-bar");

	int buttonsAdded = 0;
	if ((this.buttonBITM & VIEW_BITM) != 0) {
		buttonBar.add(genButton(VIEW_BITM));
		buttonsAdded++;
	}
	if ((this.buttonBITM & EDIT_BITM) != 0) {
		buttonBar.add(genButton(EDIT_BITM));
		buttonsAdded++;
	}
	if ((this.buttonBITM & DELETE_BITM) != 0) {
		buttonBar.add(genButton(DELETE_BITM));
		buttonsAdded++;
	}

	FlowPanel panel = GWT.create(FlowPanel.class);
	panel.setStylePrimaryName(STYLE_NAME);
	if (buttonsAdded == 3) {
		panel.addStyleName("three-buttons");
	} else if (buttonsAdded == 2) {
		panel.addStyleName("two-buttons");
	} else {
		panel.addStyleName("one-button");
	}
	panel.add(buttonBar);

	HTML valueLabel = GWT.create(HTML.class);
	valueLabel.setStylePrimaryName("v-cell-value");
	panel.add(valueLabel);
	return panel;
}