com.japisoft.xmlappkit.editor
Interface XMLEditor

All Known Implementing Classes:
AbstractXMLEditor

public interface XMLEditor

This is the main interface for managing an XMLEditor inside the XMLAppContainer.

When firstly this editor is used, the init method is called, after for each starting and ending usage, respectively the methods start and stop will be called. The start method will give piece of information about the current xml node, thus the editor will have the ability to update this node.

The editor is started because the user selects it from the main container and wants to edit an XML branch using it. This XML branch is available from the XMLEditingContext from the start method.

Version:
1.0
Author:
(c) 2004 JAPISoft
See Also:
XMLEditingContext

Method Summary
 XMLEditorActions getActions()
           
 XMLEditingChoice getEditingChoice()
           
 XMLEditorListeners getListeners()
           
 java.lang.String getName()
           
 XMLEditorUI getView()
          One important feature.
 void init()
          This is called once for initializing the editor
 void setEnabled(boolean enabled)
          Here a way for enabling/disabling this editor, the UI part can ignore this state
 void start(XMLEditingContext context)
          This is called each time we begin to use this editor
 void stop(XMLEditingContext context)
          This called when we stop to use this editor like alterning to another editor.
 

Method Detail

init

public void init()
This is called once for initializing the editor


start

public void start(XMLEditingContext context)
This is called each time we begin to use this editor

Parameters:
context - Give some information like the current editing node or the root node

stop

public void stop(XMLEditingContext context)
This called when we stop to use this editor like alterning to another editor. User can change the selected node and call the commit method for confirming, thus the XML document will be updated. Note that the commit must only be called once.


setEnabled

public void setEnabled(boolean enabled)
Here a way for enabling/disabling this editor, the UI part can ignore this state


getName

public java.lang.String getName()
Returns:
the name of this editor

getView

public XMLEditorUI getView()
One important feature. This view reference should'nt change during the XMLEditor life time meaning once you have built your view, always return the same object reference, so you must'nt rebuild this view each time this is asked

Returns:
the visible part of this editor. This is the view for the final user

getEditingChoice

public XMLEditingChoice getEditingChoice()
Returns:
the set of element that this editor wants to support. If a null value is returned, it means this editor managed any nodes

getActions

public XMLEditorActions getActions()
Returns:
a set of available actions. This editor can return null if it doesn't manage actions

getListeners

public XMLEditorListeners getListeners()
Returns:
a set of listeners. This editor can return null if it doesn't manage listeners