edu.princeton.wordnet.browser.tree.renderers.dom4j
Class ElementDecorator

java.lang.Object
  extended by edu.princeton.wordnet.browser.tree.renderers.dom4j.DefaultDecorator
      extended by edu.princeton.wordnet.browser.tree.renderers.dom4j.ElementDecorator

public class ElementDecorator
extends DefaultDecorator

Element decorator

Author:
Bernard Bou

Field Summary
private static javax.swing.ImageIcon theElementIcon
          Element icon
private static javax.swing.text.SimpleAttributeSet theElementNameStyle
          Style for element name
private static javax.swing.text.SimpleAttributeSet theElementValueStyle
          Style for element data
 
Fields inherited from class edu.princeton.wordnet.browser.tree.renderers.dom4j.DefaultDecorator
theNode
 
Constructor Summary
ElementDecorator(org.dom4j.Node thisNode)
          Constructor
 
Method Summary
protected  java.lang.String getAttributes()
          Get attribute string
private  org.dom4j.Element getElement()
          Get element
 javax.swing.Icon getIcon()
          Get icon for node
 java.lang.String getName()
          Get node name
 javax.swing.text.SimpleAttributeSet getNameStyle()
          Get name style for node
protected  java.lang.String getText()
          Get element text
 java.lang.String getValue()
          Get node data
 javax.swing.text.SimpleAttributeSet getValueStyle()
          Get value style for node
 
Methods inherited from class edu.princeton.wordnet.browser.tree.renderers.dom4j.DefaultDecorator
childrenToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theElementNameStyle

private static javax.swing.text.SimpleAttributeSet theElementNameStyle
Style for element name


theElementValueStyle

private static javax.swing.text.SimpleAttributeSet theElementValueStyle
Style for element data


theElementIcon

private static javax.swing.ImageIcon theElementIcon
Element icon

Constructor Detail

ElementDecorator

public ElementDecorator(org.dom4j.Node thisNode)
Constructor

Parameters:
thisNode - DOM node
Method Detail

getName

public java.lang.String getName()
Description copied from class: DefaultDecorator
Get node name

Overrides:
getName in class DefaultDecorator
Returns:
node name

getValue

public java.lang.String getValue()
Description copied from class: DefaultDecorator
Get node data

Overrides:
getValue in class DefaultDecorator
Returns:
node data

getNameStyle

public javax.swing.text.SimpleAttributeSet getNameStyle()
Get name style for node

Overrides:
getNameStyle in class DefaultDecorator
Returns:
style

getValueStyle

public javax.swing.text.SimpleAttributeSet getValueStyle()
Get value style for node

Overrides:
getValueStyle in class DefaultDecorator
Returns:
style

getIcon

public javax.swing.Icon getIcon()
Description copied from class: DefaultDecorator
Get icon for node

Overrides:
getIcon in class DefaultDecorator
Returns:
icon

getElement

private org.dom4j.Element getElement()
Get element

Returns:
element

getText

protected java.lang.String getText()
Get element text

Returns:
element text

getAttributes

protected java.lang.String getAttributes()
Get attribute string

Returns:
attribute string