|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.spedit.core.XMLInformation
The XMLInformation
class stores information related to a
specific element. This information is used by the application to know:
Field Summary | |
protected Vector |
attachedViewClasses
The list of views supported by this element. |
protected Hashtable |
attachedViewParameters
A hash that maps a set of attributes, expressed as an array of objects, to a the class of a View object. |
protected Vector |
children
|
protected Class |
defaultViewClass
|
protected String |
name
|
protected org.jdom.Namespace |
namespace
|
protected boolean |
strip
|
protected Styleable.StyleSheet |
styleSheet
|
Constructor Summary | |
XMLInformation(String name)
Creates a new element information for the given element name. |
Method Summary | |
void |
addChild(String element)
|
void |
addView(Class view,
Vector params)
Adds a view and its constructor attributes to this element information object. |
Enumeration |
getChildren()
Returns the possible children of this elements, as strings. |
String |
getName()
Returns the name of the element. |
org.jdom.Namespace |
getNamespace()
Returns the namespace of the element. |
View |
getNewDefaultView(Element elt)
Instanciate a new View object that has been set as the
default view for this kind of element. |
Styleable.StyleSheet |
getStyleSheet()
|
boolean |
hasStrip()
|
protected void |
init()
This method is used by the constructors. |
protected View |
instanciateView(Element elt,
Class viewClass)
Instanciates the given viewClass . |
boolean |
isElementAllowed(org.jdom.Element source,
String name)
Tells wether or not the given element is allowed as a child of the current element. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected String name
protected org.jdom.Namespace namespace
protected Vector children
protected Vector attachedViewClasses
defaultViewClass
is not parto of this list.protected Hashtable attachedViewParameters
View
object.protected Class defaultViewClass
protected Styleable.StyleSheet styleSheet
protected boolean strip
Constructor Detail |
public XMLInformation(String name)
Method Detail |
protected void init()
public String getName()
String
containing the element name.public org.jdom.Namespace getNamespace()
Namespace
of the element, which can be set to
null
.public Styleable.StyleSheet getStyleSheet()
public boolean isElementAllowed(org.jdom.Element source, String name)
source
- is the element in which the other element
should be added.name
- is the name of the element to be added.- Returns:
true
if the element is allowed, otherwise false.
null
.
public void addChild(String element)
public Enumeration getChildren()
public void addView(Class view, Vector params)
public View getNewDefaultView(Element elt)
View
object that has been set as the
default view for this kind of element.protected View instanciateView(Element elt, Class viewClass)
viewClass
. This class has to be
part of the views associated to the element.viewClass
- the class of the view that has to be
instanciated and configured. This class has to be either the
defaultViewClass
or to be part of the
attachedViewClasses
null
in case the viewClass
was bad. Otherwise returns a new, properly configured, instance of the
view class.public boolean hasStrip()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |