|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.mms.browser.BrowserState
public class BrowserState
Data repository for historical information on past opened directories and viewed concepts.
| Constructor Summary | |
|---|---|
BrowserState()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addDirectory(String dir,
ConceptList cl)
Adds a directory path to the history list of opened directories. |
void |
addProperties(Configurable f,
Properties props)
Adds the Properties for a given Configurable. |
static boolean |
browserStateExists()
Indicates whether or not a BrowserState already exists. |
static void |
clearBrowserState()
Recreates the singleton browser state object. |
static void |
deleteBrowserStates()
Delete all BrowserStates in the config directory
except for the given one. |
BrowserRestrictor |
getBrowserRestrictor()
Returns the current BrowserRestrictor. |
BrowserRestrictor |
getBrowserRestrictor(String br_name)
Returns the given BrowserRestrictor initialized with the
properties saved in the BrowserState. |
static BrowserState |
getBrowserState()
Returns the singleton reference to the BrowserState. |
static BrowserState |
getBrowserState(File file)
Returns the singleton reference to the BrowserState. |
static File |
getBrowserStateDirectory()
Returns the directory where browser state files will be managed. |
ConceptList |
getConceptListForDirectory(String dir)
Returns the ConceptList associated with the given
directory. |
static File |
getCurrentBrowserStateFile()
Returns the most recent previously saved BrowserState |
ConceptList |
getCurrentConceptList()
Returns the list of viewed concepts in the currently opened directory. |
String |
getCurrentDirectory()
Returns the current subset directory. |
String[] |
getDirectoryHistory()
Returns the last five opened directories. |
Map |
getDirectoryToConceptListMap()
Returns the map of directories to their ConceptLists. |
String |
getFontFamily()
Returns the current font family. |
int |
getFontPointSize()
Returns the current font point size. |
Properties |
getProperties(Configurable f)
Returns the Properties for the given Configurable. |
static File |
newBrowserStateFile()
Creates and returns a new browser state file. |
static File |
saveBrowserState()
Saves the BrowserState to a new file. |
static void |
saveBrowserState(File file)
Saves the BrowserState to the given File. |
void |
setBrowserRestrictor(BrowserRestrictor br)
Sets the selected BrowserRestrictor. |
void |
setDirectoryHistory(String[] history)
Resets the directory history to that given. |
void |
setDirectoryToConceptListMap(Map<String,ConceptList> map)
Resets the Map of directories to their ConceptLists. |
void |
setFontFamily(String font_family)
Resets the font family to that given. |
void |
setFontPointSize(int font_point_size)
Resets the font point size to that given. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BrowserState()
| Method Detail |
|---|
public static BrowserState getBrowserState()
BrowserState.
BrowserStatepublic static void clearBrowserState()
public static BrowserState getBrowserState(File file)
throws Exception
BrowserState.
file - where BrowserState was written
BrowserState
Exception
public static File getBrowserStateDirectory()
throws IOException
IOException
public static File newBrowserStateFile()
throws Exception
Exception
public static File saveBrowserState()
throws Exception
BrowserState to a new file.
Exception
public static void saveBrowserState(File file)
throws Exception
BrowserState to the given File.
file - File
Exception
public static boolean browserStateExists()
throws IOException
BrowserState already exists.
true if a BrowserState exists
false otherwise
IOException
public static void deleteBrowserStates()
throws IOException
BrowserStates in the config directory
except for the given one.
this_browser_state - BrowserState
IOException
public static File getCurrentBrowserStateFile()
throws IOException
BrowserState
File where the BrowserState is saved
IOExceptionpublic String[] getDirectoryHistory()
String[] of directory pathspublic void setDirectoryHistory(String[] history)
history - String[]public Map getDirectoryToConceptListMap()
ConceptLists.
Mappublic void setDirectoryToConceptListMap(Map<String,ConceptList> map)
Map of directories to their ConceptLists.
map - Mappublic ConceptList getConceptListForDirectory(String dir)
ConceptList associated with the given
directory.
dir - subset directory of interest
ConceptListpublic String getCurrentDirectory()
String path to subset directorypublic ConceptList getCurrentConceptList()
Concept[] list of concepts
public void addDirectory(String dir,
ConceptList cl)
dir - Stringcl - ConceptListpublic int getFontPointSize()
int font point sizepublic void setFontPointSize(int font_point_size)
font_point_size - intpublic String getFontFamily()
String font familypublic void setFontFamily(String font_family)
font_family - String
public void addProperties(Configurable f,
Properties props)
Properties for a given Configurable.
f - Configurableprops - Propertiespublic Properties getProperties(Configurable f)
Properties for the given Configurable.
f - Configurable
Propertiespublic void setBrowserRestrictor(BrowserRestrictor br)
BrowserRestrictor.
br - BrowserRestrictor
public BrowserRestrictor getBrowserRestrictor()
throws IllegalAccessException,
ClassNotFoundException,
InstantiationException
BrowserRestrictor.
BrowserRestrictor
IllegalAccessException
ClassNotFoundException
InstantiationException
public BrowserRestrictor getBrowserRestrictor(String br_name)
throws IllegalAccessException,
ClassNotFoundException,
InstantiationException
BrowserRestrictor initialized with the
properties saved in the BrowserState.
BrowserRestrictor
IllegalAccessException
ClassNotFoundException
InstantiationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||