Class XUtils


  • public class XUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      XUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int defaultColumnWidthToPx​(int columnWidth, int charWidth)
      Convert default columns character width to pixel
      static int fileChar256ToPx​(int char256, int charWidth)
      convert file 1/256 character width to pixel
      static double getDoubleVersion()  
      static boolean isTitleIndexMode​(Spreadsheet ss)
      Returns whether the Spreadsheet title is in index mode
      static java.lang.String nextUpdateId()  
      static int pointToPx​(int point)
      convert point to pixel
      static int pointToTwip​(int px)
      convert point to twip (1/20 point)
      static int pxToFileChar256​(int px, int charWidth)
      convert pixel to file 1/256 character width
      static int pxToPoint​(int px)
      convert pixel to point
      static double pxToScreenChar1​(int px, int charWidth)
      Convert pixel to character width (for application)
      static int pxToScreenChar256​(int px, int charWidth)
      Convert pixel to 1/256 character width
      static int pxToTwip​(int px)
      convert pixel to twip (1/20 point)
      static int screenChar1ToPx​(double w, int charWidth)
      convert character width to pixel
      static int screenChar256ToPx​(int char256, int charWidth)
      convert 1/256 character width to pixel
      static int twipToPoint​(int twip)
      convert twip (1/20 point) to point
      static int twipToPx​(int twip)
      convert twip (1/20 point) to pixel
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XUtils

        public XUtils()
    • Method Detail

      • getDoubleVersion

        public static double getDoubleVersion()
      • nextUpdateId

        public static java.lang.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