All Packages Class Hierarchy This Package Previous Next Index
Class multilizer.ServerDictionary
java.lang.Object
|
+----multilizer.Dictionary
|
+----multilizer.LoginDictionary
|
+----multilizer.ServerDictionary
- public class ServerDictionary
- extends LoginDictionary
A dictionary component that gets language and translation data from
Dictionary Server.
Set the URL
property to contain the host name (or IP address).
Set the User
and the Password
properties specify the user account of Dictionary Server.
Set the RemoteDictionaryName
property to contain the name of the dictionary.
Call the open
method to open the dictionary.
An example:
ServerDictionary dictionary = new ServerDictionary();
dictionary.setURL("www.multilizer.com");
dictionary.setRemoteDictionaryName("javadcalc");
dictionary.setUser("guest");
dictionary.setPassword("guest");
dictionary.open();
- See Also:
- DatabaseDictionary
-
ServerDictionary()
-
-
close()
- Closes the dictionary.
-
getLanguageCount()
- Gets the amount of the languages in the dictionary.
-
getLanguageData(int)
- Gets the specified language.
-
getPort()
- Gets the port of MDS.
-
getRemoteDictionaryName()
- Gets the name of the dictionary.
-
getTranslationCount()
- Returns the translation count.
-
languageChanged(boolean, boolean)
- Dictionary calls this method after the current language has been changed.
-
open()
- Opens the dictionary.
-
read()
- Returns the reply message from the server.
-
send(String)
- Sends the message to the server.
-
setPort(int)
- Sets the TCP/IP port of MDS.
-
setRemoteDictionaryName(String)
- Sets the name of the dictionary.
-
transaction(String)
- Makes a transaction to the server.
-
translateString(String)
- Returns the translation of the native string in the current language.
-
translateString(String, String, String)
- Returns the translation of the context sensitive native string in the current language.
ServerDictionary
public ServerDictionary()
getLanguageCount
public int getLanguageCount()
- Gets the amount of the languages in the dictionary.
- Overrides:
- getLanguageCount in class Dictionary
getLanguageData
public Language getLanguageData(int index)
- Gets the specified language.
- Overrides:
- getLanguageData in class Dictionary
getTranslationCount
public int getTranslationCount()
- Returns the translation count.
- Overrides:
- getTranslationCount in class Dictionary
translateString
protected String translateString(String str)
- Returns the translation of the native string in the current language.
- Overrides:
- translateString in class Dictionary
translateString
protected String translateString(String str,
String form,
String component)
- Returns the translation of the context sensitive native string in the current language.
- Overrides:
- translateString in class Dictionary
languageChanged
protected void languageChanged(boolean languageChanged,
boolean localeChanged)
- Dictionary calls this method after the current language has been changed.
- Overrides:
- languageChanged in class Dictionary
open
public void open()
- Opens the dictionary.
- Overrides:
- open in class Dictionary
close
public void close()
- Closes the dictionary.
- Overrides:
- close in class Dictionary
send
protected void send(String msg) throws IOException
- Sends the message to the server.
- Parameters:
- msg - the message to be sent
read
protected String read() throws IOException
- Returns the reply message from the server.
transaction
protected String transaction(String msg)
- Makes a transaction to the server. A transaction means sending a message
and waiting a reply for it.
- Parameters:
- msg - the message to be send
- Returns:
- the reply message from the server
setPort
public void setPort(int value)
- Sets the TCP/IP port of MDS. The default is 1099.
getPort
public int getPort()
- Gets the port of MDS.
setRemoteDictionaryName
public void setRemoteDictionaryName(String value)
- Sets the name of the dictionary.
getRemoteDictionaryName
public String getRemoteDictionaryName()
- Gets the name of the dictionary.
All Packages Class Hierarchy This Package Previous Next Index