com.japisoft.xmlpad.helper.model
Class AbstractTagHelper

java.lang.Object
  extended bycom.japisoft.xmlpad.helper.model.AbstractHelper
      extended bycom.japisoft.xmlpad.helper.model.AbstractTagHelper
All Implemented Interfaces:
Helper, TagHelper
Direct Known Subclasses:
StaticTagHelper, SystemHelper

public abstract class AbstractTagHelper
extends AbstractHelper
implements TagHelper

Abstract class for tag helper, this class is a facility for managing TagDescriptor

Author:
(c) 2003 JAPISOFT
See Also:
TagDescriptor, TagHelper

Field Summary
 boolean addedSystemTag
           
protected  int currentDocumentLocation
           
protected  SimpleNode currentDocumentNode
           
protected  java.lang.String lastLocation
           
protected  java.lang.String location
           
protected  java.lang.String[] locationPath
           
 
Fields inherited from class com.japisoft.xmlpad.helper.model.AbstractHelper
editor, namespace, WIN
 
Constructor Summary
AbstractTagHelper()
           
 
Method Summary
protected  boolean addSystemTag()
           
 TagDescriptor addTag(java.lang.String name, AttDescriptor[] att, boolean empty)
           
 TagDescriptor addTagDescriptor(TagDescriptor tag)
          add a new descriptor
protected  void completeContentForElementWithoutPrefix()
          Particular case with DTD and namespace
 void fillList(SimpleNode node, javax.swing.DefaultListModel model)
           
protected  void flush()
          Reset all tags
 AttributeHelper getAttributeHelperForNode(SimpleNode node)
           
protected  java.lang.String getLostCharacter()
           
 java.lang.String getSource()
           
 TagDescriptor[] getTags()
           
 java.lang.String getTitle()
           
 boolean hasElements()
           
protected  void notifyLocation()
          Prepare for tag list for the current location
 void setLocation(SimpleNode locatedNode, int offset)
          Set the current location
 void setSource(java.lang.String source)
          Reset the schema initial source
protected  SimpleNode translateNode(SimpleNode located)
           
 
Methods inherited from class com.japisoft.xmlpad.helper.model.AbstractHelper
dispose, getListCellRenderer, getNamespace, insertResult, prepareDocumentBeforeInserting, setEditor, setNamespace, show, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.japisoft.xmlpad.helper.model.TagHelper
getTag, setNamespace
 
Methods inherited from interface com.japisoft.xmlpad.helper.model.Helper
dispose, getNamespace, setEditor, show
 

Field Detail

locationPath

protected java.lang.String[] locationPath

location

protected java.lang.String location

lastLocation

protected java.lang.String lastLocation

currentDocumentNode

protected SimpleNode currentDocumentNode

currentDocumentLocation

protected int currentDocumentLocation

addedSystemTag

public boolean addedSystemTag
Constructor Detail

AbstractTagHelper

public AbstractTagHelper()
Method Detail

addTag

public TagDescriptor addTag(java.lang.String name,
                            AttDescriptor[] att,
                            boolean empty)

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface Helper
Overrides:
getTitle in class AbstractHelper

translateNode

protected SimpleNode translateNode(SimpleNode located)

setLocation

public void setLocation(SimpleNode locatedNode,
                        int offset)
Set the current location

Specified by:
setLocation in interface TagHelper
Overrides:
setLocation in class AbstractHelper

completeContentForElementWithoutPrefix

protected void completeContentForElementWithoutPrefix()
Particular case with DTD and namespace


notifyLocation

protected void notifyLocation()
Prepare for tag list for the current location


getAttributeHelperForNode

public AttributeHelper getAttributeHelperForNode(SimpleNode node)
Returns:
the attribute helper for this node

addTagDescriptor

public TagDescriptor addTagDescriptor(TagDescriptor tag)
Description copied from interface: TagHelper
add a new descriptor

Specified by:
addTagDescriptor in interface TagHelper

flush

protected void flush()
Reset all tags


hasElements

public boolean hasElements()
Overrides:
hasElements in class AbstractHelper
Returns:
true if this helper has elements

getTags

public TagDescriptor[] getTags()
Specified by:
getTags in interface TagHelper
Returns:
available tags

addSystemTag

protected boolean addSystemTag()

fillList

public void fillList(SimpleNode node,
                     javax.swing.DefaultListModel model)
Overrides:
fillList in class AbstractHelper

getLostCharacter

protected java.lang.String getLostCharacter()
Overrides:
getLostCharacter in class AbstractHelper

setSource

public void setSource(java.lang.String source)
Reset the schema initial source


getSource

public java.lang.String getSource()
Specified by:
getSource in interface TagHelper
Returns:
the schema initial source


Copyright © 2006 JAPISoft. All Rights Reserved.