Codota Logo
WidthCalculator
Code IndexAdd Codota to your IDE (free)

How to use
WidthCalculator
in
org.kie.guvnor.commons.ui.client.widget

Best Java code snippets using org.kie.guvnor.commons.ui.client.widget.WidthCalculator (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.kie.guvnor/guvnor-commons-ui

/**
 * Get the widest Cell from a list of content
 * 
 * @param values
 * @return
 */
public int getMaximumElementWidth(List< ? extends V> values) {
  int maximumWidth = 0;
  for ( V value : values ) {
    int w = getElementWidth( value );
    if ( w > maximumWidth ) {
      maximumWidth = w;
    }
  }
  if ( minWidth == null ) {
    return maximumWidth;
  }
  return minWidth > maximumWidth ? minWidth : maximumWidth;
}
origin: org.kie.guvnor/guvnor-guided-dtable-editor-client

public ConversionMessageWidget( ConversionMessage message ) {
  initWidget( uiBinder.createAndBindUi( this ) );
  switch ( message.getMessageType() ) {
    case ERROR:
      this.image.setResource( Resources.INSTANCE.images().error() );
      break;
    case INFO:
      this.image.setResource( Resources.INSTANCE.images().information() );
      break;
    case WARNING:
      this.image.setResource( Resources.INSTANCE.images().warning() );
      break;
  }
  this.label.setText( message.getMessage() );
  //Make containing Panel the width of the content to ensure scrollbars operate correctly
  int width = widthCalculator.getElementWidth( message.getMessage() ) + 32;
  setWidth( width + "px" );
}
org.kie.guvnor.commons.ui.client.widgetWidthCalculator

Javadoc

A utility class to calculate the width of a Cell

Most used methods

  • getElementWidth
    Get the width of a single item

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • orElseThrow (Optional)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now