edu.upenn.gloDB.gui
Class GUIUtils

java.lang.Object
  extended by edu.upenn.gloDB.gui.GUIUtils

public class GUIUtils
extends java.lang.Object

Static methods used throughout the GUI.

Version:
$Id: GUIUtils.java,v 1.17.2.21 2007/03/01 21:17:33 fisher Exp $
Notes:
The global file type descriptions and extensions be user modifiable.

Field Summary
private static javax.swing.JFileChooser fileChooser
           
private static boolean SHOW_ALL_FILES
          By using global static variables, these values will persist across instances of the open/save fileChoosers.
private static boolean USE_FILE_EXTENSIONS
           
 
Constructor Summary
GUIUtils()
           
 
Method Summary
static java.lang.String getFilename(java.io.File file)
          On Windows machines the path contains "\\", however, when converted to a String, this becomes "\".
static void newSequenceLoader(java.lang.String id)
          Present a dialog box for changing sequence loader.
static java.util.HashMap openFileChooser(int type, javax.swing.filechooser.FileFilter filter)
          Create a file chooser for opening files.
static java.lang.String renameTrack(java.lang.String id)
          Present a dialog box for renaming a particular Track.
static void resetGUIDefaults()
          RE-set GUI user defaults.
static java.util.HashMap saveFileChooser(int type, javax.swing.filechooser.FileFilter filter)
          Use a JFileChooser the get the file info for saving a Sequence.
static java.lang.String sequenceSelector()
          Present a dialog box for selecting a particular Sequence.
static void setShowAllFiles(boolean showAllFiles)
          Set the SHOW_ALL_FILES flag.
static void setUseFileExtensions(boolean useFileExtensions)
          Set the USE_FILE_EXTENSIONS flag.
static boolean showAllFiles()
           
static java.lang.String trackSelector()
          Present a dialog box for selecting a particular Track.
static boolean useFileExtensions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileChooser

private static javax.swing.JFileChooser fileChooser

SHOW_ALL_FILES

private static boolean SHOW_ALL_FILES
By using global static variables, these values will persist across instances of the open/save fileChoosers.


USE_FILE_EXTENSIONS

private static boolean USE_FILE_EXTENSIONS
Constructor Detail

GUIUtils

public GUIUtils()
Method Detail

setShowAllFiles

public static void setShowAllFiles(boolean showAllFiles)
Set the SHOW_ALL_FILES flag.


showAllFiles

public static boolean showAllFiles()

setUseFileExtensions

public static void setUseFileExtensions(boolean useFileExtensions)
Set the USE_FILE_EXTENSIONS flag.


useFileExtensions

public static boolean useFileExtensions()

resetGUIDefaults

public static void resetGUIDefaults()
RE-set GUI user defaults.


getFilename

public static java.lang.String getFilename(java.io.File file)
On Windows machines the path contains "\\", however, when converted to a String, this becomes "\". So we are doubling them here, to preserver the "\\".


renameTrack

public static java.lang.String renameTrack(java.lang.String id)
Present a dialog box for renaming a particular Track.


newSequenceLoader

public static void newSequenceLoader(java.lang.String id)
Present a dialog box for changing sequence loader.

Notes:
This is currently hard coded for the FASTASequence loader.

trackSelector

public static java.lang.String trackSelector()
Present a dialog box for selecting a particular Track.


sequenceSelector

public static java.lang.String sequenceSelector()
Present a dialog box for selecting a particular Sequence.


openFileChooser

public static java.util.HashMap openFileChooser(int type,
                                                javax.swing.filechooser.FileFilter filter)
Create a file chooser for opening files.


saveFileChooser

public static java.util.HashMap saveFileChooser(int type,
                                                javax.swing.filechooser.FileFilter filter)
Use a JFileChooser the get the file info for saving a Sequence.




Copyright 2012 Stephen Fisher and Junhyong Kim, University of Pennsylvania. All Rights Reserved.