org.objectweb.fractal.gui
Interface UserData

All Known Implementing Classes:
UserDataStorage

public interface UserData


Nested Class Summary
static interface UserData.FProject
           
 
Field Summary
static int CURRENT_CONFIG
           
static int CURRENT_DEPTH
           
static int CURRENT_HEIGHT
           
static int CURRENT_WIDTH
           
static int LAST_OPEN_CONF
           
static int LAST_OPEN_DIR
           
static int LAST_OPEN_FILE
           
static int LAST_SAVE_DIR
           
static int LAST_SAVE_FILE
           
static int MODIFIED
           
static int NO_MODIFIED
           
 
Method Summary
 void addProject(UserData.FProject proj)
          Adds a new FProject to the project list.
 int getIntData(int typ)
          get the int value for a given type.
 UserData.FProject getProject(int range)
          Adds a new FProject to the project list.
 String getStringData(int typ)
          get the int value for a given type.
 void open()
          Open the file which contains all registered User Data.
 void save()
          Save all registered data in the file of the user.
 void setIntData(int typ, int v)
          set the value for a given type.
 void setStringData(int typ, String s)
          set the value for a given type.
 

Field Detail

CURRENT_DEPTH

public static final int CURRENT_DEPTH
See Also:
Constant Field Values

CURRENT_WIDTH

public static final int CURRENT_WIDTH
See Also:
Constant Field Values

CURRENT_HEIGHT

public static final int CURRENT_HEIGHT
See Also:
Constant Field Values

CURRENT_CONFIG

public static final int CURRENT_CONFIG
See Also:
Constant Field Values

LAST_OPEN_DIR

public static final int LAST_OPEN_DIR
See Also:
Constant Field Values

LAST_SAVE_DIR

public static final int LAST_SAVE_DIR
See Also:
Constant Field Values

LAST_OPEN_CONF

public static final int LAST_OPEN_CONF
See Also:
Constant Field Values

LAST_OPEN_FILE

public static final int LAST_OPEN_FILE
See Also:
Constant Field Values

LAST_SAVE_FILE

public static final int LAST_SAVE_FILE
See Also:
Constant Field Values

NO_MODIFIED

public static final int NO_MODIFIED
See Also:
Constant Field Values

MODIFIED

public static final int MODIFIED
See Also:
Constant Field Values
Method Detail

open

public void open()
Open the file which contains all registered User Data. If this file doesn't exist, a new empty file is created.


save

public void save()
Save all registered data in the file of the user. If this file doesn't exist, a new empty file is created.


setIntData

public void setIntData(int typ,
                       int v)
                throws Exception
set the value for a given type. The type must belong to the CURRENT_ family type.

Parameters:
typ - is the Data type.
v - is the int value for the type.
Throws:
Exception

getIntData

public int getIntData(int typ)
               throws Exception
get the int value for a given type. The type must belong to the CURRENT_ family type. or else an Exception is thrown.

Parameters:
typ - is the Data type.
Throws:
Exception

setStringData

public void setStringData(int typ,
                          String s)
                   throws Exception
set the value for a given type. The type must belong to the LAST_ family type.

Parameters:
typ - is the Data type.
Throws:
Exception

getStringData

public String getStringData(int typ)
                     throws Exception
get the int value for a given type. The type must belong to the LAST_ family type or else an Exception is thrown.

Parameters:
typ - is the Data type.
Throws:
Exception

addProject

public void addProject(UserData.FProject proj)
                throws Exception
Adds a new FProject to the project list. If the project already exists, nothing is done. If thomething goes wrong an Exception is thrown.

Throws:
Exception

getProject

public UserData.FProject getProject(int range)
                             throws Exception
Adds a new FProject to the project list. If the project already exists, nothing is done. If thomething goes wrong an Exception is thrown.

Throws:
Exception