Class XViewerLib

java.lang.Object
org.eclipse.nebula.widgets.xviewer.util.internal.XViewerLib

public class XViewerLib
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static int MILLISECS_PER_DAY  
    static java.lang.String MMDDYYHHMM  
  • Constructor Summary

    Constructors 
    Constructor Description
    XViewerLib()  
  • Method Summary

    Modifier and Type Method Description
    static long daysTillToday​(java.util.Date date)  
    static void ensureInDisplayThread​(java.lang.Runnable runnable)  
    static void ensureInDisplayThread​(java.lang.Runnable runnable, boolean forcePend)  
    static java.lang.String generateGuidStr()  
    static java.lang.String getDateFromPattern​(java.util.Date date, java.lang.String pattern)  
    static java.lang.String getExtension​(java.lang.String filepath)
    Get file extension from the file path
    static org.eclipse.swt.graphics.Image getImage​(java.lang.String imageName)  
    static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor​(java.lang.String imageName)  
    static org.eclipse.swt.layout.GridLayout getZeroMarginLayout()  
    static org.eclipse.swt.layout.GridLayout getZeroMarginLayout​(int numColumns, boolean equalColumnWidth)  
    static java.lang.String intern​(java.lang.String str)  
    static boolean isDisplayThread()  
    static boolean isWindows()
    Determine is OS is windows
    static void popup​(java.lang.String title, java.lang.String message)  
    static java.util.List<java.lang.String> readListFromDir​(java.io.File directory, java.io.FilenameFilter filter, boolean keepExtension)  
    static java.util.List<java.lang.String> readListFromDir​(java.lang.String directory, java.io.FilenameFilter filter)  
    static java.lang.String removeExtension​(java.lang.String filepath)
    Remove the file extension from the file path
    static void writeStringToFile​(java.lang.String str, java.io.File outFile)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • daysTillToday

      public static long daysTillToday​(java.util.Date date)
    • intern

      public static java.lang.String intern​(java.lang.String str)
    • generateGuidStr

      public static java.lang.String generateGuidStr()
    • writeStringToFile

      public static void writeStringToFile​(java.lang.String str, java.io.File outFile) throws java.io.IOException
      Throws:
      java.io.IOException
    • popup

      public static void popup​(java.lang.String title, java.lang.String message)
    • getZeroMarginLayout

      public static org.eclipse.swt.layout.GridLayout getZeroMarginLayout​(int numColumns, boolean equalColumnWidth)
    • getZeroMarginLayout

      public static org.eclipse.swt.layout.GridLayout getZeroMarginLayout()
    • readListFromDir

      public static java.util.List<java.lang.String> readListFromDir​(java.io.File directory, java.io.FilenameFilter filter, boolean keepExtension)
    • readListFromDir

      public static java.util.List<java.lang.String> readListFromDir​(java.lang.String directory, java.io.FilenameFilter filter)
    • removeExtension

      public static java.lang.String removeExtension​(java.lang.String filepath)
      Remove the file extension from the file path
    • isWindows

      public static boolean isWindows()
      Determine is OS is windows
    • getExtension

      public static java.lang.String getExtension​(java.lang.String filepath)
      Get file extension from the file path
    • ensureInDisplayThread

      public static void ensureInDisplayThread​(java.lang.Runnable runnable)
    • ensureInDisplayThread

      public static void ensureInDisplayThread​(java.lang.Runnable runnable, boolean forcePend)
    • isDisplayThread

      public static boolean isDisplayThread()
    • getImage

      public static org.eclipse.swt.graphics.Image getImage​(java.lang.String imageName)
    • getImageDescriptor

      public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor​(java.lang.String imageName)
    • getDateFromPattern

      public static java.lang.String getDateFromPattern​(java.util.Date date, java.lang.String pattern)