com.google.gwt.user.client.ui.InlineLabel Java Examples

The following examples show how to use com.google.gwt.user.client.ui.InlineLabel. 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: DropDownImageListEditorView.java    From dashbuilder with Apache License 2.0 6 votes vote down vote up
@UiConstructor
public DropDownImageListEditorView() {
    initWidget(Binder.BINDER.createAndBindUi(this));
    currentTypeImage = new Image();
    caret = new InlineLabel();
    caret.addStyleName( "caret" );
    caret.setVisible( true);

    dropDownAnchor.add( currentTypeImage );
    dropDownAnchor.add( caret );
    dropDownAnchor.setEnabled( true );

    currentTypeImageTooltip = new Tooltip(dropDown);
    currentTypeImageTooltip.setContainer("body");
    currentTypeImageTooltip.setShowDelayMs(100);
    currentTypeImage.addClickHandler(e -> currentTypeImageTooltip.hide());
    caret.addClickHandler(e -> currentTypeImageTooltip.hide());
    helpPanel.add(currentTypeImageTooltip);
}
 
Example #2
Source File: GpsEmulator.java    From android-gps-emulator with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize the Emulator UI
 */
private void initializeUI() {
   // Create textboxes and set default hostname and port
   _hostname = new TextBox();
   _hostname.setText(DEFAULT_HOST);
   _hostname.getElement().setPropertyString("placeholder", "hostname");
   _port = new TextBox();
   _port.setText(String.valueOf(DEFAULT_PORT));
   _port.getElement().setPropertyString("placeholder", "port");

   // Create button to connect
   _button = new Button("Connect");
   // Create the info/status label, initially not visible
   _info = new InlineLabel();
   _info.setVisible(false);

   // register the button action
   _button.addClickHandler(new ClickHandler() {
      public void onClick(final ClickEvent event) {
         final String hostname = _hostname.getText();
         final int port = Integer.valueOf(_port.getText());
         new PortAsyncCallback(hostname, port).execute();
      }
   });
   
   // Create panel for textbox, button and info label
   final FlowPanel div = new FlowPanel();
   div.setStylePrimaryName("emulator-controls");
   _hostname.setStyleName("emulator-hostname");
   _port.setStyleName("emulator-port");
   _button.setStyleName("emulator-connect");
   _info.setStyleName("emulator-info");
   div.add(_hostname);
   div.add(_port);
   div.add(_button);
   div.add(_info);

   // add the controls before the map so that the div doesn't cover the map
   RootLayoutPanel.get().add(div);
}
 
Example #3
Source File: GwtMockitoTest.java    From gwtmockito with Apache License 2.0 5 votes vote down vote up
@Test
public void shouldBeAbleToInstantiateLabels() {
  assertNotNull(new Label());
  assertNotNull(new HTML());
  assertNotNull(new InlineLabel());
  assertNotNull(new InlineHTML());
}
 
Example #4
Source File: SelectPatchStep.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
protected IsWidget body(final ApplyContext context) {
    FormPanel form = new FormPanel();
    FlowPanel panel = new FlowPanel();
    form.setWidget(panel);
    panel.add(new Label(Console.CONSTANTS.patch_manager_select_patch_body()));

    if (!context.standalone) {
        info = new HTML("");
        info.getElement().getStyle().setMarginTop(2, Style.Unit.EM);
        panel.add(info);
    }

    FlowPanel uploadPanel = new FlowPanel();
    uploadPanel.getElement().getStyle().setMarginTop(2, Style.Unit.EM);
    InlineLabel uploadLabel = new InlineLabel(Console.CONSTANTS.patch_manager_select_patch_upload());
    uploadLabel.getElement().getStyle().setMarginRight(1, Style.Unit.EM);
    uploadPanel.add(uploadLabel);
    context.fileUpload = new FileUpload();
    context.fileUpload.setName("patch_file");
    context.fileUpload.getElement().setId(asId(PREFIX, getClass(), "_Upload"));
    uploadPanel.add(context.fileUpload);
    panel.add(uploadPanel);

    errorMessages = new HTML(
            "<i class=\"icon-exclamation-sign\"></i> " + Console.CONSTANTS.patch_manager_select_file());
    errorMessages.addStyleName("error");
    errorMessages.setVisible(false);
    panel.add(errorMessages);

    return form;
}
 
Example #5
Source File: MockListView.java    From appinventor-extensions with Apache License 2.0 4 votes vote down vote up
private void createLabelItem(int i) {
  labelInItem =new InlineLabel(currentList[i]);
  labelInItem.setSize(ComponentConstants.LISTVIEW_PREFERRED_WIDTH + "px", "100%");
  MockComponentsUtil.setWidgetBackgroundColor(labelInItem, backgroundColor);
  MockComponentsUtil.setWidgetTextColor(labelInItem, textColor);
}
 
Example #6
Source File: AutoSizingTextBox.java    From gwt-traction with Apache License 2.0 4 votes vote down vote up
public AutoSizingTextBox(T box, int extraSize) {
super(box, new InlineLabel());
setExtraSize(extraSize);
   }
 
Example #7
Source File: DiagnosticsView.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public DiagnosticsView() {
    this.info = new InlineLabel();
}