cookxml.cookswt
Class CookSwtLib

java.lang.Object
  extended bycookxml.cookswt.CookSwtLib

public class CookSwtLib
extends Object

Since:
CookSwt 1.3

Field Summary
static String CANVAS
           
static String COMMAND_ATTR
          the attribute for setting general commands
static String COMPOSITE
           
static String CONTROL
           
static String DECORATIONS
           
static String DIALOG
           
static String ITEM
           
static String NAMESPACE
          this is the namespace for CookSwt tags
static String WIDGET
           
 
Constructor Summary
CookSwtLib()
           
 
Method Summary
static void addDialogTag(InheritableTagLibrary tagLibrary, Class dialogClass)
          a simple way of adding a Dialog tag.
static void addDialogTag(InheritableTagLibrary tagLibrary, Class dialogClass, String parentTag)
          a simple way of adding a Dialog tag.
static void addWidgetTag(InheritableTagLibrary tagLibrary, Class widgetClass, String parentTag)
          a simple way of adding a Widget tag.
static InheritableTagLibrary createTagLibrary(InheritableTagLibrary commonTagLibrary)
          This function creates the Swing tag library in http://cookxml.sf.net/cookswing/ namespace, with CookXml CommonLib tag library as its parent.
static void setupTags(InheritableTagLibrary tagLibrary, InheritableTagLibrary commonTagLibrary)
          Setup the SWT tag library
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
this is the namespace for CookSwt tags

See Also:
Constant Field Values

CONTROL

public static final String CONTROL
See Also:
Constant Field Values

DIALOG

public static final String DIALOG
See Also:
Constant Field Values

WIDGET

public static final String WIDGET
See Also:
Constant Field Values

COMPOSITE

public static final String COMPOSITE
See Also:
Constant Field Values

CANVAS

public static final String CANVAS
See Also:
Constant Field Values

ITEM

public static final String ITEM
See Also:
Constant Field Values

DECORATIONS

public static final String DECORATIONS
See Also:
Constant Field Values

COMMAND_ATTR

public static final String COMMAND_ATTR
the attribute for setting general commands

See Also:
Constant Field Values
Constructor Detail

CookSwtLib

public CookSwtLib()
Method Detail

addWidgetTag

public static void addWidgetTag(InheritableTagLibrary tagLibrary,
                                Class widgetClass,
                                String parentTag)
                         throws CookXmlException
a simple way of adding a Widget tag.

Parameters:
tagLibrary - the tag library to be used.
widgetClass - the Widget class
parentTag - the parent tag
Throws:
CookXmlException

addDialogTag

public static void addDialogTag(InheritableTagLibrary tagLibrary,
                                Class dialogClass)
                         throws CookXmlException
a simple way of adding a Dialog tag. The parent tag is assumed to be "dialog".

Parameters:
tagLibrary - the tag library to be used.
dialogClass - dialog class
Throws:
CookXmlException
See Also:
DIALOG

addDialogTag

public static void addDialogTag(InheritableTagLibrary tagLibrary,
                                Class dialogClass,
                                String parentTag)
                         throws CookXmlException
a simple way of adding a Dialog tag.

Parameters:
tagLibrary - the tag library to be used.
dialogClass - dialog class
parentTag - the parent tag
Throws:
CookXmlException

setupTags

public static void setupTags(InheritableTagLibrary tagLibrary,
                             InheritableTagLibrary commonTagLibrary)
                      throws CookXmlException
Setup the SWT tag library

Parameters:
tagLibrary - the tag library to be setup
Throws:
CookXmlException

createTagLibrary

public static InheritableTagLibrary createTagLibrary(InheritableTagLibrary commonTagLibrary)
This function creates the Swing tag library in http://cookxml.sf.net/cookswing/ namespace, with CookXml CommonLib tag library as its parent. This is necessary because "component" tag inherits "listener" tag of CookXml CommonLib. This function also inserts some additional setters for commonTagLibrary.

Parameters:
commonTagLibrary - The CookXml CommonLib tag library.
Returns:
the created CookSwt tag library.