Tag Documentation

[tag libraries] [tags]

The following document contains a summary of all theJellytag libraries.

Tag Libraries

[tag libraries] [tags]

LibraryDescription
jelly:swing

The JellySwing Library which is a Jelly Library for creating Rich User Interfaces using Swing via XML markup (a Jelly script)

jelly:swing

The JellySwing Library which is a Jelly Library for creating Rich User Interfaces using Swing via XML markup (a Jelly script)

Tag NameDescription
actionCreates a Swing Action which on invocation will execute the body of this tag.The Action is then output as a variable for reuse if the 'var' attribute is specifiedotherwise the action is added to the parent JellySwing widget.
borderAlignRepresents a layout of a child component within its parent <borderLayout>layout.
borderLayoutA Layout tag which uses nested <borderAlign>tags to implement a BorderLayout
buttonGroupImplements a ButtonGroup. This tag acts like a Swing componentexcept that adding a component other than an AbstractButton, will be passedthrough to the parent tag. This is meant to make thebuttonGroup easier to use like this:
       <panel> <buttonGroup> <panel> <radioButton/> </panel> <panel> <radioButton/> </panel> </buttonGroup> </panel>
    

Note that the following construct will silently fail, and shame on s/he who even tried it:

       <panel> <buttonGroup> <font .../> <panel> <radioButton/> </panel> <panel> <radioButton/> </panel> </buttonGroup> </panel>
    

cardLayoutImplements CardLayout. Takes parameters hgap, vgap per the class. You canset the "var" attribute of this tag, this will store the layout managerin that context attribute, for later use.
componentThis tag creates a Swing component and adds it to its parent tag, optionally declaring thiscomponent as a variable if the var attribute is specified.

This tag clears the reference to it's bean after doTag runs.This means that child tags can access the component (bean) normallyduring execution but should not hold a reference to thistag after their doTag completes.

constraintThis class represents a layout-manager constraints as passed inthe second argument of Container.add(Component,Object).

In essence, it looks really like nothing else than a bean-class...with

org.apache.commons.jelly.tags.swing.ConstraintTag.getConstraintObject.Probably a shorter java-source is do-able.

TODO: this class should probably be extended with special treatment for dimensiosusing the converter package.

dialogCreates a Swing Dialog. A JDialog needs to have it's owner set in the constructor,which is why this class is needed instead of just using a BeanFactory.
emptyBorderCreates an empty border.The border will either be exported as a variable defined by the 'var' attributeor will be set on the parent widget's border property
etchedBorderCreates an etched border.The border will either be exported as a variable defined by the 'var' attributeor will be set on the parent widget's border property
focusListener
fontCreates an Font and attaches it to the parent component or exports the font asa reusable variable that can be attached to multiple widgets.
gbcThis class represents a java.awt.GridBagConstraintsconstraints as passed inthe second argument of Container.add(Component,Object).It supports inheritence between such tags in the following fashion:
  • either using a basedOn attribute which issupposed to provide a reference to another
