|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmol.export.history.HistoryFile
public class HistoryFile
The history file contains data from previous uses of Jmol.
Field Summary | |
---|---|
(package private) File |
file
The location of the history file. |
(package private) String |
header
The information written to the header of the history file. |
private Properties |
properties
The data stored in the history file. |
Constructor Summary | |
---|---|
HistoryFile(File file,
String header)
Creates a history file. |
Method Summary | |
---|---|
void |
addProperties(Properties properties)
Adds the given properties to the history. |
private boolean |
addProperty(String key,
String value)
Adds the given property to the history. |
private boolean |
addWindowBorder(String name,
Point border)
Adds the window border to the history. |
void |
addWindowInfo(String name,
Component window,
Point border)
Adds the window informations to the history. |
private boolean |
addWindowPosition(String name,
Point position)
Adds the window position to the history. |
private boolean |
addWindowSize(String name,
Dimension size)
Adds the window size to the history. |
private boolean |
addWindowVisibility(String name,
boolean visible)
Adds the window visibility to the history. |
File |
getFile()
|
Properties |
getProperties()
|
String |
getProperty(String key,
String defaultValue)
Get the value of a property |
Point |
getWindowBorder(String name)
|
Point |
getWindowPosition(String name)
|
Dimension |
getWindowSize(String name)
|
Boolean |
getWindowVisibility(String name)
|
private void |
load()
Loads properties from the history file. |
void |
repositionWindow(String name,
Component window)
Uses the informations in the history to reposition the window. |
void |
repositionWindow(String name,
Component window,
int minWidth,
int minHeight)
Uses the informations in the history to reposition the window. |
private void |
save()
Saves properties to the history file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Properties properties
File file
String header
Constructor Detail |
---|
public HistoryFile(File file, String header)
file
- the location of the file.header
- information written to the header of the file.Method Detail |
---|
public void addProperties(Properties properties)
properties
- the properties to add.public Properties getProperties()
public String getProperty(String key, String defaultValue)
key
- Key of the property to finddefaultValue
- Default value to use if the property is not found
private boolean addProperty(String key, String value)
key
- Key of the property to addvalue
- Value of the property
public Point getWindowPosition(String name)
name
- Window name
public Point getWindowBorder(String name)
name
- window name
public Dimension getWindowSize(String name)
name
- Window name
public Boolean getWindowVisibility(String name)
name
- Window name
private boolean addWindowPosition(String name, Point position)
name
- Window nameposition
- Window position
private boolean addWindowBorder(String name, Point border)
name
- window nameborder
- Window border
private boolean addWindowSize(String name, Dimension size)
name
- Window namesize
- Window size
private boolean addWindowVisibility(String name, boolean visible)
name
- Window namevisible
- Window visibilite
public void addWindowInfo(String name, Component window, Point border)
name
- Window namewindow
- Windowborder
- Point borderpublic void repositionWindow(String name, Component window, int minWidth, int minHeight)
name
- Window namewindow
- WindowminWidth
- minHeight
- public void repositionWindow(String name, Component window)
name
- Window namewindow
- Windowpublic File getFile()
private void load()
private void save()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |