Enum Sizeable.Unit

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Sizeable.Unit>
    Enclosing interface:
    Sizeable

    public static enum Sizeable.Unit
    extends java.lang.Enum<Sizeable.Unit>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CM
      Unit code representing centimeters.
      EM
      Unit code representing the font-size of the relevant font.
      EX
      Unit code representing the x-height of the relevant font.
      INCH
      Unit code representing inches.
      MM
      Unit code representing millimeters.
      PERCENTAGE
      Unit code representing in percentage of the containing element defined by terminal.
      PICAS
      Unit code representing picas (12 points).
      PIXELS
      Unit code representing pixels.
      POINTS
      Unit code representing points (1/72nd of an inch).
      REM
      Unit code representing the font-size of the root font.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSymbol()  
      static Sizeable.Unit getUnitFromSymbol​(java.lang.String symbol)  
      java.lang.String toString()  
      static Sizeable.Unit valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Sizeable.Unit[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • PIXELS

        public static final Sizeable.Unit PIXELS
        Unit code representing pixels.
      • POINTS

        public static final Sizeable.Unit POINTS
        Unit code representing points (1/72nd of an inch).
      • PICAS

        public static final Sizeable.Unit PICAS
        Unit code representing picas (12 points).
      • EM

        public static final Sizeable.Unit EM
        Unit code representing the font-size of the relevant font.
      • REM

        public static final Sizeable.Unit REM
        Unit code representing the font-size of the root font.
      • EX

        public static final Sizeable.Unit EX
        Unit code representing the x-height of the relevant font.
      • MM

        public static final Sizeable.Unit MM
        Unit code representing millimeters.
      • CM

        public static final Sizeable.Unit CM
        Unit code representing centimeters.
      • INCH

        public static final Sizeable.Unit INCH
        Unit code representing inches.
      • PERCENTAGE

        public static final Sizeable.Unit PERCENTAGE
        Unit code representing in percentage of the containing element defined by terminal.
    • Method Detail

      • values

        public static Sizeable.Unit[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Sizeable.Unit c : Sizeable.Unit.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Sizeable.Unit valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getSymbol

        public java.lang.String getSymbol()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<Sizeable.Unit>
      • getUnitFromSymbol

        public static Sizeable.Unit getUnitFromSymbol​(java.lang.String symbol)