Tabnine Logo
WidthCalculator
Code IndexAdd Tabnine 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)

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

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JButton (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Vim plugins
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