cz.ponec.ppSee.api
Class Note

java.lang.Object
  extended bycz.ponec.ppSee.api.Note

public class Note
extends java.lang.Object

A representative of a language text. The class solves a problems about national characters, special HTML characters etc.


Field Summary
static byte FORMAT_HTM
          Output text has allowed HTML tags.
static byte FORMAT_HTM_FREE
          Output text must be HTML tag free.
static byte FORMAT_JS
          Format for Javascript.
static byte FORMAT_TIP
          Format for tooltip.
 
Constructor Summary
Note()
          Creates the empty instance of Note.
Note(Note note)
          Creates a new instance of Note.
Note(java.lang.String text)
          Creates a new instance of Note.
Note(java.lang.String text, boolean clearText)
          Creates a new instance of Note.
Note(java.lang.String text, byte format)
          Creates a new instance of Note.
 
Method Summary
 Note add(Note note)
          Concatenates the specified Note to the end of this Note.
 Note add(java.lang.Object note)
          Concatenates the specified Note to the end of this Note.
 byte getFormat()
          Returns a type of format for a target processing in future.
 Note getNoteClear()
          Returns the text for a HTML output like a HTML free.
 Note getNoteHtml()
          Output can contains with HTML tags.
 Note getNoteJs()
          Returns the text for a Javascript.
 Note getNoteTip()
          Returns the text for a tooltip.
 boolean isEmpty()
          Returns a true if the text is empty or if the text contains some blank characters only.
 boolean isNoted()
          Returns true, if text contains a NOTE formatting.
 java.lang.String toString()
          Get a text method.
 Note trim()
          Trim a text from left and right.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMAT_HTM

public static final byte FORMAT_HTM
Output text has allowed HTML tags.

See Also:
Constant Field Values

FORMAT_HTM_FREE

public static final byte FORMAT_HTM_FREE
Output text must be HTML tag free.

See Also:
Constant Field Values

FORMAT_JS

public static final byte FORMAT_JS
Format for Javascript. Sample: var="text".

See Also:
Constant Field Values

FORMAT_TIP

public static final byte FORMAT_TIP
Format for tooltip. Sample: tip="text>ok<".

See Also:
Constant Field Values
Constructor Detail

Note

public Note(java.lang.String text,
            byte format)
Creates a new instance of Note. (Parameter usageSimple is false.) You can use constans: FORMAT_TIP, FORMAT_JS, FORMAT_HTM_FREE or FORMAT_HTM .

Parameters:
text - A Language text (note).
format - A format for a future processing.
See Also:
FORMAT_TIP, FORMAT_JS, FORMAT_HTM_FREE, FORMAT_HTM

Note

public Note(java.lang.String text)
Creates a new instance of Note. A default format is FORMAT_HTM.

Parameters:
text - A Language text (note).

Note

public Note(Note note)
Creates a new instance of Note.


Note

public Note()
Creates the empty instance of Note.


Note

public Note(java.lang.String text,
            boolean clearText)
Creates a new instance of Note. (Parameter usageSimple is false.)

Parameters:
text - A Language text (note).
clearText - Set True, if the text does not contain a HTML tags. If the parameter is true the all special HTML characters will be converted.
Method Detail

isNoted

public boolean isNoted()
Returns true, if text contains a NOTE formatting.


add

public Note add(Note note)
Concatenates the specified Note to the end of this Note. Return creates a new object.

Parameters:
note - the Note that is concatenated to the end of this Note.
Returns:
a Note that represents the concatenation of this object's characters followed by the Note argument's characters.

add

public Note add(java.lang.Object note)
Concatenates the specified Note to the end of this Note. Return creates a new object.

Parameters:
note - the Note that is concatenated to the end of this Note. If parameter object does not have a String type, the method toString() is used.
Returns:
a Note that represents the concatenation of this object's characters followed by the Note argument's characters.

toString

public java.lang.String toString()
Get a text method.


getNoteTip

public Note getNoteTip()
Returns the text for a tooltip. An attribute Format is assigned to FORMAT_TIP. Sample: <... tip="text>ok<...".


getNoteJs

public Note getNoteJs()
Returns the text for a Javascript. Sample: var="text". An attribute Format is assigned to FORMAT_JS.


getNoteClear

public Note getNoteClear()
Returns the text for a HTML output like a HTML free. An attribute Format is assigned to FORMAT_HTM_FREE.


getNoteHtml

public Note getNoteHtml()
Output can contains with HTML tags. An attribute Format is assigned to FORMAT_HTML.


getFormat

public byte getFormat()
Returns a type of format for a target processing in future.

See Also:
FORMAT_TIP, FORMAT_JS, FORMAT_HTM_FREE, FORMAT_HTM

trim

public Note trim()
Trim a text from left and right.


isEmpty

public boolean isEmpty()
Returns a true if the text is empty or if the text contains some blank characters only.



Copyright © 2007 PPonec. All Rights Reserved.