www.element4solution.com

e4s.translate
Class E4LabelNone

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.E4HtmlObject
          extended by e4s.html.E4HtmlElementGeneral
              extended by e4s.translate.E4LabelNone
All Implemented Interfaces:
E4HtmlElement_Intf, E4Label_Intf

public class E4LabelNone
extends E4HtmlElementGeneral
implements E4HtmlElement_Intf, E4Label_Intf

Dummy translation object, causes no translation

Since:
JDK 1.4
See Also:
E4LabelData, E4LabelSys, E4LabelNone

Field Summary
static E4LabelNone LabelNone_Empty
          A label none using NBSP
static E4LabelNone LabelNone_NBSP
          A label none using NBSP
 
Fields inherited from class e4s.html.E4HtmlElementGeneral
m_elements, m_needed_scripts
 
Fields inherited from class e4s.html.E4HtmlObject
m_parent_e4sID
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
E4LabelNone()
           
E4LabelNone(char ch)
           
E4LabelNone(E4Label_Intf label)
           
E4LabelNone(E4String s)
           
E4LabelNone(long num)
           
E4LabelNone(java.lang.String s)
           
E4LabelNone(java.lang.String s, boolean avoid_label_encoding)
           
E4LabelNone(java.lang.Throwable t)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
           
 java.lang.Object clone()
           
 void collectTranslationsForEditing(E4TranslationsVec v, E4ServletImplementation_Intf servlet)
          Build a list (Vector) with translation texts used so far during display of this page.
 int compareTo(Language dest_lang, E4Label_Intf val2)
          Compare the translated results with those of another label.
 void disableLabelEncoding()
          This enables to use HTML-tags (which normally are replaced) to be used as labels for input fields.
 java.lang.String getDest()
          Same as getSource().
 java.lang.String getDest(Language language)
          Same as getSource().
 java.lang.String getDest(Language language, boolean dummy)
          Same as getSource().
 java.lang.String getSource()
          Get the source string used in the program code.
 int getType()
          Get the type for the translation.
 boolean isLabelEncodingDisabled()
          State of the disabling of the replacement for HTML tags.
 void setForceEncode()
          Force to explicit call E4Util._encodeHtml(String) before rendering the translated text.
 boolean shallHaveTranslation()
          Check, if this object shall have an translation.
 boolean showUntranslatedInBrackets()
          Retrieve the current state for the display behavior for non-translated items.
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 java.lang.String toString()
           
 
Methods inherited from class e4s.html.E4HtmlElementGeneral
addScript, addScript, addScript, addStyleForEditing, addTranslationForEditing, buildStyleAttribute, buildStyleClassReference, collectScripts, collectStylesForEditing, collectStylesForEditing, collectStylesForEditing, collectTranslationsForEditing, createScript, createScript, debugToString, findElement, findElement, findElement, findElement, getElements, getElementsVec, getField, getId, getLastElement, getStringContent, getStyle, getSTYLE, getStyle, hasScripts, hasSTYLE, isContentClass, isE4InputField_Intf, openTag, removeAll, removeElementById, removeElements, removeElements, removeStyle, setId, setReadOnly, setStyle, setStyle, setSTYLE, setValue, Style, Style, toHtml_hidden, validate
 
Methods inherited from class e4s.html.E4HtmlObject
E4ID, E4ID, set_e4sID
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LabelNone_NBSP

public static E4LabelNone LabelNone_NBSP
A label none using NBSP


LabelNone_Empty

public static E4LabelNone LabelNone_Empty
A label none using NBSP

Constructor Detail

E4LabelNone

public E4LabelNone()

E4LabelNone

public E4LabelNone(java.lang.String s,
                   boolean avoid_label_encoding)

E4LabelNone

public E4LabelNone(java.lang.String s)

E4LabelNone

public E4LabelNone(E4String s)

E4LabelNone

public E4LabelNone(long num)

E4LabelNone

public E4LabelNone(char ch)

E4LabelNone

public E4LabelNone(E4Label_Intf label)

E4LabelNone

public E4LabelNone(java.lang.Throwable t)
Method Detail

shallHaveTranslation

public boolean shallHaveTranslation()
Check, if this object shall have an translation.

Specified by:
shallHaveTranslation in interface E4Label_Intf
Returns:
false

getType

public int getType()
Get the type for the translation.

