|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.upenn.crimson.gui.GUIUtils
public class GUIUtils
Static methods used throughout the GUI.
Nested Class Summary | |
---|---|
static class |
GUIUtils.DocumentLengthFilter
Filter used to limit JTextAreas to 4000 characters. |
static class |
GUIUtils.PyFilter
Python specific FileFilter. |
Field Summary | |
---|---|
private static javax.swing.JFileChooser |
fileChooser
The file chooser begins with the current working directory. |
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.io.File |
directoryChooser()
Create a file chooser for selecting a directory. |
static javax.swing.text.DocumentFilter |
getDocLengthFilter()
|
static java.lang.String |
getFilename(java.io.File file)
On Windows machines the path contains "\\", however, when converted to a String, this becomes "\". |
static javax.swing.filechooser.FileFilter |
getPyFilter()
|
static void |
launchWalrus(java.lang.String filename)
This will start a Walrus 3D session using the file given. |
static void |
openDatabase()
Use a FieldEditDialog to query the user for 'username', 'password', and 'database' info and then use this info to open a connection to the database. |
static java.io.File |
openFileChooser(java.lang.String title,
javax.swing.filechooser.FileFilter filter)
Create a file chooser for opening files. |
static void |
resetGUIDefaults()
RE-set GUI user defaults. |
static java.io.File |
saveFileChooser(java.lang.String title,
java.lang.String name,
javax.swing.filechooser.FileFilter filter)
Create a file chooser for saving files. |
static void |
setDBType()
|
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 boolean |
useFileExtensions()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static javax.swing.JFileChooser fileChooser
private static boolean SHOW_ALL_FILES
private static boolean USE_FILE_EXTENSIONS
Constructor Detail |
---|
public GUIUtils()
Method Detail |
---|
public static void setShowAllFiles(boolean showAllFiles)
public static boolean showAllFiles()
public static void setUseFileExtensions(boolean useFileExtensions)
public static boolean useFileExtensions()
public static javax.swing.filechooser.FileFilter getPyFilter()
public static javax.swing.text.DocumentFilter getDocLengthFilter()
public static void launchWalrus(java.lang.String filename)
public static void resetGUIDefaults()
public static java.lang.String getFilename(java.io.File file)
public static void setDBType()
public static void openDatabase()
public static java.io.File directoryChooser()
public static java.io.File openFileChooser(java.lang.String title, javax.swing.filechooser.FileFilter filter)
public static java.io.File saveFileChooser(java.lang.String title, java.lang.String name, javax.swing.filechooser.FileFilter filter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |