Tabnine Logo
SDimension.extractUnit
Code IndexAdd Tabnine to your IDE (free)

How to use
extractUnit
method
in
org.wings.SDimension

Best Java code snippets using org.wings.SDimension.extractUnit (Showing top 2 results out of 315)

origin: io.github.dheid/wings

/**
 * Sets the preferred height via an string. Expects an dimension/unit compount i.e.
 * "120px" or "80%" but will assume px by default.
 * @param height A preferred height.
 */
public void setHeight(String height) {
  this.heightInt = extractNumericValue(height);
  this.heightUnit = extractUnit(height);
}
origin: io.github.dheid/wings

/**
 * Sets the preferred width via an string. Expects an dimension/unit compount i.e.
 * "120px" or "80%" but will assume px by default.
 * @param width A preferred witdth.
 */
public void setWidth(String width) {
  this.widthInt = extractNumericValue(width);
  this.widthUnit = extractUnit(width);
}
org.wingsSDimensionextractUnit

Javadoc

Tries to extract unit from passed string. I.e. returtn "px" if you pass "120px".

Popular methods of SDimension

  • getHeight
  • <init>
  • getWidth
  • getHeightInt
    Get just the height as number without trailing unit.
  • getWidthInt
    Get just the width as number without trailing unit.
  • getWidthUnit
  • equals
  • extractNumericValue
    Extract number from string.
  • getHeightUnit
  • setHeight
    Sets the preferred height via an string. Expects an dimension/unit compount i.e. "120px" or "80%" bu
  • setSize
    Set the size of this Dimension object to the specified width and height.
  • setWidth
    Sets the preferred width via an string. Expects an dimension/unit compount i.e. "120px" or "80%" but
  • setSize,
  • setWidth,
  • toString

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • setRequestProperty (URLConnection)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text 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