com.japisoft.xmlpad.helper.model
Class AbstractHelper

java.lang.Object
  extended bycom.japisoft.xmlpad.helper.model.AbstractHelper
All Implemented Interfaces:
Helper
Direct Known Subclasses:
AbstractEntityHelper, AbstractTagHelper, AttributeHelper, AttributeValuesHelper

public class AbstractHelper
extends java.lang.Object
implements Helper

Common helper class

UIManager properties :

 -xmlpad.helper.backgroundColor - xmlpad.helper.foregroundColor
 		- xmlpad.helper.selectionBackgroundColor
 		- xmlpad.helper.selectionForegroundColor - xmlpad.helper.icon
 

Author:
(c) 2003 JAPISOFT

Field Summary
protected  XMLEditor editor
           
protected  java.lang.String namespace
           
static javax.swing.JPanel WIN
           
 
Constructor Summary
AbstractHelper()
           
 
Method Summary
 void dispose()
          Free unused ressource
protected  void fillList(SimpleNode node, javax.swing.DefaultListModel model)
           
protected  javax.swing.ListCellRenderer getListCellRenderer()
           
protected  java.lang.String getLostCharacter()
           
 java.lang.String getNamespace()
           
 java.lang.String getTitle()
           
protected  boolean hasElements()
           
protected  void insertResult(XMLDocument doc, int offset, java.lang.String result, Descriptor descriptor, java.lang.String added)
           
protected  void prepareDocumentBeforeInserting(XMLDocument document, int offset)
           
 void setEditor(XMLEditor editor)
          For inner usage
 void setLocation(SimpleNode loc, int offset)
          Prepare this helper for this location
 void setNamespace(java.lang.String namespace)
           
 boolean show(int offset, java.lang.String charToInsert)
          Show the helper on this editor at this offset location
 boolean show(int offset, java.lang.String charToInsert, boolean asynchronous)
          Show the helper on this editor at this offset location
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespace

protected java.lang.String namespace

editor

protected XMLEditor editor

WIN

public static javax.swing.JPanel WIN
Constructor Detail

AbstractHelper

public AbstractHelper()
Method Detail

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface Helper
Returns:
a title for the helper popup

setLocation

public void setLocation(SimpleNode loc,
                        int offset)
Prepare this helper for this location

Specified by:
setLocation in interface Helper

setNamespace

public void setNamespace(java.lang.String namespace)

getNamespace

public java.lang.String getNamespace()
Specified by:
getNamespace in interface Helper

setEditor

public void setEditor(XMLEditor editor)
For inner usage

Specified by:
setEditor in interface Helper

show

public boolean show(int offset,
                    java.lang.String charToInsert)
Show the helper on this editor at this offset location

Specified by:
show in interface Helper

show

public boolean show(int offset,
                    java.lang.String charToInsert,
                    boolean asynchronous)
Show the helper on this editor at this offset location


hasElements

protected boolean hasElements()
Returns:
true if this helper has elements

dispose

public void dispose()
Description copied from interface: Helper
Free unused ressource

Specified by:
dispose in interface Helper

getListCellRenderer

protected javax.swing.ListCellRenderer getListCellRenderer()
Returns:
a renderer for helper items

fillList

protected void fillList(SimpleNode node,
                        javax.swing.DefaultListModel model)

prepareDocumentBeforeInserting

protected void prepareDocumentBeforeInserting(XMLDocument document,
                                              int offset)

insertResult

protected void insertResult(XMLDocument doc,
                            int offset,
                            java.lang.String result,
                            Descriptor descriptor,
                            java.lang.String added)

getLostCharacter

protected java.lang.String getLostCharacter()


Copyright © 2006 JAPISoft. All Rights Reserved.