com.cbse.jeasy
Class JEEditorPane

java.lang.Object
  extended by com.cbse.jeasy.JEObject
      extended by com.cbse.jeasy.JEEditorPane
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener, javax.swing.event.HyperlinkListener

public class JEEditorPane
extends JEObject
implements javax.swing.event.HyperlinkListener, java.awt.event.KeyListener

A class using a JEditorPane to build an Outputfield for text.

Properties
name values comment
id * Id of the object. Let it begin with EP_
url   A string containing a URL specification.
text   Text to initialize the EditorPane.
scrollpane true
false
When set to true, the panel will be scrollable.
contenttype   Mime type of the text.
tooltip   Text in Tooltip
mandatory true
false
Defines an entry as mandatory
background   Id of a color used as the background
foreground   Id of a color used as the foreground
* = property you have to set; bold = default value

Version:
%I%, %G%
Author:
H.Pfohl

Field Summary
 
Fields inherited from class com.cbse.jeasy.JEObject
DEVELOPPING, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_TIME, INPUT_ERRORS, NO_INPUT_ERROR, RUNNING
 
Constructor Summary
JEEditorPane(java.lang.String s)
          Reads the properties from a string.
 
Method Summary
 void clear()
          Clears the Text
 int examine()
          Checks and formats the entry of the textfield.
 int examine(java.lang.String s)
           
 boolean getAntialiasing()
          Gets the anialialising flag
 java.awt.Color getBackground()
          Gets the Color object
 javax.swing.JComponent getComponent()
          Gets the JComponent based on this JEasy Object
 javax.swing.JEditorPane getEditorPane()
          Returns the JEditorPane object
 java.awt.Color getForeground()
          Gets the Color object
 java.lang.String getText()
          Returns the text contained in this TextComponent in terms of the content type of this editor.
 java.lang.String getToolTip()
          Gets the toolTipText
 java.lang.String getXMLtag()
          Gets the XMLtag.
 void hyperlinkUpdate(javax.swing.event.HyperlinkEvent e)
          Notification of a change relative to a hyperlink.
 boolean isMandatory()
          Return if an entry is mandatory
 void JEadd(java.awt.Container co, java.awt.LayoutManager lm)
          Adds the Component to a Container.
 void JEadd(java.lang.String border, java.awt.Container co)
          Adds the JEObject to a Container with a BorderLayout
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
protected  void linkActivated(java.net.URL u)
          Follows the reference in an link.
 void setEditable(boolean b)
          Allow a field to be editable
 void setMandatory(boolean b)
          Sets the entry mandatory or not
 void setPage(java.lang.String surl)
          Sets the current URL beeing displayed.
 void setText(java.lang.String text)
          Sets the text of this TextComponent to the specified content, which is expected to be in the format of the content type of this editor.
 void setXMLtag(java.lang.String s)
          Sets the XMLtag
 void start()
          Creates the jfc components using the properties
 
Methods inherited from class com.cbse.jeasy.JEObject
backupEntry, deserializeValue, getApplet, getApplLocale, getCenter, getEast, getElementAt, getElementSize, getId, getJCallBack, getJClass, getLabel, getMode, getName, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, isEditable, isEnabled, isEnterprise, isProfessional, isStandard, isVisible, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, restoreEntry, serializeValue, setApplet, setApplLocale, setEditable, setEnabled, setEnabled, setFocus, setJCallBack, setMarkable, setMarkable, setMode, setObjLocale, setParentId, setPreview, setProjectDirectory, setProperty, setStarted, setVisible, setVisible, wasEntryChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JEEditorPane

public JEEditorPane(java.lang.String s)
Reads the properties from a string.

Parameters:
s - contains properties and values
See Also:
JE#PropertyString
Method Detail

getText

public java.lang.String getText()
Returns the text contained in this TextComponent in terms of the content type of this editor.

Returns:
text

getEditorPane

public javax.swing.JEditorPane getEditorPane()
Returns the JEditorPane object

Returns:
editorpane

getComponent

public javax.swing.JComponent getComponent()
Gets the JComponent based on this JEasy Object

Overrides:
getComponent in class JEObject
Returns:
JComponent

getXMLtag

public java.lang.String getXMLtag()
Gets the XMLtag. Returns the id if no XMLtag is specified

Overrides:
getXMLtag in class JEObject
Returns:
String

setEditable

public void setEditable(boolean b)
Allow a field to be editable

Overrides:
setEditable in class JEObject

setMandatory

public void setMandatory(boolean b)
Sets the entry mandatory or not


isMandatory

public boolean isMandatory()
Return if an entry is mandatory


setXMLtag

public void setXMLtag(java.lang.String s)
Sets the XMLtag


setText

public void setText(java.lang.String text)
Sets the text of this TextComponent to the specified content, which is expected to be in the format of the content type of this editor.


getAntialiasing

public boolean getAntialiasing()
Gets the anialialising flag


getForeground

public java.awt.Color getForeground()
Gets the Color object


getBackground

public java.awt.Color getBackground()
Gets the Color object


setPage

public void setPage(java.lang.String surl)
Sets the current URL beeing displayed.


getToolTip

public java.lang.String getToolTip()
Gets the toolTipText

Returns:
String

clear

public void clear()
Clears the Text

Overrides:
clear in class JEObject

examine

public int examine()
Checks and formats the entry of the textfield. Usefull to format a field that was set by the program

Returns:
JEObject.INPUT_ERROR_xxx

examine

public int examine(java.lang.String s)

start

public void start()
Creates the jfc components using the properties

Overrides:
start in class JEObject
See Also:
JE#start

JEadd

public void JEadd(java.awt.Container co,
                  java.awt.LayoutManager lm)
Adds the Component to a Container.

Overrides:
JEadd in class JEObject

JEadd

public void JEadd(java.lang.String border,
                  java.awt.Container co)
Description copied from class: JEObject
Adds the JEObject to a Container with a BorderLayout

Overrides:
JEadd in class JEObject

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener

hyperlinkUpdate

public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent e)
Notification of a change relative to a hyperlink.

Specified by:
hyperlinkUpdate in interface javax.swing.event.HyperlinkListener

linkActivated

protected void linkActivated(java.net.URL u)
Follows the reference in an link. The given url is the requested reference. By default this calls setPage , and if an exception is thrown the original previous document is restored and a beep sounded. If an attempt was made to follow a link, but it represented a malformed url, this method will be called with a null argument.

Parameters:
u - the URL to follow