Tabnine Logo
com.google.gwt.user.client.ui
Code IndexAdd Tabnine to your IDE (free)

How to use com.google.gwt.user.client.ui

Best Java code snippets using com.google.gwt.user.client.ui (Showing top 20 results out of 1,746)

origin: stackoverflow.com

 var img = new Image();
img.onload = function() {
 alert(this.width + 'x' + this.height);
}
img.src = 'http://www.google.com/intl/en_ALL/images/logo.gif';
origin: libgdx/libgdx

/**
 * Override this method to return a custom widget informing the that their browser lacks support of WebGL.
 *
 * @return Widget to display when WebGL is not supported.
 */
public Widget getNoWebGLSupportWidget() {
  return new Label("Sorry, your browser doesn't seem to support WebGL");
}
origin: stackoverflow.com

 // ...
@FXML private Label lblData;
// ...
public void updatePage(String data){
  lblData.setText(data);
}
// ...
origin: libgdx/libgdx

public PreloaderCallback getPreloaderCallback () {
  final Panel preloaderPanel = new VerticalPanel();
  preloaderPanel.setStyleName("gdx-preloader");
  final Image logo = new Image(GWT.getModuleBaseURL() + "logo.png");
  logo.setStyleName("logo");		
  preloaderPanel.add(logo);
  final Panel meterPanel = new SimplePanel();
  meterPanel.setStyleName("gdx-meter");
  meterPanel.addStyleName("red");
  final InlineHTML meter = new InlineHTML();
  final Style meterStyle = meter.getElement().getStyle();
  meterStyle.setWidth(0, Unit.PCT);
  meterPanel.add(meter);
  preloaderPanel.add(meterPanel);
  getRootPanel().add(preloaderPanel);
  return new PreloaderCallback() {
    @Override
    public void error (String file) {
      System.out.println("error: " + file);
    }
    
    @Override
    public void update (PreloaderState state) {
      meterStyle.setWidth(100f * state.getProgress(), Unit.PCT);
    }            
    
  };
}
origin: stackoverflow.com

 IsWidget child; // Any widget
HorizontalPanel panel = new HorizontalPanel();
FocusPanel clickBox = new FocusPanel();

clickBox.add(child);
panel.add(clickBox);

clickBox.addClickHandler(...);
origin: kaaproject/kaa

@Override
protected void initDetailsTable() {
 detailsTable.getColumnFormatter().setWidth(0, "200px");
 detailsTable.getColumnFormatter().setWidth(1, "500px");
 int row = initDetailsTableImpl();
 recordPanel = createRecordPanel();
 detailsTable.setWidget(++row, 0, recordPanel);
 detailsTable.getFlexCellFormatter().setColSpan(row, 0, 2);
}
origin: libgdx/libgdx

private void checkLogLabel () {
  if (log == null) {
    ((GwtApplication)Gdx.app).log = log = new TextArea();
    // It's possible that log functions are called
    // before the app is initialized. E.g. SoundManager can call log functions before the app is initialized.
    // Since graphics is null, we're getting errors. The log size will be updated later, in case graphics was null
    if (Gdx.graphics != null) {
      log.setSize(Gdx.graphics.getWidth() + "px", "200px");
    } else {
      log.setSize("400px", "200px"); // Dummy value
    }
    log.setReadOnly(true);
    ((GwtApplication)Gdx.app).getRootPanel().add(log);
  }
}
origin: kaaproject/kaa

@Override
public void setProfileFiltersVisible(boolean visible) {
 profileFiltersLabel.setVisible(visible);
 includeDeprecatedProfileFilters.setVisible(visible);
 profileFiltersGrid.setVisible(visible);
 addProfileFilterButton.setVisible(visible);
}
origin: libgdx/libgdx

private void updateLogLabelSize () {
  if (log != null) {
    if (graphics != null) {
      log.setSize(graphics.getWidth() + "px", "200px");
    } else {
      log.setSize("400px", "200px"); // Should not happen at this point, use dummy value
    }
  }
}
origin: libgdx/libgdx

