Methods Summary |
---|
public void | addListener(LocaleListener l)
if ( listeners == null ){
listeners = new ArrayList();
COConfigurationManager.addParameterListener(
"locale.set.complete.count",
new ParameterListener()
{
public void
parameterChanged(
String parameterName )
{
for (int i=0;i<listeners.size();i++){
try{
((LocaleListener)listeners.get(i)).localeChanged( MessageText.getCurrentLocale());
}catch( Throwable e ){
Debug.printStackTrace(e);
}
}
}
});
}
listeners.add( l );
|
public java.util.Locale | getCurrentLocale()
return MessageText.getCurrentLocale();
|
public LocaleDecoder[] | getDecoders()
LocaleUtilDecoder[] decs = LocaleUtil.getSingleton().getDecoders();
LocaleDecoder[] res = new LocaleDecoder[decs.length];
for (int i=0;i<res.length;i++){
res[i] = new LocaleDecoderImpl( decs[i] );
}
return( res );
|
public java.lang.String | getLocalisedMessageText(java.lang.String key)
return( MessageText.getString( key ));
|
public java.lang.String | getLocalisedMessageText(java.lang.String key, java.lang.String[] params)
return( MessageText.getString( key, params ));
|
public void | integrateLocalisedMessageBundle(java.lang.String resource_bundle_prefix)
MessageText.integratePluginMessages(resource_bundle_prefix,pi.getPluginClassLoader());
|
public void | integrateLocalisedMessageBundle(java.util.ResourceBundle rb)
MessageText.integratePluginMessages(rb);
|
public void | integrateLocalisedMessageBundle(java.util.Properties p)
// Surely there's a more convenient way of doing this?
ResourceBundle rb = null;
try {
PipedInputStream in_stream = new PipedInputStream();
PipedOutputStream out_stream = new PipedOutputStream(in_stream);
p.store(out_stream, "");
out_stream.close();
rb = new PropertyResourceBundle(in_stream);
in_stream.close();
}
catch (IOException ioe) {return;}
integrateLocalisedMessageBundle(rb);
|
public void | removeListener(LocaleListener l)
if ( listeners == null ){
return;
}
listeners.remove(l);
|