* an exception to this rule.)
* This class can be extended to handle the creation and adding of the
* inline area.
- * TODO [GA] replace use of hungarian notation with normalized java naming
*/
public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
implements InlineLevelLayoutManager {
- /**
- * logging instance
- */
+ /** logging instance */
protected static final Log log = LogFactory.getLog(LeafNodeLayoutManager.class);
- /**
- * The inline area that this leafnode will add.
- */
+ /** The inline area that this leafnode will add. */
protected InlineArea curArea = null;
/** Any border, padding and background properties applying to this area */
protected CommonBorderPaddingBackground commonBorderPaddingBackground = null;
protected AlignmentContext alignmentContext = null;
/** Flag to indicate if something was changed as part of the getChangeKnuthElements sequence */
- protected boolean isSomethingChanged = false;
+ protected boolean somethingChanged = false;
/** Our area info for the Knuth elements */
protected AreaInfo areaInfo = null;
*/
protected class AreaInfo {
/** letter space count */
- protected short iLScount;
+ protected short letterSpaces;
/** ipd of area */
protected MinOptMax ipdArea;
/** true if hyphenated */
- protected boolean bHyphenated;
+ protected boolean isHyphenated;
/** alignment context */
protected AlignmentContext alignmentContext;
/**
* Construct an area information item.
- * @param iLS letter space count
+ * @param letterSpaces letter space count
* @param ipd inline progression dimension
- * @param bHyph true if hyphenated
+ * @param isHyphenated true if hyphenated
* @param alignmentContext an alignment context
*/
- public AreaInfo(short iLS, MinOptMax ipd, boolean bHyph,
+ public AreaInfo(short letterSpaces, MinOptMax ipd, boolean isHyphenated,
AlignmentContext alignmentContext) {
- iLScount = iLS;
- ipdArea = ipd;
- bHyphenated = bHyph;
+ this.letterSpaces = letterSpaces;
+ this.ipdArea = ipd;
+ this.isHyphenated = isHyphenated;
this.alignmentContext = alignmentContext;
}
}
-
/**
* Create a Leaf node layout manager.
* @param node the FObj to attach to this LM.
}
/**
- * This is a leaf-node, so this method is never called.
+ * This is a leaf-node, so this method should never be called.
* @param childArea the childArea to add
*/
+ @Override
public void addChildArea(Area childArea) {
+ assert false;
}
/**
- * This is a leaf-node, so this method is never called.
+ * This is a leaf-node, so this method should never be called.
* @param childArea the childArea to get the parent for
* @return the parent area
*/
+ @Override
public Area getParentArea(Area childArea) {
+ assert false;
return null;
}
* @param posIter the position iterator
* @param context the layout context for adding the area
*/
+ @Override
public void addAreas(PositionIterator posIter, LayoutContext context) {
addId();
}
/** {@inheritDoc} */
+ @Override
public List getNextKnuthElements(LayoutContext context, int alignment) {
curArea = get(context);
}
/** {@inheritDoc} */
+ @Override
public List getChangedKnuthElements(List oldList, int alignment) {
if (isFinished()) {
return null;