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

How to use
UnitConverter
in
com.jgoodies.forms.util

Best Java code snippets using com.jgoodies.forms.util.UnitConverter (Showing top 18 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: com.jgoodies/forms

/**
 * Converts Centimeters and returns pixels using the resolution of the
 * given component's graphics object.
 *
 * @param cm            Centimeters
 * @param component    the component that provides the graphics object
 * @return the given Centimeters as pixels
 */
public static int centimeterAsPixel(double cm, Component component) {
  return cm == 0d
    ? 0
    : getUnitConverter().centimeterAsPixel(cm, component);
}
origin: com.jgoodies/forms

/**
 * Converts horizontal dialog units and returns pixels.
 * Honors the resolution, dialog font size, platform, and l&f.
 *
 * @param dluX         the horizontal dialog units
 * @param component    the component that provides the graphics object
 * @return the given horizontal dialog units as pixels
 */
public static int dialogUnitXAsPixel(int dluX, Component component) {
  return dluX == 0
    ? 0
    : getUnitConverter().dialogUnitXAsPixel(dluX, component);
}
origin: com.jgoodies/forms

/**
 * Converts vertical dialog units and returns pixels.
 * Honors the resolution, dialog font size, platform, and l&f.
 *
 * @param dluY         the vertical dialog units
 * @param component    the component that provides the graphics object
 * @return the given vertical dialog units as pixels
 */
public static int dialogUnitYAsPixel(int dluY, Component component) {
  return dluY == 0
    ? 0
    : getUnitConverter().dialogUnitYAsPixel(dluY, component);
}
origin: com.jgoodies/forms

/**
 * Converts Inches and returns pixels using the specified resolution.
 *
 * @param in           the Inches
 * @param component    the component that provides the graphics object
 * @return the given Inches as pixels
 */
public static int inchAsPixel(double in, Component component) {
  return in == 0d
    ? 0
    : getUnitConverter().inchAsPixel(in, component);
}
origin: com.jgoodies/forms

/**
 * Converts DTP Points and returns pixels using the resolution of the
 * given component's graphics object.
 *
 * @param pt            DTP Points
 * @param component    the component that provides the graphics object
 * @return the given Points as pixels
 */
public static int pointAsPixel(int pt, Component component) {
  return pt == 0
    ? 0
    : getUnitConverter().pointAsPixel(pt, component);
}
origin: net.java.abeille/abeille

/**
 * Converts Millimeters and returns pixels using the resolution of the given
 * component's graphics object.
 * 
 * @param mm
 *            Millimeters
 * @param component
 *            the component that provides the graphics object
 * @return the given Millimeters as pixels
 */
public static int millimeterAsPixel(double mm, Component component) {
  return mm == 0d ? 0 : getUnitConverter().millimeterAsPixel(mm, component);
}
origin: net.java.abeille/abeille

/**
 * Converts Inches and returns pixels using the specified resolution.
 * 
 * @param in
 *            the Inches
 * @param component
 *            the component that provides the graphics object
 * @return the given Inches as pixels
 */
public static int inchAsPixel(double in, Component component) {
  return in == 0d ? 0 : getUnitConverter().inchAsPixel(in, component);
}
origin: com.jgoodies/jgoodiesforms

/**
 * Converts DTP Points and returns pixels using the resolution of the
 * given component's graphics object.
 *
 * @param pt            DTP Points
 * @param component    the component that provides the graphics object
 * @return the given Points as pixels
 */
public static int pointAsPixel(int pt, Component component) {
  return pt == 0
    ? 0
    : getUnitConverter().pointAsPixel(pt, component);
}
origin: com.jgoodies/jgoodiesforms

/**
 * Converts Millimeters and returns pixels using the resolution of the
 * given component's graphics object.
 *
 * @param mm            Millimeters
 * @param component    the component that provides the graphics object
 * @return the given Millimeters as pixels
 */
public static int millimeterAsPixel(double mm, Component component) {
  return mm == 0d
    ? 0
    : getUnitConverter().millimeterAsPixel(mm, component);
}
origin: com.jgoodies/jgoodiesforms

/**
 * Converts Inches and returns pixels using the specified resolution.
 *
 * @param in           the Inches
 * @param component    the component that provides the graphics object
 * @return the given Inches as pixels
 */
public static int inchAsPixel(double in, Component component) {
  return in == 0d
    ? 0
    : getUnitConverter().inchAsPixel(in, component);
}
origin: net.java.abeille/abeille

/**
 * Converts DTP Points and returns pixels using the resolution of the given
 * component's graphics object.
 * 
 * @param pt
 *            DTP Points
 * @param component
 *            the component that provides the graphics object
 * @return the given Points as pixels
 */
public static int pointAsPixel(int pt, Component component) {
  return pt == 0 ? 0 : getUnitConverter().pointAsPixel(pt, component);
}
origin: com.jgoodies/jgoodiesforms

/**
 * Converts vertical dialog units and returns pixels.
 * Honors the resolution, dialog font size, platform, and l&f.
 *
 * @param dluY         the vertical dialog units
 * @param component    the component that provides the graphics object
 * @return the given vertical dialog units as pixels
 */
public static int dialogUnitYAsPixel(int dluY, Component component) {
  return dluY == 0
    ? 0
    : getUnitConverter().dialogUnitYAsPixel(dluY, component);
}
origin: net.java.abeille/abeille

/**
 * Converts horizontal dialog units and returns pixels. Honors the
 * resolution, dialog font size, platform, and l&f.
 * 
 * @param dluX
 *            the horizontal dialog units
 * @param component
 *            the component that provides the graphics object
 * @return the given horizontal dialog units as pixels
 */
public static int dialogUnitXAsPixel(int dluX, Component component) {
  return dluX == 0 ? 0 : getUnitConverter().dialogUnitXAsPixel(dluX, component);
}
origin: com.jgoodies/jgoodiesforms

/**
 * Converts Centimeters and returns pixels using the resolution of the
 * given component's graphics object.
 *
 * @param cm            Centimeters
 * @param component    the component that provides the graphics object
 * @return the given Centimeters as pixels
 */
public static int centimeterAsPixel(double cm, Component component) {
  return cm == 0d
    ? 0
    : getUnitConverter().centimeterAsPixel(cm, component);
}
origin: com.jgoodies/forms

/**
 * Converts Millimeters and returns pixels using the resolution of the
 * given component's graphics object.
 *
 * @param mm            Millimeters
 * @param component    the component that provides the graphics object
 * @return the given Millimeters as pixels
 */
public static int millimeterAsPixel(double mm, Component component) {
  return mm == 0d
    ? 0
    : getUnitConverter().millimeterAsPixel(mm, component);
}
origin: net.java.abeille/abeille

/**
 * Converts vertical dialog units and returns pixels. Honors the resolution,
 * dialog font size, platform, and l&f.
 * 
 * @param dluY
 *            the vertical dialog units
 * @param component
 *            the component that provides the graphics object
 * @return the given vertical dialog units as pixels
 */
public static int dialogUnitYAsPixel(int dluY, Component component) {
  return dluY == 0 ? 0 : getUnitConverter().dialogUnitYAsPixel(dluY, component);
}
origin: com.jgoodies/jgoodiesforms

/**
 * Converts horizontal dialog units and returns pixels.
 * Honors the resolution, dialog font size, platform, and l&f.
 *
 * @param dluX         the horizontal dialog units
 * @param component    the component that provides the graphics object
 * @return the given horizontal dialog units as pixels
 */
public static int dialogUnitXAsPixel(int dluX, Component component) {
  return dluX == 0
    ? 0
    : getUnitConverter().dialogUnitXAsPixel(dluX, component);
}
origin: net.java.abeille/abeille

/**
 * Converts Centimeters and returns pixels using the resolution of the given
 * component's graphics object.
 * 
 * @param cm
 *            Centimeters
 * @param component
 *            the component that provides the graphics object
 * @return the given Centimeters as pixels
 */
public static int centimeterAsPixel(double cm, Component component) {
  return cm == 0d ? 0 : getUnitConverter().centimeterAsPixel(cm, component);
}
com.jgoodies.forms.utilUnitConverter

Javadoc

An interface that describes how to convert general sizes to pixel sizes. For example, dialog units require a conversion that honors the font and resolution. The com.jgoodies.forms.layout.Sizes class delegates all size conversions to an implementation of this interface.

Most used methods

  • centimeterAsPixel
    Converts Centimeters and returns pixels using the resolution of the given component's graphics objec
  • dialogUnitXAsPixel
    Converts horizontal dialog units and returns pixels. Honors the resolution, dialog font size, platfo
  • dialogUnitYAsPixel
    Converts vertical dialog units and returns pixels. Honors the resolution, dialog font size, platform
  • inchAsPixel
    Converts Inches and returns pixels using the specified resolution.
  • millimeterAsPixel
    Converts Millimeters and returns pixels using the resolution of the given component's graphics objec
  • pointAsPixel
    Converts DTP Points and returns pixels using the resolution of the given component's graphics object

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JFrame (javax.swing)
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