|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.quartzware.ResBundle
Encapsulates the data and functions of a 'resource bundle'.
Constructor Summary | |
ResBundle(Entry[] entries,
java.lang.String suffix,
java.io.File file,
boolean loose)
Constructs a ResBundle from the given array of entries |
|
ResBundle(java.lang.String suffix,
java.io.File file,
boolean loose)
Default Constructor PRE: none POST: This class is created |
|
ResBundle(java.lang.String suffix,
java.io.File file,
boolean loose,
boolean unique)
Constructs a ResBundle from the given vector of entries |
Method Summary | |
void |
addEntry(Entry ent)
Adds a new key to this ResBundle |
void |
addRBListener(RBListener list)
Adds a listener. |
void |
doSetup()
Perform setup that is required regardless of the constructor that was used. |
void |
entryAdded(RBEvent rbe)
|
void |
entryChanged(RBEvent rbe)
Called when one of my parent's entries was changed. |
void |
entryInserted(RBEvent rbe)
|
void |
entryRemoved(RBEvent rbe)
|
void |
fireEntryAdded(Entry ent,
int index)
fires an update to all listeners. |
void |
fireEntryChanged(Entry ent,
int index)
fires an update to all listeners. |
void |
fireEntryInserted(Entry ent,
int index)
fires an update to all listeners. |
void |
fireEntryRemoved(Entry ent,
int index)
fires an update to all listeners. |
java.util.Vector |
getAllEntries()
Returns all entries held by this ResBundle |
Entry |
getEntry(int idx)
Returns the nth entry held by this ResBundle |
java.io.File |
getFile()
Gets the filename of this ResBundle |
Entry |
getParentEntry(java.lang.String key)
Returns all entries held by this ResBundle |
int |
getRBListenerCount()
Returns the number of listeners PRE: none POST: none |
java.lang.String |
getSuffix()
Returns suffix of this ResBundle |
void |
insertEntryAt(Entry ent,
int index)
Inserts a key to this ResBundle |
boolean |
isDirty()
Returns whether this editor window has been modified |
boolean |
isLooseFile()
Returns whether this EditorWindow represents a loose file. |
int |
removeEntry(java.lang.String key)
Removes the entry corresponding to 'key' from this resbundle. |
void |
remRBListener(RBListener list)
Removes a listener. |
void |
setDirty(boolean modified)
Sets whether this editor window has been modified |
void |
setEditorWindow(EditorWindow ew)
Tell this EditorWindow who its parent is. |
void |
setFile(java.io.File file)
Sets the filename of this ResBundle |
void |
setLooseFile(boolean loose)
Sets whether this EditorWindow represents a loose file. |
void |
setSuffix(java.lang.String sfx)
Sets the suffix of this ResBundle |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ResBundle(java.lang.String suffix, java.io.File file, boolean loose)
public ResBundle(Entry[] entries, java.lang.String suffix, java.io.File file, boolean loose)
entries
- an array of entries from which to create this ResBundle
PRE: entries does not equal null
POST: this class is createdpublic ResBundle(java.lang.String suffix, java.io.File file, boolean loose, boolean unique)
entries
- a vector of entries from which to create this ResBundle
PRE: entries does not equal null
POST: this class is createdMethod Detail |
public void doSetup()
public java.lang.String getSuffix()
public void setSuffix(java.lang.String sfx)
sfx
- the suffix to set
PRE: sfx is not null
POST: suffix is setpublic java.io.File getFile()
public void setFile(java.io.File file)
the
- new filename of this ResBundle
PRE: file is not null
POST: nonepublic boolean isDirty()
public void setDirty(boolean modified)
whether
- this editor window has been modified
PRE: none
POST: if set to true, this bundle will be saved next time save is pressedpublic boolean isLooseFile()
public void setLooseFile(boolean loose)
public Entry getParentEntry(java.lang.String key)
public void addRBListener(RBListener list)
list
- the listener to add.
PRE: list != null
POST: list may receive update events.public void remRBListener(RBListener list)
list
- the listener to remove.
PRE: list != null
POST: list will no longer receive update noticespublic void fireEntryAdded(Entry ent, int index)
public void fireEntryInserted(Entry ent, int index)
public void fireEntryRemoved(Entry ent, int index)
public void fireEntryChanged(Entry ent, int index)
public int getRBListenerCount()
public java.util.Vector getAllEntries()
public Entry getEntry(int idx)
idx
- the index of the entry to returnpublic int removeEntry(java.lang.String key)
entries
- an array of entries from which to create this ResBundlepublic void setEditorWindow(EditorWindow ew)
ew
- The parent
PRE: none
POST: this class has a reference to its parent.public void addEntry(Entry ent)
key
- the key to add
PRE: e does not equal null
POST: the entry is added to this resource bundle.public void insertEntryAt(Entry ent, int index)
key
- the key to add
PRE: ent does not equal null
POST: the entry is added to this resource bundle.public void entryAdded(RBEvent rbe)
entryAdded
in interface RBListener
public void entryInserted(RBEvent rbe)
entryInserted
in interface RBListener
public void entryRemoved(RBEvent rbe)
entryRemoved
in interface RBListener
public void entryChanged(RBEvent rbe)
entryChanged
in interface RBListener
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |