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()
      Returns:
      the Folder Close Icon
    • getFoldercloseIconA

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static org.eclipse.swt.graphics.Image getQuestionIcon()
      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()
      Returns:
      the name of the user property file
    • getViewRoot

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

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

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

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

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

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

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

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

      public static int getTimerRefresh()
      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()
      Returns:
      the font size
    • getFontType

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

      public static String getFileExtension()
      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()
      Returns:
      the path of the H5toH5 converter
    • getMRF

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

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

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

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

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

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

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

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

      public static List<String> getHelpViewList()
      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
    • 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()
      Returns:
      the convertEnum
    • 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()
      Returns:
      the isIndexBase1
    • setConvertEnum

      public static void setConvertEnum(boolean convertEnum)
      Parameters:
      convertEnum - the convertEnum to set
    • 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.