org.apache.commons.jelly.tags.swt
Class ColorTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.swt.ColorTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class ColorTag
extends org.apache.commons.jelly.TagSupport

Class to create a Color instance within Jelly SWT.

Version:
CVS $Id: ColorTag.java 155420 2005-02-26 13:06:03Z dirkv $
Author:
Marcus Crafter, Written with much help thanks to the ImageTag class

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
ColorTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput output)
          Creates a Color instance as defined by the RGB attribute.
 org.eclipse.swt.widgets.Widget getParentWidget()
           
 java.lang.String getRgb()
          Obtain the RGB value for this Color instance
 java.lang.String getVar()
          Obtain the variable name.
 void setRgb(java.lang.String rgb)
          Sets the RGB value for this Color instance
 void setVar(java.lang.String var)
          Sets the variable name
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorTag

public ColorTag()
Method Detail

setRgb

public void setRgb(java.lang.String rgb)
Sets the RGB value for this Color instance

Parameters:
rgb - value (eg. #666666);

getRgb

public java.lang.String getRgb()
Obtain the RGB value for this Color instance

Returns:
the RGB value (eg. #666666)

setVar

public void setVar(java.lang.String var)
Sets the variable name

Parameters:
var - the variable name of this Color instance

getVar

public java.lang.String getVar()
Obtain the variable name.

Returns:
the variable name of this Color instance

getParentWidget

public org.eclipse.swt.widgets.Widget getParentWidget()
Returns:
the parent widget which this widget will be added to.

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Creates a Color instance as defined by the RGB attribute. Stores this Color instance in the Context so that it can be referenced in the Jelly script.

Parameters:
output - XMLOutput reference
Throws:
org.apache.commons.jelly.JellyTagException - if an error occurs
See Also:
Tag.doTag(org.apache.commons.jelly.XMLOutput)


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