Lines Matching refs:code
43 <code>String</code> for example, your program can load it from the
45 this way, you can write program code that is largely independent of
63 that supports <code>XResourceBundle</code>. Each related service of
64 <code>XResourceBundle</code> has the same base name plus an
66 your resource bundle is named <code>MyResources</code>. The first
68 which has the same name as its family--<code>MyResources</code>. You
72 <code>MyResources_de</code>.
75 Each related implementation of <code>XResourceBundle</code> contains
77 represented by that <code>XResourceBundle</code> implementation. For
78 example, both <code>MyResources</code> and <code>MyResources_de</code>
79 may have a <code>String</code> that is used on a button for
80 confirming operations. In <code>MyResources</code> the
81 <code>String</code> may contain <code>OK</code> and in
82 <code>MyResources_de</code> it may contain <code>Gut</code>.
86 can make specializations: for example, <code>MyResources_de_CH</code>
93 the <code>XResourceBundle</code> implementation using the
102 indicates the desired locale. <code>getBundle</code> uses these two
103 arguments to construct the name of the <code>ResourceBundle</code>
131 <code>getBundle()</code> throws a
132 <code>MissingResourceException</code>.
135 example, <code>myPackage::MyResources</code>, not just
136 <code>MyResources</code>).
140 example of a <code>XResourceBundle</code> implementation that contains
157 <p>Keys are always <code>String</code>s. In this example, the keys
158 are <code>OkKey</code> and <code>CancelKey</code>. In the above
159 example, the values are also <code>String</code>s--<code>OK</code>
160 and <code>Cancel</code>--but they do not have to be. The values can
164 get method. Because <code>OkKey</code> and <code>CancelKey</code>
165 are both strings, you use <code>getByName</code> to retrieve them:
186 <code>ResourceBundle</code>s. For example, you could have a set of
187 bundles for exception messages, <code>ExceptionResources</code>
188 (<code>ExceptionResources_fr</code>, <code>ExceptionResources_de</code>, ...),
189 and one for widgets, <code>WidgetResource</code> (<code>WidgetResources_fr</code>,
190 <code>WidgetResources_de</code>, ...); breaking up the resources however you like.