Specified by:
getType in interface E4Label_Intf
Returns:
E4Label.TRANS_TYPE_NONE
See Also:
E4Label.TRANS_TYPE_APP, E4Label.TRANS_TYPE_SYS, E4Label.TRANS_TYPE_NONE

getDest

public java.lang.String getDest(Language language)
Same as getSource().

Specified by:
getDest in interface E4Label_Intf
Returns:
the source String
See Also:
E4Label_Intf.getSource(), #getDest(boolean)

getDest

public java.lang.String getDest()
Same as getSource().

Returns:
the source String

getDest

public java.lang.String getDest(Language language,
                                boolean dummy)
Same as getSource().

Specified by:
getDest in interface E4Label_Intf
Parameters:
dummy - has no relevance here
Returns:
the source String
See Also:
E4Label_Intf.getSource(), E4Label_Intf.getDest(e4s.application.Language)

getSource

public java.lang.String getSource()
Description copied from interface: E4Label_Intf
Get the source string used in the program code. If it is part of a text used in the program code, then this text is either in the language E4ModuleImplementation.getLanguage_Sys() if it is part of the core e4s funtionality, or it can be of type E4ModuleImplementation.getLanguage_App() when it is part of the application based on the system (this means a layer "above" the system).

Specified by:
getSource in interface E4Label_Intf
See Also:
E4Label_Intf.getDest(e4s.application.Language)

toString

public java.lang.String toString()
Overrides:
toString in class E4Object

compareTo

public int compareTo(Language dest_lang,
                     E4Label_Intf val2)
Compare the translated results with those of another label.

Specified by:
compareTo in interface E4Label_Intf
Returns:
the value 0 if the argument label is equal to this label; a value less than 0 if this label is lexicographically less than the label argument; and a value greater than 0 if this label is lexicographically greater than the label argument.

toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
Description copied from interface: E4HtmlElement_Intf
Create the HTML output for this element. Also run throught all child elements, and call their E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function to generate output of those objects which becomes appended. Normally, there is no need to call this function anyway, and this also might result in side effects of too-early relasing of objects in some cases. This function is called by E4ServletImplementation_Intf.write(e4s.html.E4HtmlElement) on the top level HTML element (common this is a HTML or BODY element) and branches down to all child elements.

Specified by:
toHtml in interface E4HtmlElement_Intf
Overrides:
toHtml in class E4HtmlElementGeneral
servlet - the servlet environment currently running in
Throws:
java.lang.Exception

showUntranslatedInBrackets

public boolean showUntranslatedInBrackets()
Retrieve the current state for the display behavior for non-translated items. By default, if a translation is not found then the text will be displayed in original text and language instead of the translated text. To give the user a feedback about this missing translation, the non-translated text in original language in this case will be displayed included in [ ] brackets.

Returns:
false always.

disableLabelEncoding

public void disableLabelEncoding()
This enables to use HTML-tags (which normally are replaced) to be used as labels for input fields.

See Also:
E4InputField.setLabel(e4s.translate.E4Label_Intf), isLabelEncodingDisabled()

isLabelEncodingDisabled

public boolean isLabelEncodingDisabled()
State of the disabling of the replacement for HTML tags.

Returns:
false if tags in HTML tags will be replaced (default) or true if tags still are carried forward to input labeling
See Also:
E4InputField.setLabel(e4s.translate.E4Label_Intf), disableLabelEncoding()

collectTranslationsForEditing

public void collectTranslationsForEditing(E4TranslationsVec v,
                                          E4ServletImplementation_Intf servlet)
Description copied from class: E4HtmlElementGeneral
Build a list (Vector) with translation texts used so far during display of this page. Run throught all subclasses elements and collect their texts as well. Note, that a text will only be added one time. The Vector contains elements of class E4Label.

Specified by:
collectTranslationsForEditing in interface E4HtmlElement_Intf
Overrides:
collectTranslationsForEditing in class E4HtmlElementGeneral
Parameters:
v - the Vector where the styles will be collected, may not be null
servlet - the current servlet instance
See Also:
E4Label_Intf

clone

public java.lang.Object clone()
Specified by:
clone in interface E4Label_Intf
Overrides:
clone in class java.lang.Object

_getSVNVersionString

public static java.lang.String _getSVNVersionString()

setForceEncode

public void setForceEncode()
Description copied from interface: E4Label_Intf
Force to explicit call E4Util._encodeHtml(String) before rendering the translated text.

Specified by:
setForceEncode in interface E4Label_Intf

www.element4solution.com