net.quartzware
Class ResBundle

java.lang.Object
  |
  +--net.quartzware.ResBundle

public class ResBundle
extends java.lang.Object

Encapsulates the data and functions of a 'resource bundle'.


Field Summary
private  boolean dirty
           
private  java.util.Vector entries
           
private  EditorWindow parent
           
 
Constructor Summary
ResBundle()
          Default Constructor
ResBundle(Entry[] entries)
          Constructs a ResBundle from the given array of entries
ResBundle(java.util.Vector entries)
          Constructs a ResBundle from the given vector of entries
 
Method Summary
 void addKey(java.lang.String key)
          Adds a new key to this ResBundle
 void deleteKey(java.lang.String key)
          Removes the entry corresponding to 'key' from this resbundle.
 Entry getEntry(int idx)
          Returns the nth entry held by this ResBundle
 void hiliteEntry(int index)
          Highlights an entry.
 boolean isDirty()
          Returns whether or not this ResBundle has been modified since the last save
 void setDirty(boolean dirty)
          Tell this ResBundle whether it is dirty or not.
 void setEditorWindow(EditorWindow ew)
          Tell this EditorWindow who its parent is.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

entries

private java.util.Vector entries

dirty

private boolean dirty

parent

private EditorWindow parent
Constructor Detail

ResBundle

public ResBundle()
Default Constructor

ResBundle

public ResBundle(Entry[] entries)
Constructs a ResBundle from the given array of entries
Parameters:
entries - an array of entries from which to create this ResBundle

ResBundle

public ResBundle(java.util.Vector entries)
Constructs a ResBundle from the given vector of entries
Parameters:
entries - a vector of entries from which to create this ResBundle
Method Detail

getEntry

public Entry getEntry(int idx)
Returns the nth entry held by this ResBundle
Parameters:
idx - the index of the entry to return
Returns:
an Entry

deleteKey

public void deleteKey(java.lang.String key)
Removes the entry corresponding to 'key' from this resbundle.
Parameters:
entries - an array of entries from which to create this ResBundle

isDirty

public boolean isDirty()
Returns whether or not this ResBundle has been modified since the last save
Returns:
true if the ResBundle has been modified

setDirty

public void setDirty(boolean dirty)
Tell this ResBundle whether it is dirty or not.
Parameters:
dirty - the value to set dirty to.

hiliteEntry

public void hiliteEntry(int index)
Highlights an entry. Used by the FindDlg when a phrase has been found.
Parameters:
index - index of the Entry to highlight.

setEditorWindow

public void setEditorWindow(EditorWindow ew)
Tell this EditorWindow who its parent is.
Parameters:
ew - The parent

addKey

public void addKey(java.lang.String key)
Adds a new key to this ResBundle
Parameters:
key - the key to add