|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
i18nplugin.PropertiesNode
public class PropertiesNode
A Properties-File
| Field Summary |
|---|
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Fields inherited from interface i18nplugin.LanguageNodeIf |
|---|
STATE_MISSING_TRANSLATION, STATE_NON_WELLFORMED, STATE_NON_WELLFORMED_ARG_COUNT, STATE_NON_WELLFORMED_ARG_FORMAT, STATE_NON_WELLFORMED_PUNCTUATION_END, STATE_OK |
| Constructor Summary | |
|---|---|
PropertiesNode(JarFile jarfile,
JarEntry entry)
Create the Properties-File |
|
| Method Summary | |
|---|---|
boolean |
containsKey(Locale locale,
String key)
Checks if a key is available in a locale |
TreeNode |
getChildAfter(TreeNode child)
|
TreeNode |
getChildAt(int index)
|
TreeNode |
getChildBefore(TreeNode child)
|
int |
getChildCount()
|
int |
getIndex(TreeNode child)
|
int |
getMatchCount()
Returns the total number of matches in all sub nodes. |
String |
getPropertyValue(Locale locale,
String key)
This method returns a specific value for a key |
String |
getPropertyValue(String key)
This method returns the default value for a key. |
void |
insert(MutableTreeNode newChild,
int childIndex)
|
boolean |
isLeaf()
|
boolean |
matches()
Returns true if the node (or any sub node) matches the filter. |
void |
save()
Saves all changes to the User-Directory |
void |
setFilter(Locale locale,
String filter)
Sets a new filter. |
void |
setPropertyValue(Locale locale,
String key,
String value)
Set the Property-Value. |
void |
storeSorted(Properties prop,
OutputStream out,
String comments)
Writes this property list (key and element pairs) in this Properties table to the output stream in a format suitable
for loading into a Properties table using the
load method. |
int |
translationStateFor(Locale locale)
This method returns the translation state, if all translations are available for a certain locale. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesNode(JarFile jarfile,
JarEntry entry)
jarfile - Jar-File that contains the Entryentry - Property-File| Method Detail |
|---|
public void insert(MutableTreeNode newChild,
int childIndex)
insert in interface MutableTreeNodeinsert in class DefaultMutableTreeNodepublic String getPropertyValue(String key)
key - key to get property for
public String getPropertyValue(Locale locale,
String key)
locale - get value for this localekey - get value for this key
public void setPropertyValue(Locale locale,
String key,
String value)
locale - key - value -
public boolean containsKey(Locale locale,
String key)
locale - key -
public int translationStateFor(Locale locale)
LanguageNodeIf
translationStateFor in interface LanguageNodeIflocale - Locale
public void save()
throws IOException
LanguageNodeIf
save in interface LanguageNodeIfIOException - saving went wrong
public void storeSorted(Properties prop,
OutputStream out,
String comments)
throws IOException
Properties table to the output stream in a format suitable
for loading into a Properties table using the
load method.
The stream is written using the ISO 8859-1 character encoding.
Properties from the defaults table of this Properties
table (if any) are not written out by this method.
If the comments argument is not null, then an ASCII #
character, the comments string, and a line separator are first written
to the output stream. Thus, the comments can serve as an
identifying comment.
Next, a comment line is always written, consisting of an ASCII
# character, the current date and time (as if produced
by the toString method of Date for the
current time), and a line separator as generated by the Writer.
Then every entry in this Properties table is
written out, one per line. For each entry the key string is
written, then an ASCII =, then the associated
element string. Each character of the key and element strings
is examined to see whether it should be rendered as an escape
sequence. The ASCII characters \, tab, form feed,
newline, and carriage return are written as \\,
\t, \f \n, and
\r, respectively. Characters less than
\u0020 and characters greater than
\u007E are written as
\uxxxx for the appropriate hexadecimal
value xxxx. For the key, all space characters are
written with a preceding \ character. For the
element, leading space characters, but not embedded or trailing
space characters, are written with a preceding \
character. The key and element characters #,
!, =, and : are written
with a preceding backslash to ensure that they are properly loaded.
After the entries have been written, the output stream is flushed. The output stream remains open after this method returns.
out - an output stream.comments - a description of the property list.
IOException - if writing this property list to the specified
output stream throws an IOException.
ClassCastException - if this Properties object
contains any keys or values that are not Strings.
NullPointerException - if out is null.public boolean isLeaf()
isLeaf in interface TreeNodeisLeaf in class DefaultMutableTreeNodepublic int getMatchCount()
FilterNodeIf
getMatchCount in interface FilterNodeIfpublic boolean matches()
FilterNodeIf
matches in interface FilterNodeIf
public void setFilter(Locale locale,
String filter)
FilterNodeIf
setFilter in interface FilterNodeIflocale - - the local to check.filter - - the filter value to check for.public int getChildCount()
getChildCount in interface TreeNodegetChildCount in class DefaultMutableTreeNodepublic TreeNode getChildAt(int index)
getChildAt in interface TreeNodegetChildAt in class DefaultMutableTreeNodepublic int getIndex(TreeNode child)
getIndex in interface TreeNodegetIndex in class DefaultMutableTreeNodepublic TreeNode getChildAfter(TreeNode child)
getChildAfter in class DefaultMutableTreeNodepublic TreeNode getChildBefore(TreeNode child)
getChildBefore in class DefaultMutableTreeNode
|
TV-Browser 2.7.5 API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||