|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.quartzware.Project
Project class Contains all the information about the currently open Project. It holds all of the Resource Bundles and the current preferences for the project.
Inner Class Summary | |
class |
Project.Config
This class encapsulates the project options |
Constructor Summary | |
Project()
Default constructor PRE: none POST: class is created |
|
Project(Project.Config cfg,
java.util.Vector bundles)
Creates a project using the given Config (preferences) and the given Vector of Resource Bundles. |
|
Project(java.net.URL projectFile)
Loads a Project using a project file. |
Method Summary | |
void |
addKey(java.lang.String key)
Adds a new key to the root. |
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
|
void |
createBundle(java.lang.String suffix)
Creates a new Resource Bundle and adds it to the Project |
void |
deleteKey(java.lang.String key)
Deletes the Entries in all of the Resource Bundles that match the given key |
java.util.Vector |
getAllBundles()
Gets all of the Resoruce Bundles |
ResBundle |
getBundle(java.lang.String suffix)
Gets the bundle that matches the suffix |
java.lang.Object |
getChild(java.lang.Object parent,
int index)
|
int |
getChildCount(java.lang.Object parent)
|
Project.Config |
getConfig()
Returns a Config containing all of the options for the current Project. |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
|
java.net.URL |
getProjectFile()
Returns a URL which contains the path to the Project File. |
java.lang.Object |
getRoot()
|
ResBundle |
getRootBundle()
Gets the Root Resource Bundle |
void |
importBundle(java.net.URL file,
java.lang.String suffix)
Adds an existing bundle to the Project |
boolean |
isLeaf(java.lang.Object node)
|
void |
removeBundle(ResBundle rb)
Removes the given Resource Bundle from the current Project |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
|
void |
save(boolean saveAs)
Saves all of the currently dirty Resource Bundles. |
void |
setProjectFile(java.net.URL projectFile)
Changes the URL used to write out. |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Project()
public Project(Project.Config cfg, java.util.Vector bundles)
cfg
- Current preferencesbundles
- a vector with Resource Bundles including a root
PRE: cfg and bundles are not null
POST: class is createdpublic Project(java.net.URL projectFile)
f
- Project file selected from Open dialog box
PRE: projectFile points to a file that can be used as a project file
POST: the class is createdMethod Detail |
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
public java.lang.Object getChild(java.lang.Object parent, int index)
public int getChildCount(java.lang.Object parent)
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
public java.lang.Object getRoot()
public boolean isLeaf(java.lang.Object node)
public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
public void valueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)
public ResBundle getRootBundle()
public void deleteKey(java.lang.String key)
key
- The Key to be deleted
PRE: key is not null
POST: no Entry containing the given key will be in the project.public java.net.URL getProjectFile()
public void setProjectFile(java.net.URL projectFile)
projectFile
- The new ProjectFilepublic void importBundle(java.net.URL file, java.lang.String suffix)
file
- The file containing the Resource Bundle to be addedsuffix
- the suffix to be appended to the new Resource Bundle
file name (the language_LOCALE_varient)public void createBundle(java.lang.String suffix)
suffix
- the suffix to be appended to the new Resource Bundle
file name (the language_LOCALE_varient)public void removeBundle(ResBundle rb)
rb
- The resource bundle to be removed
PRE: rb is not null
POST: the resource bundle is removed if it existspublic void save(boolean saveAs)
saveAs
- Save As Flag (described above)
PRE: none
POST: the project is saved.public ResBundle getBundle(java.lang.String suffix)
public java.util.Vector getAllBundles()
public void addKey(java.lang.String key)
key
- the name of the key to be added
PRE: key is not null
POST: key is added to root bundlepublic Project.Config getConfig()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |