Class XUtils


  • public class XUtils
    extends Object
    • Constructor Detail

      • XUtils

        public XUtils()
    • Method Detail

      • getDoubleVersion

        public static double getDoubleVersion()
      • nextUpdateId

        public static String nextUpdateId()
      • isTitleIndexMode

        public static boolean isTitleIndexMode​(Spreadsheet ss)
        Returns whether the Spreadsheet title is in index mode
        Parameters:
        ss - the Spreadsheet
        Returns:
        whether the Spreadsheet title is in index mode
      • pxToPoint

        public static int pxToPoint​(int px)
        convert pixel to point
      • pointToPx

        public static int pointToPx​(int point)
        convert point to pixel
      • pxToTwip

        public static int pxToTwip​(int px)
        convert pixel to twip (1/20 point)
      • twipToPx

        public static int twipToPx​(int twip)
        convert twip (1/20 point) to pixel
      • pointToTwip

        public static int pointToTwip​(int px)
        convert point to twip (1/20 point)
      • twipToPoint

        public static int twipToPoint​(int twip)
        convert twip (1/20 point) to point
      • fileChar256ToPx

        public static int fileChar256ToPx​(int char256,
                                          int charWidth)
        convert file 1/256 character width to pixel
      • pxToFileChar256

        public static int pxToFileChar256​(int px,
                                          int charWidth)
        convert pixel to file 1/256 character width
      • screenChar256ToPx

        public static int screenChar256ToPx​(int char256,
                                            int charWidth)
        convert 1/256 character width to pixel
      • pxToScreenChar256

        public static int pxToScreenChar256​(int px,
                                            int charWidth)
        Convert pixel to 1/256 character width
      • screenChar1ToPx

        public static int screenChar1ToPx​(double w,
                                          int charWidth)
        convert character width to pixel
      • pxToScreenChar1

        public static double pxToScreenChar1​(int px,
                                             int charWidth)
        Convert pixel to character width (for application)
      • defaultColumnWidthToPx

        public static int defaultColumnWidthToPx​(int columnWidth,
                                                 int charWidth)
        Convert default columns character width to pixel