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

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

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

Class to create a Font instance within Jelly SWT.

Version:
CVS $Id: FontTag.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
FontTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput output)
          Creates a Font instance as defined by the type, size and style attributes, and stores this Font instance in the Context so that it can be referenced in the Jelly script.
 org.eclipse.swt.widgets.Widget getParentWidget()
           
 int getSize()
          Obtain the Font size
 java.lang.String getStyle()
          Obtain the style of this Font
 java.lang.String getType()
          Obtain the Font type name
 java.lang.String getVar()
          Obtain the variable name.
 void setSize(int size)
          Set the size of this Font
 void setStyle(java.lang.String style)
          Set the style of this Font (eg. bold, normal, italics)
 void setType(java.lang.String type)
          Set the type of this Font
 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

FontTag

public FontTag()
Method Detail

setType

public void setType(java.lang.String type)
Set the type of this Font

Parameters:
type - Font type name

getType

public java.lang.String getType()
Obtain the Font type name

Returns:
the Font type name

setSize

public void setSize(int size)
Set the size of this Font

Parameters:
size - Font size

getSize

public int getSize()
Obtain the Font size

Returns:
the Font size

setStyle

public void setStyle(java.lang.String style)
Set the style of this Font (eg. bold, normal, italics)

Parameters:
style - the style of this Font

getStyle

public java.lang.String getStyle()
Obtain the style of this Font

Returns:
the style of this Font

setVar

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

Parameters:
var - the variable name of this Font instance

getVar

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

Returns:
the variable name of this Font instance

getParentWidget

public org.eclipse.swt.widgets.Widget getParentWidget()
Returns:
the parent widget which will deliver us a Device reference

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Creates a Font instance as defined by the type, size and style attributes, and stores this Font 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.