jeters.components
Class PlainText

java.lang.Object
  extended by jeters.components.PlainText
All Implemented Interfaces:
EditableText
Direct Known Subclasses:
MediaWikiText

public class PlainText
extends java.lang.Object
implements EditableText

a class implementing the minimum requirements for the EditableText-interface - and nothing else. It can easily be extended by more specialized classes.


Field Summary
protected  java.lang.String label
          a label for the text (compare the description of getLabel)
protected  java.lang.String text
          the text represented by the object
 
Constructor Summary
PlainText(java.lang.String text)
           
PlainText(java.lang.String text, java.lang.String label)
           
 
Method Summary
 java.lang.String getLabel()
          get the "label" of the text, i.e. some kind of name (title of wiki article, filename, ...)
 java.lang.String getText()
          get the text represented by this object
 void setLabel(java.lang.String newLabel)
          changes the label of the text
 void setText(java.lang.String newText)
          changes the text to a new String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

protected java.lang.String text
the text represented by the object


label

protected java.lang.String label
a label for the text (compare the description of getLabel)

Constructor Detail

PlainText

public PlainText(java.lang.String text)

PlainText

public PlainText(java.lang.String text,
                 java.lang.String label)
Method Detail

getText

public java.lang.String getText()
Description copied from interface: EditableText
get the text represented by this object

Specified by:
getText in interface EditableText
Returns:
this text as a String

setText

public void setText(java.lang.String newText)
Description copied from interface: EditableText
changes the text to a new String

Specified by:
setText in interface EditableText
Parameters:
newText - the String containing the new text

getLabel

public java.lang.String getLabel()
Description copied from interface: EditableText
get the "label" of the text, i.e. some kind of name (title of wiki article, filename, ...)

Specified by:
getLabel in interface EditableText
Returns:
the label of this text as a String

setLabel

public void setLabel(java.lang.String newLabel)
Description copied from interface: EditableText
changes the label of the text

Specified by:
setLabel in interface EditableText
Parameters:
newLabel - the String containing the new label