Package hdf.view

Class ViewProperties

Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.preference.PreferenceStore
hdf.view.ViewProperties
All Implemented Interfaces:
org.eclipse.jface.preference.IPersistentPreferenceStore, org.eclipse.jface.preference.IPreferenceStore

public class ViewProperties extends org.eclipse.jface.preference.PreferenceStore
A class to maintain the list of preferences for data and display
  • Field Details

  • Constructor Details

    • ViewProperties

      public ViewProperties(String viewRoot, String viewStart)
      Creates a property list with given root directory of the HDFView.
      Parameters:
      viewRoot - the root directory of the HDFView
      viewStart - the starting directory for file searches
  • Method Details

    • createPropertyFile

      public static String createPropertyFile(String userHomeFile, String userDirFile)
      Creates a property list file in a directory.
      Parameters:
      userHomeFile - the user home directory
      userDirFile - the user directory
      Returns:
      property list file
    • loadExtClass

      public static ClassLoader loadExtClass()
      load module classes
      Returns:
      the ClassLoader
    • getFoldercloseIcon

      public static org.eclipse.swt.graphics.Image getFoldercloseIcon()
      Get the Folder Close Icon
      Returns:
      the Folder Close Icon
    • getFoldercloseIconA

      public static org.eclipse.swt.graphics.Image getFoldercloseIconA()
      Get the Folder Close with Attribute Icon
      Returns:
      the Folder Close with Attribute Icon
    • getFolderopenIcon

      public static org.eclipse.swt.graphics.Image getFolderopenIcon()
      Get the Folder Open Icon
      Returns:
      the Folder Open Icon
    • getFolderopenIconA

      public static org.eclipse.swt.graphics.Image getFolderopenIconA()
      Get the Folder Open with Attribute Icon
      Returns:
      the Folder Open with Attribute Icon
    • getHdfIcon

      public static org.eclipse.swt.graphics.Image getHdfIcon()
      Get the HDF Icon
      Returns:
      the HDF Icon
    • getHdfIcons

      public static org.eclipse.swt.graphics.Image[] getHdfIcons()
      Get the HDF Icons
      Returns:
      the HDF Icons
    • getH4Icon

      public static org.eclipse.swt.graphics.Image getH4Icon()
      Get the HDF4 Icon
      Returns:
      the HDF4 Icon
    • getH4IconR

      public static org.eclipse.swt.graphics.Image getH4IconR()
      Get the read-only HDF4 Icon
      Returns:
      the read-only HDF4 Icon
    • getH5Icon

      public static org.eclipse.swt.graphics.Image getH5Icon()
      Get the HDF5 Icon
      Returns:
      the HDF5 Icon
    • getH5IconR

      public static org.eclipse.swt.graphics.Image getH5IconR()
      Get the read-only HDF5 Icon
      Returns:
      the read-only HDF5 Icon
    • getNC3Icon

      public static org.eclipse.swt.graphics.Image getNC3Icon()
      Get the netcdf Icon
      Returns:
      the netcdf Icon
    • getNC3IconR

      public static org.eclipse.swt.graphics.Image getNC3IconR()
      Get the read-only netcdf Icon
      Returns:
      the read-only netcdf Icon
    • getDatasetIcon

      public static org.eclipse.swt.graphics.Image getDatasetIcon()
      Get the Dataset Icon
      Returns:
      the Dataset Icon
    • getDatasetIconA

      public static org.eclipse.swt.graphics.Image getDatasetIconA()
      Get the Dataset with Attribute Icon
      Returns:
      the Dataset with Attribute Icon
    • getDatatypeIcon

      public static org.eclipse.swt.graphics.Image getDatatypeIcon()
      Get the Datatype Icon
      Returns:
      the Datatype Icon
    • getDatatypeIconA

      public static org.eclipse.swt.graphics.Image getDatatypeIconA()
      Get the Datatype with Attribute Icon
      Returns:
      the Datatype with Attribute Icon
    • getLinkIcon

      public static org.eclipse.swt.graphics.Image getLinkIcon()
      Get the Link Icon
      Returns:
      the Link Icon
    • getFileopenIcon

      public static org.eclipse.swt.graphics.Image getFileopenIcon()
      Get the File Open Icon
      Returns:
      the File Open Icon
    • getFilesaveIcon

      public static org.eclipse.swt.graphics.Image getFilesaveIcon()
      Get the File Save Icon
      Returns:
      the File Save Icon
    • getFilenewIcon

      public static org.eclipse.swt.graphics.Image getFilenewIcon()
      Get the File New Icon
      Returns:
      the File New Icon
    • getFilecloseIcon

      public static org.eclipse.swt.graphics.Image getFilecloseIcon()
      Get the File Close Icon
      Returns:
      the File Close Icon
    • getPaletteIcon

      public static org.eclipse.swt.graphics.Image getPaletteIcon()
      Get the Palette Icon
      Returns:
      the Palette Icon
    • getBrightIcon

      public static org.eclipse.swt.graphics.Image getBrightIcon()
      Get the Bright Icon
      Returns:
      the Bright Icon
    • getAutocontrastIcon

      public static org.eclipse.swt.graphics.Image getAutocontrastIcon()
      Get the Autocontrast Icon
      Returns:
      the Autocontrast Icon
    • getImageIcon

      public static org.eclipse.swt.graphics.Image getImageIcon()
      Get the Image Icon
      Returns:
      the Image Icon
    • getTableIcon

      public static org.eclipse.swt.graphics.Image getTableIcon()
      Get the Table Icon
      Returns:
      the Table Icon
    • getTextIcon

      public static org.eclipse.swt.graphics.Image getTextIcon()
      Get the Text Icon
      Returns:
      the Text Icon
    • getImageIconA

      public static org.eclipse.swt.graphics.Image getImageIconA()
      Get the Image with Attribute Icon
      Returns:
      the Image with Attribute Icon
    • getTableIconA

      public static org.eclipse.swt.graphics.Image getTableIconA()
      Get the Table with Attribute Icon
      Returns:
      the Table with Attribute Icon
    • getTextIconA

      public static org.eclipse.swt.graphics.Image getTextIconA()
      Get the Text with Attribute Icon
      Returns:
      the Text with Attribute Icon
    • getZoominIcon

      public static org.eclipse.swt.graphics.Image getZoominIcon()
      Get the Zoom In Icon
      Returns:
      the Zoom In Icon
    • getZoomoutIcon

      public static org.eclipse.swt.graphics.Image getZoomoutIcon()
      Get the Zoom Out Icon
      Returns:
      the Zoom Out Icon
    • getBlankIcon

      public static org.eclipse.swt.graphics.Image getBlankIcon()
      Get the Blank Icon
      Returns:
      the Blank Icon
    • getHelpIcon

      public static org.eclipse.swt.graphics.Image getHelpIcon()
      Get the Help Icon
      Returns:
      the Help Icon
    • getCopyIcon

      public static org.eclipse.swt.graphics.Image getCopyIcon()
      Get the Copy Icon
      Returns:
      the Copy Icon
    • getCutIcon

      public static org.eclipse.swt.graphics.Image getCutIcon()
      Get the Cut Icon
      Returns:
      the Cut Icon
    • getPasteIcon

      public static org.eclipse.swt.graphics.Image getPasteIcon()
      Getthe Paste Icon
      Returns:
      the Paste Icon
    • getHDFViewIcon

      public static org.eclipse.swt.graphics.Image getHDFViewIcon()
      Get the HDFView Icon
      Returns:
      the HDFView Icon
    • getLargeHdfIcon

      public static org.eclipse.swt.graphics.Image getLargeHdfIcon()
      Get the Large HDF Icon
      Returns:
      the Large HDF Icon
    • getPreviousIcon

      public static org.eclipse.swt.graphics.Image getPreviousIcon()
      Get the Previous Icon
      Returns:
      the Previous Icon
    • getNextIcon

      public static org.eclipse.swt.graphics.Image getNextIcon()
      Get the Next Icon
      Returns:
      the Next Icon
    • getFirstIcon

      public static org.eclipse.swt.graphics.Image getFirstIcon()
      Get the First Icon
      Returns:
      the First Icon
    • getLastIcon

      public static org.eclipse.swt.graphics.Image getLastIcon()
      Get the Last Icon
      Returns:
      the Last Icon
    • getChartIcon

      public static org.eclipse.swt.graphics.Image getChartIcon()
      Get the Chart Icon
      Returns:
      the Chart Icon
    • getAnimationIcon

      public static org.eclipse.swt.graphics.Image getAnimationIcon()
      Get the Animation Icon
      Returns:
      the Animation Icon
    • getAppsIcon

      public static org.eclipse.swt.graphics.Image getAppsIcon()
      Get the Apps Icon
      Returns:
      the Apps Icon
    • getUrlIcon

      public static org.eclipse.swt.graphics.Image getUrlIcon()
      Get the Url Icon
      Returns:
      the Url Icon
    • getVideoIcon

      public static org.eclipse.swt.graphics.Image getVideoIcon()
      Get the Video Icon
      Returns:
      the Video Icon
    • getXlsIcon

      public static org.eclipse.swt.graphics.Image getXlsIcon()
      Get the Xls Icon
      Returns:
      the Xls Icon
    • getPdfIcon

      public static org.eclipse.swt.graphics.Image getPdfIcon()
      Get the Pdf Icon
      Returns:
      the Pdf Icon
    • getAudioIcon

      public static org.eclipse.swt.graphics.Image getAudioIcon()
      Get the Audio Icon
      Returns:
      the Audio Icon
    • getQuestionIcon

      public static org.eclipse.swt.graphics.Image getQuestionIcon()
      Get the Question Icon
      Returns:
      the Question Icon
    • loadIcons

      public static void loadIcons()
      Load the Icons
    • load

      public void load() throws IOException
      Load user properties from property file
      Overrides:
      load in class org.eclipse.jface.preference.PreferenceStore
      Throws:
      IOException - if a failure occurred
    • save

      public void save() throws IOException
      Save user properties into property file
      Specified by:
      save in interface org.eclipse.jface.preference.IPersistentPreferenceStore
      Overrides:
      save in class org.eclipse.jface.preference.PreferenceStore
      Throws:
      IOException - if a failure occurred
    • getPropertyFile

      public static String getPropertyFile()
      Get the name of the user property file
      Returns:
      the name of the user property file
    • getViewRoot

      public static String getViewRoot()
      Get the root directory where the HDFView is installed.
      Returns:
      the root directory where the HDFView is installed.
    • getWorkDir

      public static String getWorkDir()
      Get the default work directory, where the open file starts.
      Returns:
      the default work directory, where the open file starts.
    • getMaxRecentFiles

      public static int getMaxRecentFiles()
      Get the maximum number of the most recent file
      Returns:
      the maximum number of the most recent file
    • getUsersGuide

      public static String getUsersGuide()
      Get the path of the HDFView users guide
      Returns:
      the path of the HDFView users guide
    • getDataDelimiter

      public static String getDataDelimiter()
      Get the delimiter of data values
      Returns:
      the delimiter of data values
    • getImageOrigin

      public static String getImageOrigin()
      Get the image origin
      Returns:
      the image origin
    • getIndexType

      public static String getIndexType()
      Get the default index type for display
      Returns:
      the default index type for display
    • getIndexOrder

      public static String getIndexOrder()
      Get the default index order for display
      Returns:
      the default index order for display
    • getTimerRefresh

      public static int getTimerRefresh()
      Get the timer refresh size
      Returns:
      the timer refresh size
    • setTimerRefresh

      public static void setTimerRefresh(int trefresh)
      sets the timer refresh
      Parameters:
      trefresh - the timer refresh
    • getFontSize

      public static int getFontSize()
      Get the font size
      Returns:
      the font size
    • getFontType

      public static String getFontType()
      Get the font type
      Returns:
      the font type
    • getFileExtension

      public static String getFileExtension()
      Get the file extensions of supported file formats
      Returns:
      the file extensions of supported file formats
    • setFontSize

      public static void setFontSize(int fsize)
      sets the font size
      Parameters:
      fsize - the font size
    • setFontType

      public static void setFontType(String ftype)
      sets the font type
      Parameters:
      ftype - the font type
    • getH4toH5

      public static String getH4toH5()
      Get the path of the H5toH5 converter
      Returns:
      the path of the H5toH5 converter
    • getMRF

      public static List<String> getMRF()
      Get the list of most recent files
      Returns:
      the list of most recent files
    • getPaletteList

      public static List<String> getPaletteList()
      Get the list of palette files
      Returns:
      the list of palette files
    • getPluginPaths

      public static String[] getPluginPaths()
      Get the plugin path list
      Returns:
      the plugin path list
    • getSrbAccount

      public static List<String[]> getSrbAccount()
      Get the SRB account list
      Returns:
      the SRB account list
    • getTreeViewList

      public static List<String> getTreeViewList()
      Get a list of treeview modules
      Returns:
      a list of treeview modules
    • getMetaDataViewList

      public static List<String> getMetaDataViewList()
      Get a list of metadataview modules
      Returns:
      a list of metadataview modules
    • getTableViewList

      public static List<String> getTableViewList()
      Get a list of tableview modules
      Returns:
      a list of tableview modules
    • getImageViewList

      public static List<String> getImageViewList()
      Get a list of imageview modules
      Returns:
      a list of imageview modules
    • getPaletteViewList

      public static List<String> getPaletteViewList()
      Get a list of paletteview modules
      Returns:
      a list of paletteview modules
    • getHelpViewList

      public static List<String> getHelpViewList()
      Get a list of helpview modules
      Returns:
      a list of helpview modules
    • setUsersGuide

      public static void setUsersGuide(String str)
      set the path of H5View User's guide
      Parameters:
      str - the path
    • setH4toH5

      public static void setH4toH5(String tool)
      set the path of the H4 to H5 converter
      Parameters:
      tool - the path of the H4 to H5 converter
    • setRootDir

      public static void setRootDir(String rDir)
      set the path of the default root directory
      Parameters:
      rDir - the default root directory
    • setWorkDir

      public static void setWorkDir(String wDir)
      set the path of the default work directory
      Parameters:
      wDir - the default work directory
    • loadPluginPaths

      public static String[] loadPluginPaths()
      Load the paths of the default plugin directories
      Returns:
      the array of paths
    • insertPluginPath

      public static void insertPluginPath(String pluginPath, int pathIndex)
      Inserts the plugin path.
      Parameters:
      pluginPath - The plugin path.
      pathIndex - The index to insert the plugin path.
    • prependPluginPath

      public static void prependPluginPath(String pluginPath)
      Prepends the plugin path.
      Parameters:
      pluginPath - The plugin path.
    • appendPluginPath

      public static void appendPluginPath(String pluginPath)
      Appends the plugin path.
      Parameters:
      pluginPath - The plugin path.
    • deletePluginPath

      public static void deletePluginPath(int pathIndex)
      Removes the plugin path.
      Parameters:
      pathIndex - The index to remove the plugin path.
    • setFileExtension

      public static void setFileExtension(String ext)
      set the file extension
      Parameters:
      ext - the file extension
    • setDataDelimiter

      public static void setDataDelimiter(String delim)
      set the delimiter of data values
      Parameters:
      delim - the delimiter of data values
    • setImageOrigin

      public static void setImageOrigin(String o)
      set the image origin
      Parameters:
      o - the image origin
    • setIndexType

      public static void setIndexType(String idxType)
      set the index type
      Parameters:
      idxType - the index type
    • setIndexOrder

      public static void setIndexOrder(String idxOrder)
      set the index order
      Parameters:
      idxOrder - the index order
    • setMaxMembers

      public static void setMaxMembers(int n)
      Current Java applications such as HDFView cannot handle files with large number of objects such as 1,000,000 objects. setMaxMembers() sets the maximum number of objects that will be loaded into memory.
      Parameters:
      n - the maximum number of objects to load into memory
    • setStartMembers

      public static void setStartMembers(int idx)
      Current Java applications such as HDFView cannot handle files with large number of objects such as 1,000,000 objects. setStartMember() sets the starting index of objects that will be loaded into memory.
      Parameters:
      idx - the maximum number of objects to load into memory
    • getMaxMembers

      public static int getMaxMembers()
      Current Java applications such as HDFView cannot handle files with large number of objects such as 1,000,000 objects. getMaxMembers() returns the maximum number of objects that will be loaded into memory.
      Returns:
      the maximum members
    • getStartMembers

      public static int getStartMembers()
      Current Java applications such as HDFView cannot handle files with large number of objects such as 1,000,000 objects. getStartMembers() returns the starting index of objects that will be loaded into memory.
      Returns:
      the start members
    • isAutoContrast

      public static boolean isAutoContrast()
      Returns true if auto contrast is used in image processing.
      Returns:
      true if auto contrast is used in image processing; otherwise, returns false.
    • showImageValues

      public static boolean showImageValues()
      Returns true if "show image values" is set.
      Returns:
      true if "show image values" is set; otherwise, returns false.
    • setAutoContrast

      public static void setAutoContrast(boolean b)
      Set the flag to indicate if auto contrast is used in image process.
      Parameters:
      b - the flag to indicate if auto contrast is used in image process.
    • setShowImageValue

      public static void setShowImageValue(boolean b)
      Set the flag to indicate if "show image values" is set.
      Parameters:
      b - the flag to indicate if if "show image values" is set.
    • isReadOnly

      public static boolean isReadOnly()
      Returns true if default file access is read only.
      Returns:
      true if default file access is read only; otherwise, returns false.
    • setReadOnly

      public static void setReadOnly(boolean b)
      Set the flag to indicate if default file access is read only.
      Parameters:
      b - the flag to indicate if default file access is read only.
    • isReadSWMR

      public static boolean isReadSWMR()
      Returns true if default file access is read SWMR.
      Returns:
      true if default file access is read SWMR; otherwise, returns false.
    • setReadSWMR

      public static void setReadSWMR(boolean b)
      Set the flag to indicate if default file access is read SWMR.
      Parameters:
      b - the flag to indicate if default file access is read SWMR.
    • getEarlyLib

      public static String getEarlyLib()
      Returns value of default lib version for the earliest.
      Returns:
      value of default lib version for the earliest.
    • setEarlyLib

      public static void setEarlyLib(String vers)
      Set the value of default lib version for the earliest.
      Parameters:
      vers - the value of default lib version for the earliest.
    • getLateLib

      public static String getLateLib()
      Returns value of default lib version for the latest.
      Returns:
      value of default lib version for the latest.
    • setLateLib

      public static void setLateLib(String vers)
      Set the value of default lib version for the latest.
      Parameters:
      vers - the value of default lib version for the latest.
    • isConvertEnum

      public static boolean isConvertEnum()
      Check if the enum value is to be converted
      Returns:
      true if the enum value is to be converted
    • showRegRefValues

      public static boolean showRegRefValues()
      Returns true if "show regref values" is set.
      Returns:
      true if "show regref values" is set; otherwise, returns false.
    • isIndexBase1

      public static boolean isIndexBase1()
      Check if the data index starts at 1
      Returns:
      true if the data index starts at 1
    • setConvertEnum

      public static void setConvertEnum(boolean convertEnum)
      Set enum data to be converted
      Parameters:
      convertEnum - true to set enum data conversion
    • setShowRegRefValue

      public static void setShowRegRefValue(boolean b)
      Set the flag to indicate if "show RegRef values" is set.
      Parameters:
      b - the flag to indicate if if "show RegRef values" is set.
    • setIndexBase1

      public static void setIndexBase1(boolean b)
      Set the flag to indicate if IndexBase should start at 1.
      Parameters:
      b - the flag to indicate if IndexBase should start at 1.
    • setRecentFiles

      public static void setRecentFiles(ArrayList<String> recentFilesList)
      Sets the list of most recently accessed files.
      Parameters:
      recentFilesList - The list of most recently accessed files.