int iBP;
iBP = bpProps.getPadding(CommonBorderPaddingBackground.START, bNotFirst, context);
if (iBP > 0) {
- area.addTrait(Trait.PADDING_START, new Integer(iBP));
+ area.addTrait(Trait.PADDING_START, iBP);
}
iBP = bpProps.getPadding(CommonBorderPaddingBackground.END, bNotLast, context);
if (iBP > 0) {
- area.addTrait(Trait.PADDING_END, new Integer(iBP));
+ area.addTrait(Trait.PADDING_END, iBP);
}
iBP = bpProps.getPadding(CommonBorderPaddingBackground.BEFORE, false, context);
if (iBP > 0) {
- area.addTrait(Trait.PADDING_BEFORE, new Integer(iBP));
+ area.addTrait(Trait.PADDING_BEFORE, iBP);
}
iBP = bpProps.getPadding(CommonBorderPaddingBackground.AFTER, false, context);
if (iBP > 0) {
- area.addTrait(Trait.PADDING_AFTER, new Integer(iBP));
+ area.addTrait(Trait.PADDING_AFTER, iBP);
}
addBorderTrait(area, bpProps, bNotFirst,
BorderProps.SEPARATE, Trait.BORDER_AFTER);
}
- /**
+ /*
* Sets border traits on an area.
*
* @param area area to set the traits on
int padding = bordProps.getPadding(CommonBorderPaddingBackground.BEFORE,
discardBefore, context);
if (padding != 0) {
- area.addTrait(Trait.PADDING_BEFORE, new java.lang.Integer(padding));
+ area.addTrait(Trait.PADDING_BEFORE, padding);
}
padding = bordProps.getPadding(CommonBorderPaddingBackground.AFTER,
discardAfter, context);
if (padding != 0) {
- area.addTrait(Trait.PADDING_AFTER, new java.lang.Integer(padding));
+ area.addTrait(Trait.PADDING_AFTER, padding);
}
padding = bordProps.getPadding(CommonBorderPaddingBackground.START,
discardStart, context);
if (padding != 0) {
- area.addTrait(Trait.PADDING_START, new java.lang.Integer(padding));
+ area.addTrait(Trait.PADDING_START, padding);
}
padding = bordProps.getPadding(CommonBorderPaddingBackground.END,
discardEnd, context);
if (padding != 0) {
- area.addTrait(Trait.PADDING_END, new java.lang.Integer(padding));
+ area.addTrait(Trait.PADDING_END, padding);
}
}
assert borderInfo != null;
int width = borderInfo.getRetainedWidth();
if (width != 0) {
- BorderProps bps = new BorderProps(borderInfo.getStyle(), width, borderInfo.getColor(),
+ return new BorderProps(borderInfo.getStyle(), width, borderInfo.getColor(),
(outer ? BorderProps.COLLAPSE_OUTER : BorderProps.COLLAPSE_INNER));
- return bps;
} else {
return null;
}
int startIndent, int endIndent,
PercentBaseContext context) {
if (startIndent != 0) {
- area.addTrait(Trait.START_INDENT, new Integer(startIndent));
+ area.addTrait(Trait.START_INDENT, startIndent);
}
int spaceStart = startIndent
- bpProps.getBorderStartWidth(false)
- bpProps.getPaddingStart(false, context);
if (spaceStart != 0) {
- area.addTrait(Trait.SPACE_START, new Integer(spaceStart));
+ area.addTrait(Trait.SPACE_START, spaceStart);
}
if (endIndent != 0) {
- area.addTrait(Trait.END_INDENT, new Integer(endIndent));
+ area.addTrait(Trait.END_INDENT, endIndent);
}
int spaceEnd = endIndent
- bpProps.getBorderEndWidth(false)
- bpProps.getPaddingEnd(false, context);
if (spaceEnd != 0) {
- area.addTrait(Trait.SPACE_END, new Integer(spaceEnd));
+ area.addTrait(Trait.SPACE_END, spaceEnd);
}
}
MinOptMax space, double adjust) {
int effectiveSpace = getEffectiveSpace(adjust, space);
if (effectiveSpace != 0) {
- area.addTrait(spaceTrait, new Integer(effectiveSpace));
+ area.addTrait(spaceTrait, effectiveSpace);
}
}
*/
public static void addFontTraits(Area area, Font font) {
area.addTrait(Trait.FONT, font.getFontTriplet());
- area.addTrait(Trait.FONT_SIZE, new Integer(font.getFontSize()));
+ area.addTrait(Trait.FONT_SIZE, font.getFontSize());
}
/**