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

Quick Search    Search Deep

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

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bycom.newsfighter.layout.jsptags.LogoTag
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 LogoTag
extends javax.servlet.jsp.tagext.BodyTagSupport

The LogoTag layout component creates a specialized panel for logo and menu graphics at the top of the page. Because there are so many ways one might want to lay out their logo graphics, this class will most likely undergo radical changes in future versions of the Newsfighter software.


Field Summary
private  SkinFactory factory
           reference to the SkinFactory object.
private  ManagerTag manager
           A reference to the enclosing ManagerTag instance.
private  java.lang.String skin
           records the name of the skin the page author wishes to use.
 
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
LogoTag()
           
 
Method Summary
 int doEndTag()
           doEndTag is called by the JSP container when the tag is closed.
 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 this.skin.
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.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, 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
reference to the SkinFactory object.


manager

private ManagerTag manager
A reference to the enclosing ManagerTag instance.


skin

private java.lang.String skin
records the name of the skin the page author wishes to use. defaults to the "default" skin.

Constructor Detail

LogoTag

public LogoTag()
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 this.skin.


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.


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.


doEndTag

public int doEndTag()
doEndTag is called by the JSP container when the tag is closed.