Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.outerj.pollo.xmleditor.displayspec
Class ChainedDisplaySpecification  view ChainedDisplaySpecification download ChainedDisplaySpecification.java

java.lang.Object
  extended byorg.outerj.pollo.xmleditor.displayspec.ChainedDisplaySpecification
All Implemented Interfaces:
IDisplaySpecification

public class ChainedDisplaySpecification
extends java.lang.Object
implements IDisplaySpecification

A wrapper class around a display specification that allows chaining it. The way chaining works is that if the current instance returns null, the next instance is consulted for a value. Note that the methods in IDisplaySpecification are supposed to always return a value, so make sure that on the end of the chain there's a display specification that always return something for each method.


Field Summary
protected  java.util.ArrayList displaySpecs
           
 
Fields inherited from interface org.outerj.pollo.xmleditor.displayspec.IDisplaySpecification
CLASSIC_TREE, POLLO_TREE
 
Constructor Summary
ChainedDisplaySpecification()
           
 
Method Summary
 void add(IDisplaySpecification displaySpec)
           
 java.awt.Color getBackgroundColor()
          Get the background fill color.
 ElementSpec getElementSpec(org.w3c.dom.Element element)
           
 ElementSpec getElementSpec(java.lang.String namespaceURI, java.lang.String localName, org.w3c.dom.Element parent)
          Gets the element specification, this is an object containing attributes for how this element should be rendered.
 int getTreeType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

displaySpecs

protected java.util.ArrayList displaySpecs
Constructor Detail

ChainedDisplaySpecification

public ChainedDisplaySpecification()
Method Detail

add

public void add(IDisplaySpecification displaySpec)

getBackgroundColor

public java.awt.Color getBackgroundColor()
Description copied from interface: IDisplaySpecification
Get the background fill color.

Specified by:
getBackgroundColor in interface IDisplaySpecification

getElementSpec

public ElementSpec getElementSpec(java.lang.String namespaceURI,
                                  java.lang.String localName,
                                  org.w3c.dom.Element parent)
Description copied from interface: IDisplaySpecification
Gets the element specification, this is an object containing attributes for how this element should be rendered.

Specified by:
getElementSpec in interface IDisplaySpecification

getElementSpec

public ElementSpec getElementSpec(org.w3c.dom.Element element)
Specified by:
getElementSpec in interface IDisplaySpecification

getTreeType

public int getTreeType()
Specified by:
getTreeType in interface IDisplaySpecification