Class ChangeBar

All Implemented Interfaces:
Cloneable, Constants
Direct Known Subclasses:
ChangeBarBegin, ChangeBarEnd

public abstract class ChangeBar extends FObj
Common change bar base class. Handles change bar properties and validates child nodes.
  • Field Details

    • changeBarClass

      protected String changeBarClass
      The change bar class (required).
    • color

      protected Color color
      The change bar color.
    • offset

      protected Length offset
      The change bar offset.
    • placement

      protected int placement
      The change bar placement.
    • style

      protected int style
      The change bar style.
    • width

      protected Length width
      The change bar width.
    • lineHeight

      protected SpaceProperty lineHeight
      The actual line height.
  • Constructor Details

    • ChangeBar

      public ChangeBar(FONode parent)
      Constructs a ChangeBar element with common parts for both begin and end change bars.
      Parameters:
      parent - The parent node
  • Method Details

    • bind

      public void bind(PropertyList pList) throws FOPException
      Bind property values from the property list to the FO node. Must be overridden in all FObj subclasses that have properties applying to it.
      Overrides:
      bind in class FObj
      Parameters:
      pList - the PropertyList where the properties can be found.
      Throws:
      FOPException - if there is a problem binding the values
    • validateChildNode

      protected void validateChildNode(Locator loc, String namespaceURI, String localName) throws ValidationException
      Checks to make sure, during SAX processing of input document, that the incoming node is valid for this (parent) node (e.g., checking to see that fo:table is not an immediate child of fo:root) called from FOTreeBuilder.startElement(String, String, String, Attributes) before constructing the child FObj.
      Overrides:
      validateChildNode in class FONode
      Parameters:
      loc - location in the FO source file
      namespaceURI - namespace of incoming node
      localName - name of the incoming node (without namespace prefix)
      Throws:
      ValidationException - if incoming node not valid for parent
    • processNode

      public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException
      Initialize the node with its name, location information, and attributes The attributes must be used immediately as the sax attributes will be altered for the next element.
      Overrides:
      processNode in class FObj
      Parameters:
      elementName - element name (e.g., "fo:block")
      locator - Locator object (ignored by default)
      attlist - Collection of attributes passed to us from the parser.
      pList - the property list of the parent node
      Throws:
      FOPException - for errors or inconsistencies in the attributes
    • push

      protected void push()
      Adds the current change bar to the active change bar list.
    • pop

      protected void pop()
      Removes the starting counterpart of the current change bar from the active change bar list.
    • getChangeBarBegin

      protected ChangeBar getChangeBarBegin()
      Returns the starting counterpart of the current (ending) change bar.
      Returns:
      The starting counterpart of the current (ending) change bar
    • getChangeBarClass

      public String getChangeBarClass()
      Returns the change bar class.
      Returns:
      The change bar class
    • getColor

      public Color getColor()
      Returns the change bar color.
      Returns:
      The change bar color
    • getOffset

      public Length getOffset()
      Returns the change bar offset.
      Returns:
      The change bar offset
    • getPlacement

      public int getPlacement()
      Returns the change bar placement.
      Returns:
      The change bar placement
    • getStyle

      public int getStyle()
      Returns the change bar style.
      Returns:
      The change bar style
    • getWidth

      public Length getWidth()
      Returns the change bar width.
      Returns:
      The change bar width
    • getLineHeight

      public SpaceProperty getLineHeight()
      Returns the line height.
      Returns:
      The line height