org.apache.commons.jelly.tags.swing.GbcTag.
  • either using a parent
  • org.apache.commons.jelly.tags.swing.GbcTag. The first version takes precedence.A Grid-bag-constraint inherits from another simply by setting other attributesas is done in org.apache.commons.jelly.tags.swing.impl.GridBagConstraintBean.setBasedOn.

    In essence, it looks really like nothing else than a bean-class...with

    org.apache.commons.jelly.tags.swing.GbcTag.getConstraints.Probably a shorter java-source is do-able.

    TODO: this class should probably be extended with special treatment for dimensionsusing the converter package.

    gridBagLayoutA Layout tag which uses nested <gbc>tags to implement a GridBagLayout
    keyListener
    tableLayoutA Layout tag which mimicks the table, tr and td tags of HTML.
    tableModelCreates a default TableModel using nested tableColumn tags.
    tableModelColumnCreates a default TableColumnModel.
    tdRepresents a tabular cell inside a <tl>tag inside a <tableLayout>tag which mimicks the <td>HTML tag.
    titledBorderCreates a titled border.The border will either be exported as a variable defined by the 'var' attributeor will be set on the parent widget's border property
    trRepresents a tabular row inside a <tableLayout>tag which mimicks the <tr>HTML tag.
    windowListenerCreates a WindowListener which is attached to its parent window control which will invokenamed Jelly scripts as window events are fired, or will invoke its body if there is no scriptspecified for the named event type.

    Tags

    [tag libraries] [tags]

    swing:action

    Creates a Swing Action which on invocation will execute the body of this tag.The Action is then output as a variable for reuse if the 'var' attribute is specifiedotherwise the action is added to the parent JellySwing widget.

    Attribute NameTypeDescription
    escapeTextboolean
    ignoreUnknownPropertiesboolean
    trimboolean

    swing:borderAlign

    Represents a layout of a child component within its parent <borderLayout>layout.

    Attribute NameTypeDescription
    alignjava.lang.StringSets the alignment of the child component which is a case insensitive valueof {NORTH, SOUTH, EAST, WEST, CENTER} which defaults to CENTER
    escapeTextboolean
    trimboolean

    swing:borderLayout

    A Layout tag which uses nested <borderAlign>tags to implement a BorderLayout

    Attribute NameTypeDescription
    escapeTextboolean
    hgapintSets the horizontal gap in pixels.
    trimboolean
    varjava.lang.StringSets the name of the variable to use to expose the new LayoutManager object.If this attribute is not set then the parent widget tag will have itslayout property set.
    vgapintSets the vertical gap in pixels

    swing:buttonGroup

    Implements a ButtonGroup. This tag acts like a Swing componentexcept that adding a component other than an AbstractButton, will be passedthrough to the parent tag. This is meant to make thebuttonGroup easier to use like this:

           <panel> <buttonGroup> <panel> <radioButton/> </panel> <panel> <radioButton/> </panel> </buttonGroup> </panel>
        

    Note that the following construct will silently fail, and shame on s/he who even tried it:

           <panel> <buttonGroup> <font .../> <panel> <radioButton/> </panel> <panel> <radioButton/> </panel> </buttonGroup> </panel>
        

    Attribute NameTypeDescription
    actionjavax.swing.ActionSets the Action of this component
    borderjavax.swing.border.BorderSets the Border of this component
    escapeTextboolean
    fontjava.awt.FontSets the Font of this component
    ignoreUnknownPropertiesboolean
    layoutjava.awt.LayoutManagerSets the LayoutManager of this component
    tagNamejava.lang.StringPuts this tag into the context under the given nameallowing later calls to org.apache.commons.jelly.tags.swing.ComponentTag.rerun().For example, it makes sense to use ${myTag.rerun()} as a childof an action element.
    trimboolean

    swing:cardLayout

    Implements CardLayout. Takes parameters hgap, vgap per the class. You canset the "var" attribute of this tag, this will store the layout managerin that context attribute, for later use.

    Attribute NameTypeDescription
    escapeTextboolean
    hgapint
    trimboolean
    varjava.lang.StringSets the name of the variable to use to expose the new LayoutManager object.If this attribute is not set then the parent widget tag will have itslayout property set.
    vgapint

    swing:component

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

    This tag clears the reference to it's bean after doTag runs.This means that child tags can access the component (bean) normallyduring execution but should not hold a reference to thistag after their doTag completes.

    Attribute NameTypeDescription
    actionjavax.swing.ActionSets the Action of this component
    borderjavax.swing.border.BorderSets the Border of this component
    escapeTextboolean
    fontjava.awt.FontSets the Font of this component
    ignoreUnknownPropertiesboolean
    layoutjava.awt.LayoutManagerSets the LayoutManager of this component
    tagNamejava.lang.StringPuts this tag into the context under the given nameallowing later calls to org.apache.commons.jelly.tags.swing.ComponentTag.rerun().For example, it makes sense to use ${myTag.rerun()} as a childof an action element.
    trimboolean

    swing:constraint

    This class represents a layout-manager constraints as passed inthe second argument of Container.add(Component,Object).

    In essence, it looks really like nothing else than a bean-class...with

    org.apache.commons.jelly.tags.swing.ConstraintTag.getConstraintObject.Probably a shorter java-source is do-able.

    TODO: this class should probably be extended with special treatment for dimensiosusing the converter package.

    Attribute NameTypeDescription
    dynaBeanorg.apache.commons.beanutils.DynaBean
    escapeTextboolean
    trimboolean

    swing:dialog

    Creates a Swing Dialog. A JDialog needs to have it's owner set in the constructor,which is why this class is needed instead of just using a BeanFactory.

    Attribute NameTypeDescription
    escapeTextboolean
    ignoreUnknownPropertiesboolean
    trimboolean

    swing:emptyBorder

    Creates an empty border.The border will either be exported as a variable defined by the 'var' attributeor will be set on the parent widget's border property

    Attribute NameTypeDescription
    bottomintSets the bottom inset
    escapeTextboolean
    leftintSets the left inset
    rightintSets the right inset
    topintSets the top inset
    trimboolean
    varjava.lang.StringSets the name of the variable to use to expose the new Border object.If this attribute is not set then the parent widget tag will have itsborder property set.

    swing:etchedBorder

    Creates an etched border.The border will either be exported as a variable defined by the 'var' attributeor will be set on the parent widget's border property

    Attribute NameTypeDescription
    escapeTextboolean
    etchTypeintSets the etch type. Must be either EtchedBorder.LOWERED or EtchedBorder.RAISED
    highlightjava.awt.ColorSets the highlight color
    topjava.awt.ColorSets the shadow color
    trimboolean
    varjava.lang.StringSets the name of the variable to use to expose the new Border object.If this attribute is not set then the parent widget tag will have itsborder property set.

    swing:focusListener

    Attribute NameTypeDescription
    escapeTextboolean
    gainedorg.apache.commons.jelly.Script
    lostorg.apache.commons.jelly.Script
    trimboolean
    varjava.lang.String

    swing:font

    Creates an Font and attaches it to the parent component or exports the font asa reusable variable that can be attached to multiple widgets.

    Attribute NameTypeDescription
    escapeTextboolean
    trimboolean

    swing:gbc

    This class represents a java.awt.GridBagConstraintsconstraints as passed inthe second argument of Container.add(Component,Object).It supports inheritence between such tags in the following fashion:

    • either using a basedOn attribute which issupposed to provide a reference to another
    org.apache.commons.jelly.tags.swing.GbcTag.
  • either using a parent
  • org.apache.commons.jelly.tags.swing.GbcTag. The first version takes precedence.A Grid-bag-constraint inherits from another simply by setting other attributesas is done in org.apache.commons.jelly.tags.swing.impl.GridBagConstraintBean.setBasedOn.

    In essence, it looks really like nothing else than a bean-class...with

    org.apache.commons.jelly.tags.swing.GbcTag.getConstraints.Probably a shorter java-source is do-able.

    TODO: this class should probably be extended with special treatment for dimensionsusing the converter package.

    Attribute NameTypeDescription
    escapeTextboolean
    ignoreUnknownPropertiesboolean
    trimboolean

    swing:gridBagLayout

    A Layout tag which uses nested <gbc>tags to implement a GridBagLayout

    Attribute NameTypeDescription
    escapeTextboolean
    trimboolean
    varjava.lang.StringSets the name of the variable to use to expose the new LayoutManager object.If this attribute is not set then the parent widget tag will have itslayout property set.

    swing:keyListener

    Attribute NameTypeDescription
    escapeTextboolean
    pressedorg.apache.commons.jelly.Script
    releasedorg.apache.commons.jelly.Script
    trimboolean
    typedorg.apache.commons.jelly.Script
    varjava.lang.String

    swing:tableLayout

    A Layout tag which mimicks the table, tr and td tags of HTML.

    Attribute NameTypeDescription
    escapeTextboolean
    trimboolean
    varjava.lang.StringSets the name of the variable to use to expose the new LayoutManager object.If this attribute is not set then the parent widget tag will have itslayout property set.

    swing:tableModel

    Creates a default TableModel using nested tableColumn tags.

    Attribute NameTypeDescription
    escapeTextboolean
    ignoreUnknownPropertiesboolean
    trimboolean

    swing:tableModelColumn

    Creates a default TableColumnModel.

    Attribute NameTypeDescription
    escapeTextboolean
    ignoreUnknownPropertiesboolean
    trimboolean

    swing:td

    Represents a tabular cell inside a <tl>tag inside a <tableLayout>tag which mimicks the <td>HTML tag.

    Attribute NameTypeDescription
    alignjava.lang.StringSets the horizontal alignment to a case insensitive value of {LEFT, CENTER, RIGHT}
    colfillbooleanSets whether or not this column should allow its component to stretch to fill the space available
    colspanintSets the number of columns that this cell should span. The default value is 1
    escapeTextboolean
    rowfillbooleanSets whether or not this row should allow its component to stretch to fill the space available
    rowspanintSets the number of rows that this cell should span. The default value is 1
    trimboolean
    valignjava.lang.StringSets the vertical alignment to a case insensitive value of {TOP, MIDDLE, BOTTOM}

    swing:titledBorder

    Creates a titled border.The border will either be exported as a variable defined by the 'var' attributeor will be set on the parent widget's border property

    Attribute NameTypeDescription
    colorjava.awt.ColorSets the color of the title for this border. Can be set via a nested tag.
    escapeTextboolean
    fontjava.awt.FontSets the Font to be used by the title. Can be set via a nested tag.
    titlejava.lang.StringSets the title text for this border.
    titleJustificationjava.lang.StringSets the justification of the title. The String is case insensitive.Possible values are {LEFT, CENTER, RIGHT, LEADING, TRAILING}
    titlePositionjava.lang.StringSets the position of the title. The String is case insensitive.Possible values are {ABOVE_TOP, TOP, BELOW_TOP, ABOVE_BOTTOM, BOTTOM, BELOW_BOTTOM}
    trimboolean
    varjava.lang.StringSets the name of the variable to use to expose the new Border object.If this attribute is not set then the parent widget tag will have itsborder property set.

    swing:tr

    Represents a tabular row inside a <tableLayout>tag which mimicks the <tr>HTML tag.

    Attribute NameTypeDescription
    escapeTextboolean
    trimboolean

    swing:windowListener

    Creates a WindowListener which is attached to its parent window control which will invokenamed Jelly scripts as window events are fired, or will invoke its body if there is no scriptspecified for the named event type.

    Attribute NameTypeDescription
    activatedorg.apache.commons.jelly.ScriptSets the Script to be executed when the window is activated.
    closedorg.apache.commons.jelly.ScriptSets the Script to be executed when the window is closed.
    closingorg.apache.commons.jelly.ScriptSets the Script to be executed when the window is closing.
    deactivatedorg.apache.commons.jelly.ScriptSets the Script to be executed when the window is deactivated.
    deiconifiedorg.apache.commons.jelly.ScriptSets the Script to be executed when the window is deiconified.
    escapeTextboolean
    iconifiedorg.apache.commons.jelly.ScriptSets the Script to be executed when the window is iconified.
    openedorg.apache.commons.jelly.ScriptSets the Script to be executed when the window is opened.
    trimboolean
    varjava.lang.StringSets the name of the variable to use to expose the Event object