sk.uniba.euromath.editor.wizards.document
Class NameListChooserFactories

java.lang.Object
  extended by sk.uniba.euromath.editor.wizards.document.NameListChooserFactories

public class NameListChooserFactories
extends Object

Creates various content factories.

Author:
Martin Vysny

Field Summary
 XMLAccess xmlAccess
          Provide name lists for this document.
 
Constructor Summary
NameListChooserFactories(XMLAccess xmlAccess)
          Creates instance of object.
 
Method Summary
 INameListItemChooserFactory<NewElementRule> encloseNodes(DomPointer start, DomPointer end)
          Returns factory producing components able to select element name, that may enclose given content.
 INameListItemChooserFactory<AttributeRule> insertNewAttribute(Element e)
          Creates list of attribute names that are insertable into given element.
 INameListItemChooserFactory<AttributeRule> modifyAttribute(Attr attr)
          Creates factory producing component that modifies existing attribute name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlAccess

public final XMLAccess xmlAccess
Provide name lists for this document.

Constructor Detail

NameListChooserFactories

public NameListChooserFactories(XMLAccess xmlAccess)
Creates instance of object.

Parameters:
xmlAccess - provide name lists for this document.
Method Detail

insertNewAttribute

public INameListItemChooserFactory<AttributeRule> insertNewAttribute(Element e)
Creates list of attribute names that are insertable into given element.

Parameters:
e - the element where to insert new attribute.
Returns:
factory producing namelists or null if no attribute is insertable.

modifyAttribute

public INameListItemChooserFactory<AttributeRule> modifyAttribute(Attr attr)
Creates factory producing component that modifies existing attribute name.

Parameters:
attr - the attribute whose value has to be modified.
Returns:
factory producing component that modifies existing attribute

encloseNodes

public INameListItemChooserFactory<NewElementRule> encloseNodes(DomPointer start,
                                                                DomPointer end)
Returns factory producing components able to select element name, that may enclose given content. All nodes must have the same parent. Both pointers may point inside a text. Enclosing root element is currently unsupported and may result in throwing NullPointerException.

Parameters:
start - start of the interval. Must point before the end parameter.
end - end of the interval to enclose.
Returns:
factory instance or null if no elements are suitable for enclosing operation.
Throws:
IllegalArgumentException - if end points before start, or at least one is pointing into an entity.


Copyright © 2003-2006 null. All Rights Reserved.