Class BaseDimension

    • Constructor Detail

      • BaseDimension

        public BaseDimension()
        Initializes the string with length 0.
      • BaseDimension

        public BaseDimension​(String s)
        Initializes the object with the string to parse.
        Parameters:
        s - the string to parse
      • BaseDimension

        public BaseDimension​(Dimension value)
        Initializes the object with the given value.
        Parameters:
        value - the value to use
      • BaseDimension

        public BaseDimension​(int width,
                             int height)
        Initializes the object with the given value.
        Parameters:
        width - the width
        height - the height
    • Method Detail

      • isValid

        public boolean isValid​(String value)
        Checks whether the string value is a valid presentation for this class.
        Overrides:
        isValid in class AbstractBaseString
        Parameters:
        value - the string value to check
        Returns:
        true if parseable boolean
      • dimensionValue

        public Dimension dimensionValue()
        Returns the Dimension value.
        Returns:
        the Dimension value
      • getTipText

        public String getTipText()
        Returns a tool tip for the GUI editor (ignored if null is returned).
        Specified by:
        getTipText in class AbstractBaseString
        Returns:
        the tool tip
      • toString

        public static String toString​(Dimension d)
        Turns a Dimension object into a string.
        Parameters:
        d - the object to convert
        Returns:
        the generated string
      • parse

        public Dimension parse​(String s)
        Parses the string ("width;height").
        Parameters:
        s - the string to parse
        Returns:
        the generated Dimension object, null if failed to parse