com.japisoft.xmlpad.editor
Class DefaultEditor

java.lang.Object
  extended bycom.japisoft.xmlpad.editor.DefaultEditor
All Implemented Interfaces:
Editor

public class DefaultEditor
extends java.lang.Object
implements Editor

Here the DefaultEditor for the EditorModel. This Editor will edit any Text node. All other node will be refused.

Author:
(c) 2003 JAPISOFT / A.Brillant

Constructor Summary
DefaultEditor()
           
 
Method Summary
 boolean accept(com.japisoft.fastparser.node.SimpleNode node)
          Accept all text node : by checking isText
 void edit(EditorContext context)
          Edit a particular text context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEditor

public DefaultEditor()
Method Detail

accept

public boolean accept(com.japisoft.fastparser.node.SimpleNode node)
Accept all text node : by checking isText

Specified by:
accept in interface Editor
Returns:
true when this editor accepts to edit this node

edit

public void edit(EditorContext context)
Description copied from interface: Editor
Edit a particular text context. This context contains the current text and node to edit. You must call the setResult once you terminate the custom editing part. If you don't want to edit it, just write a null result.

Specified by:
edit in interface Editor
Parameters:
context - Editing context