public PreloaderCallback getPreloaderCallback () {
  final Panel preloaderPanel = new VerticalPanel();
  preloaderPanel.setStyleName("gdx-preloader");
  final Image logo = new Image(GWT.getModuleBaseURL() + "logo.png");
  logo.setStyleName("logo");		
  preloaderPanel.add(logo);
  final Panel meterPanel = new SimplePanel();
  meterPanel.setStyleName("gdx-meter");
  meterPanel.addStyleName("red");
  final InlineHTML meter = new InlineHTML();
  final Style meterStyle = meter.getElement().getStyle();
  meterStyle.setWidth(0, Unit.PCT);
  meterPanel.add(meter);
  preloaderPanel.add(meterPanel);
  getRootPanel().add(preloaderPanel);
  return new PreloaderCallback() {
    @Override
    public void error (String file) {
      System.out.println("error: " + file);
    }
    
    @Override
    public void update (PreloaderState state) {
      meterStyle.setWidth(100f * state.getProgress(), Unit.PCT);
    }            
    
  };
}
origin: stackoverflow.com

 var element = new Image();
Object.defineProperty(element, 'id', {
 get: function () {
  /* TODO */
  alert('囧');
 }
});
console.log('%cHello', element);
origin: libgdx/libgdx

/**
 * Override this method to return a custom widget informing the that their browser lacks support of WebGL.
 *
 * @return Widget to display when WebGL is not supported.
 */
public Widget getNoWebGLSupportWidget() {
  return new Label("Sorry, your browser doesn't seem to support WebGL");
}
origin: libgdx/libgdx

private void checkLogLabel () {
  if (log == null) {
    ((GwtApplication)Gdx.app).log = log = new TextArea();
    // It's possible that log functions are called
    // before the app is initialized. E.g. SoundManager can call log functions before the app is initialized.
    // Since graphics is null, we're getting errors. The log size will be updated later, in case graphics was null
    if (Gdx.graphics != null) {
      log.setSize(Gdx.graphics.getWidth() + "px", "200px");
    } else {
      log.setSize("400px", "200px"); // Dummy value
    }
    log.setReadOnly(true);
    ((GwtApplication)Gdx.app).getRootPanel().add(log);
  }
}
origin: libgdx/libgdx

private void updateLogLabelSize () {
  if (log != null) {
    if (graphics != null) {
      log.setSize(graphics.getWidth() + "px", "200px");
    } else {
      log.setSize("400px", "200px"); // Should not happen at this point, use dummy value
    }
  }
}
origin: stackoverflow.com

 var img = new Image();

img.onload = function(){
 var height = img.height;
 var width = img.width;

 // code here to use the dimensions
}

img.src = url;
origin: stackoverflow.com

 var img = new Image();
img.onload = function () {
  alert("image is loaded");
}
img.src = "img.jpg";
origin: stackoverflow.com

 var img = new Image();
// 'load' event
$(img).on('load', function() {
 alert("image is loaded");
});
img.src = "img.jpg";
origin: stackoverflow.com

 var i = new Image(); 

i.onload = function(){
 alert( i.width+", "+i.height );
};

i.src = imageData;
origin: stackoverflow.com

 var img = new Image(),
  $canvas = $("<canvas>"), // create an offscreen canvas
  canvas = $canvas[0],
  context = canvas.getContext("2d");

img.onload = function () {
  context.drawImage(this, 0, 0); // put the image in the canvas
  removeBlanks(this.width, this.height);
};

// test image
img.src = 'http://images.productserve.com/preview/1302/218680281.jpg';
origin: stackoverflow.com

 var img = new Image();
var div = document.getElementById('foo');

img.onload = function() {
 div.appendChild(img);
};

img.src = 'path/to/image.jpg';
com.google.gwt.user.client.ui

Most used classes

  • Widget
    The base class for the majority of user-interface objects. Widget adds support for receiving events
  • FlowPanel
    A panel that formats its child widgets using the default HTML layout behavior.[doc-files/FlowPanel.p
  • Label
    A widget that contains arbitrary text, not interpreted as HTML. This widget uses a
    element, ca
  • RootPanel
    The panel to which all other widgets must ultimately be added. RootPanels are never created directly
  • Image
    A widget that displays the image at a given URL. The image can be in 'unclipped' mode (the default)
  • SimplePanel,
  • VerticalPanel,
  • HorizontalPanel,
  • TextBox,
  • Button,
  • ListBox,
  • Panel,
  • HTMLPanel,
  • IsWidget,
  • ScrollPanel,
  • Anchor,
  • Composite,
  • FlexTable,
  • TextArea
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now