fop 2.0

org.apache.fop.layoutmgr
Class WhitespaceManagementPenalty

java.lang.Object
  extended by org.apache.fop.layoutmgr.ListElement
      extended by org.apache.fop.layoutmgr.KnuthElement
          extended by org.apache.fop.layoutmgr.KnuthPenalty
              extended by org.apache.fop.layoutmgr.WhitespaceManagementPenalty

public class WhitespaceManagementPenalty
extends KnuthPenalty

A special penalty used to specify content having multiple variants. At most only one variant will be inserted into the final document. If none of the variants fit into the remaining space on the current page, the dynamic content will be completely ignored.


Nested Class Summary
 class WhitespaceManagementPenalty.Variant
           
 
Field Summary
 
Fields inherited from class org.apache.fop.layoutmgr.KnuthPenalty
DUMMY_ZERO_PENALTY, FLAGGED_PENALTY
 
Fields inherited from class org.apache.fop.layoutmgr.KnuthElement
INFINITE
 
Constructor Summary
WhitespaceManagementPenalty(org.apache.fop.layoutmgr.MultiSwitchLayoutManager.WhitespaceManagementPosition pos)
           
 
Method Summary
 void addVariant(WhitespaceManagementPenalty.Variant variant)
           
 java.util.List<WhitespaceManagementPenalty.Variant> getVariants()
           
 boolean hasActiveVariant()
           
 void setActiveVariant(WhitespaceManagementPenalty.Variant bestVariant)
           
 java.lang.String toString()
          
 
Methods inherited from class org.apache.fop.layoutmgr.KnuthPenalty
getBreakClass, getPenalty, isForcedBreak, isPenalty, isPenaltyFlagged, setPenalty, valueOf
 
Methods inherited from class org.apache.fop.layoutmgr.KnuthElement
getShrink, getStretch, getWidth, isAuxiliary, isUnresolvedElement
 
Methods inherited from class org.apache.fop.layoutmgr.ListElement
getLayoutManager, getPosition, isBox, isGlue, setPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WhitespaceManagementPenalty

public WhitespaceManagementPenalty(org.apache.fop.layoutmgr.MultiSwitchLayoutManager.WhitespaceManagementPosition pos)
Method Detail

addVariant

public void addVariant(WhitespaceManagementPenalty.Variant variant)

setActiveVariant

public void setActiveVariant(WhitespaceManagementPenalty.Variant bestVariant)

hasActiveVariant

public boolean hasActiveVariant()

getVariants

public java.util.List<WhitespaceManagementPenalty.Variant> getVariants()

toString

public java.lang.String toString()
Description copied from class: KnuthPenalty

Overrides:
toString in class KnuthPenalty

fop 2.0

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.