net.sf.jett.tag
Class SpanTag

java.lang.Object
  extended by net.sf.jett.tag.BaseTag
      extended by net.sf.jett.tag.SpanTag
All Implemented Interfaces:
Tag

public class SpanTag
extends BaseTag

A SpanTag represents a cell or merged region that will span extra rows and/or extra columns, depending on growth and/or adjustment factors. If this tag is applied to a cell that is not part of a merged region, then it may result in the creation of a merged region. If this tag is applied to a cell that is part of a merged region, then it may result in the removal of the merged region.


Attributes:

Either one or both of the factor and the adjust attributes must be specified.

Author:
Randy Gettman

Field Summary
static java.lang.String ATTR_ADJUST
          Attribute for specifying an adjustment to the size of the merged region.
static java.lang.String ATTR_EXPAND_RIGHT
          Attribute for forcing "expand right" behavior.
static java.lang.String ATTR_FACTOR
          Attribute for specifying the growth factor.
static java.lang.String ATTR_VALUE
          Attribute that specifies the value of the cell/merged region.
 
Fields inherited from class net.sf.jett.tag.BaseTag
ATTR_ON_PROCESSED, SPEC_SEP
 
Constructor Summary
SpanTag()
           
 
Method Summary
 java.lang.String getName()
          Returns this Tag's name.
protected  java.util.List<java.lang.String> getOptionalAttributes()
          Returns a List of optional attribute names.
protected  java.util.List<java.lang.String> getRequiredAttributes()
          Returns a List of required attribute names.
 boolean process()
          If not already part of a merged region, and one of the factors is greater than 1, then create a merged region.
 void validateAttributes()
          Validates the attributes for this Tag.
 
Methods inherited from class net.sf.jett.tag.BaseTag
checkAttributes, clearBlock, deleteBlock, getAttributes, getContext, getWorkbookContext, isBodiless, processTag, removeBlock, setAttributes, setBodiless, setContext, setWorkbookContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_FACTOR

public static final java.lang.String ATTR_FACTOR
Attribute for specifying the growth factor.

See Also:
Constant Field Values

ATTR_ADJUST

public static final java.lang.String ATTR_ADJUST
Attribute for specifying an adjustment to the size of the merged region.

Since:
0.4.0
See Also:
Constant Field Values

ATTR_EXPAND_RIGHT

public static final java.lang.String ATTR_EXPAND_RIGHT
Attribute for forcing "expand right" behavior. (Default is expand down.)

See Also:
Constant Field Values

ATTR_VALUE

public static final java.lang.String ATTR_VALUE
Attribute that specifies the value of the cell/merged region.

See Also:
Constant Field Values
Constructor Detail

SpanTag

public SpanTag()
Method Detail

getName

public java.lang.String getName()
Returns this Tag's name.

Returns:
This Tag's name.

getRequiredAttributes

protected java.util.List<java.lang.String> getRequiredAttributes()
Returns a List of required attribute names.

Overrides:
getRequiredAttributes in class BaseTag
Returns:
A List of required attribute names.

getOptionalAttributes

protected java.util.List<java.lang.String> getOptionalAttributes()
Returns a List of optional attribute names.

Overrides:
getOptionalAttributes in class BaseTag
Returns:
A List of optional attribute names.

validateAttributes

public void validateAttributes()
Validates the attributes for this Tag. Some optional attributes are only valid for bodiless tags, and others are only valid for tags without bodies.

Overrides:
validateAttributes in class BaseTag

process

public boolean process()

If not already part of a merged region, and one of the factors is greater than 1, then create a merged region. Else, replace the current merged region with a new merged region.

Specified by:
process in class BaseTag
Returns:
Whether the first Cell in the Block associated with this Tag was processed.


Copyright © 2012-2013 Jett Team. All Rights Reserved.