org.apache.commons.jelly.tags.swing
Class ComponentTag

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.apache.commons.jelly.DynaBeanTagSupport
              |
              +--org.apache.commons.jelly.tags.swing.ComponentTag
All Implemented Interfaces:
BeanSource, DynaTag, Tag

public class ComponentTag
extends DynaBeanTagSupport
implements BeanSource

This tag creates a Swing component and adds it to its parent tag, optionally declaring this component as a variable if the var attribute is specified.

Version:
$Revision: 1.7 $
Author:
James Strachan

Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
ComponentTag(Factory factory)
           
 
Method Summary
 void addChild(java.awt.Component component)
          Adds a child component to this parent
 void addWindowListener(java.awt.event.WindowListener listener)
          Adds a WindowListener to this component
 void beforeSetAttributes()
          Callback to allow processing to occur before the attributes are about to be set
 void doTag(XMLOutput output)
          Evaluates this tag after all the tags properties have been initialized.
 java.lang.Object getBean()
           
 java.awt.Component getComponent()
           
 void setAction(javax.swing.Action action)
          Sets the Action of this component
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets an attribute value of this tag before the tag is invoked
 
Methods inherited from class org.apache.commons.jelly.DynaBeanTagSupport
getDynaBean, setContext, setDynaBean
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.jelly.Tag
getBody, getContext, getParent, invokeBody, setBody, setParent
 

Constructor Detail

ComponentTag

public ComponentTag(Factory factory)
Method Detail

addChild

public void addChild(java.awt.Component component)
Adds a child component to this parent

setAction

public void setAction(javax.swing.Action action)
               throws java.lang.Exception
Sets the Action of this component

addWindowListener

public void addWindowListener(java.awt.event.WindowListener listener)
                       throws java.lang.Exception
Adds a WindowListener to this component

beforeSetAttributes

public void beforeSetAttributes()
                         throws java.lang.Exception
Description copied from class: DynaBeanTagSupport
Callback to allow processing to occur before the attributes are about to be set
Overrides:
beforeSetAttributes in class DynaBeanTagSupport

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
                  throws java.lang.Exception
Description copied from class: DynaBeanTagSupport
Sets an attribute value of this tag before the tag is invoked
Overrides:
setAttribute in class DynaBeanTagSupport

doTag

public void doTag(XMLOutput output)
           throws java.lang.Exception
Description copied from interface: Tag
Evaluates this tag after all the tags properties have been initialized.

getBean

public java.lang.Object getBean()
Specified by:
getBean in interface BeanSource
Returns:
the bean that has just been created

getComponent

public java.awt.Component getComponent()
Returns:
the visible component, if there is one.


Copyright © 2002-2002 Apache Software Foundation. All Rights Reserved.