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

Quick Search    Search Deep

com.newsfighter.layout.jsptags
Class GutterTag  view GutterTag download GutterTag.java

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bycom.newsfighter.layout.jsptags.GutterTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class GutterTag
extends javax.servlet.jsp.tagext.BodyTagSupport

The GutterTag layout component creates a gutter between two panels, similar to the ones used in the printing industry. The width of the Gutter is reliant on the setting in the skin.xml .

Version:
0.6

Field Summary
private  SkinFactory factory
           Creates its own SkinFactory object to override that of the enclosing ManagerTag instance.
private  ManagerTag manager
           A reference to the enclosing ManagerTag instance.
private  java.lang.String skin
           Stores user input for the optional skin attribute specified in the JSP tag.
private  java.lang.String width
           Stores user input for the optional width attribute specified in the JSP tag.
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GutterTag()
           
 
Method Summary
 int doStartTag()
           doStartTag is called by the JSP container when the tag is encountered.
private  void getManagerSkin()
           Stores a reference to the enclosing (@link ManagerTag)'s SkinFactory in the local factory parameter.
 java.lang.String getSkin()
           Returns the value of the skin attribute.
 java.lang.String getWidth()
           Returns the value of the width attribute.
private  void initManager()
           Initializes the manager attribute.
private  void initSkinSystem()
           Initializes the SkinFactory and the ManagerTag instances.
 void setSkin(java.lang.String skinName)
           Sets the value of the skin attribute to override that set by the ManagerTag.
private  void setSkinFactory(java.lang.String skinName)
           Creates a new SkinFactory object and stores a reference to it in the local factory variable.
 void setWidth(java.lang.String value)
           Sets the value of the width attribute.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

factory

private SkinFactory factory
Creates its own SkinFactory object to override that of the enclosing ManagerTag instance.


manager

private ManagerTag manager
A reference to the enclosing ManagerTag instance.


skin

private java.lang.String skin
Stores user input for the optional skin attribute specified in the JSP tag. If this variable is set, it will cause GutterTag to create its own SkinFactory object.

See Also:
SkinFactory

width

private java.lang.String width
Stores user input for the optional width attribute specified in the JSP tag. If this variable is set, it will override the settings specified in the skin.xml file.

Constructor Detail

GutterTag

public GutterTag()
Method Detail

initSkinSystem

private void initSkinSystem()
Initializes the SkinFactory and the ManagerTag instances. First it checks to see if the skin attribute has been set. If it has, this means the enclosing ManagerTag's instance of the SkinFactory object must be overridden, and it tells setSkinFactory to create a new one. initSkinSystem() should be called at the beginning of doStartTag().


setSkin

public void setSkin(java.lang.String skinName)
Sets the value of the skin attribute to override that set by the ManagerTag.


getSkin

public java.lang.String getSkin()
Returns the value of the skin attribute. This defaults to null, in which case all skin information is inherited from the enclosing (@link ManagerTag) instance. This value can be set by the setSkin() attribute and can be specified in the JSP tag, as per the JSP tag library descriptor for this library.


setSkinFactory

private void setSkinFactory(java.lang.String skinName)
Creates a new SkinFactory object and stores a reference to it in the local factory variable.


getManagerSkin

private void getManagerSkin()
Stores a reference to the enclosing (@link ManagerTag)'s SkinFactory in the local factory parameter.


initManager

private void initManager()
Initializes the manager attribute.


setWidth

public void setWidth(java.lang.String value)
Sets the value of the width attribute.


getWidth

public java.lang.String getWidth()
Returns the value of the width attribute.


doStartTag

public int doStartTag()
doStartTag is called by the JSP container when the tag is encountered. This writes a table column in HTML which contains a spacer.gif of the specified width. Since this class does not enclose any other layout components, it returns EVAL_BODY.