|
|||||||||
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) java.io.File |
file
The location of the history file. |
(package private) java.lang.String |
header
The information written to the header of the history file. |
private java.util.Properties |
properties
The data stored in the history file. |
Constructor Summary | |
---|---|
HistoryFile(java.io.File file,
java.lang.String header)
Creates a history file. |
Method Summary | |
---|---|
void |
addProperties(java.util.Properties properties)
Adds the given properties to the history. |
boolean |
addProperty(java.lang.String key,
java.lang.String value)
Adds the given property to the history. |
private boolean |
addWindowBorder(java.lang.String name,
java.awt.Point border)
Adds the window border to the history. |
void |
addWindowInfo(java.lang.String name,
java.awt.Component window,
java.awt.Point border)
Adds the window informations to the history. |
private boolean |
addWindowPosition(java.lang.String name,
java.awt.Point position)
Adds the window position to the history. |
private boolean |
addWindowSize(java.lang.String name,
java.awt.Dimension size)
Adds the window size to the history. |
private boolean |
addWindowVisibility(java.lang.String name,
boolean visible)
Adds the window visibility to the history. |
void |
clear()
|
java.io.File |
getFile()
|
java.util.Properties |
getProperties()
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Get the value of a property |
java.awt.Point |
getWindowBorder(java.lang.String name)
|
java.awt.Point |
getWindowPosition(java.lang.String name)
|
java.awt.Dimension |
getWindowSize(java.lang.String name)
|
java.lang.Boolean |
getWindowVisibility(java.lang.String name)
|
private void |
load()
Loads properties from the history file. |
void |
repositionWindow(java.lang.String name,
java.awt.Component window)
Uses the informations in the history to reposition the window. |
void |
repositionWindow(java.lang.String name,
java.awt.Component window,
int minWidth,
int minHeight,
boolean allowVisible)
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 java.util.Properties properties
java.io.File file
java.lang.String header
Constructor Detail |
---|
public HistoryFile(java.io.File file, java.lang.String header)
file
- the location of the file.header
- information written to the header of the file.Method Detail |
---|
public void addProperties(java.util.Properties properties)
properties
- the properties to add.public java.util.Properties getProperties()
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
key
- Key of the property to finddefaultValue
- Default value to use if the property is not found
public boolean addProperty(java.lang.String key, java.lang.String value)
key
- Key of the property to addvalue
- Value of the property
public java.awt.Point getWindowPosition(java.lang.String name)
name
- Window name
public java.awt.Point getWindowBorder(java.lang.String name)
name
- window name
public java.awt.Dimension getWindowSize(java.lang.String name)
name
- Window name
public java.lang.Boolean getWindowVisibility(java.lang.String name)
name
- Window name
private boolean addWindowPosition(java.lang.String name, java.awt.Point position)
name
- Window nameposition
- Window position
private boolean addWindowBorder(java.lang.String name, java.awt.Point border)
name
- window nameborder
- Window border
private boolean addWindowSize(java.lang.String name, java.awt.Dimension size)
name
- Window namesize
- Window size
private boolean addWindowVisibility(java.lang.String name, boolean visible)
name
- Window namevisible
- Window visibilite
public void addWindowInfo(java.lang.String name, java.awt.Component window, java.awt.Point border)
name
- Window namewindow
- Windowborder
- Point borderpublic void repositionWindow(java.lang.String name, java.awt.Component window, int minWidth, int minHeight, boolean allowVisible)
name
- Window namewindow
- WindowminWidth
- minHeight
- allowVisible
- TODOpublic void repositionWindow(java.lang.String name, java.awt.Component window)
name
- Window namewindow
- Windowpublic java.io.File getFile()
private void load()
private void save()
public void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |