m.setDefault("medium");
addPropertyMaker("volume", m);
}
private void createBorderPaddingBackgroundProperties() { // CSOK: MethodLength
PropertyMaker m;
BorderWidthPropertyMaker bwm;
CorrespondingPropertyMaker corr;
// background-attachment
m = new EnumProperty.Maker(PR_BACKGROUND_ATTACHMENT);
m.setInherited(false);
m.addEnum("scroll", getEnumProperty(EN_SCROLL, "SCROLL"));
m.addEnum("fixed", getEnumProperty(EN_FIXED, "FIXED"));
m.setDefault("scroll");
addPropertyMaker("background-attachment", m);
// background-color
m = new ColorProperty.Maker(PR_BACKGROUND_COLOR) {
protected Property convertPropertyDatatype(
Property p, PropertyList propertyList, FObj fo) throws PropertyException {
String nameval = p.getNCname();
if (nameval != null) {
FObj fobj = (fo == null ? propertyList.getFObj() : fo);
FOUserAgent ua = (fobj == null ? null : fobj.getUserAgent());
return ColorProperty.getInstance(ua, nameval);
}
return super.convertPropertyDatatype(p, propertyList, fo);
}
};
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("transparent");
addPropertyMaker("background-color", m);
// background-image
m = new StringProperty.Maker(PR_BACKGROUND_IMAGE);
m.setInherited(false);
m.setDefault("none");
addPropertyMaker("background-image", m);
// background-repeat
m = new EnumProperty.Maker(PR_BACKGROUND_REPEAT);
m.setInherited(false);
m.addEnum("repeat", getEnumProperty(EN_REPEAT, "REPEAT"));
m.addEnum("repeat-x", getEnumProperty(EN_REPEATX, "REPEATX"));
m.addEnum("repeat-y", getEnumProperty(EN_REPEATY, "REPEATY"));
m.addEnum("no-repeat", getEnumProperty(EN_NOREPEAT, "NOREPEAT"));
m.setDefault("repeat");
addPropertyMaker("background-repeat", m);
// background-position-horizontal
m = new LengthProperty.Maker(PR_BACKGROUND_POSITION_HORIZONTAL);
m.setInherited(false);
m.setDefault("0pt");
m.addKeyword("left", "0pt");
m.addKeyword("center", "50%");
m.addKeyword("right", "100%");
m.setPercentBase(LengthBase.IMAGE_BACKGROUND_POSITION_HORIZONTAL);
m.addShorthand(generics[PR_BACKGROUND_POSITION]);
addPropertyMaker("background-position-horizontal", m);
// background-position-vertical
m = new LengthProperty.Maker(PR_BACKGROUND_POSITION_VERTICAL);
m.setInherited(false);
m.setDefault("0pt");
m.addKeyword("top", "0pt");
m.addKeyword("center", "50%");
m.addKeyword("bottom", "100%");
m.setPercentBase(LengthBase.IMAGE_BACKGROUND_POSITION_VERTICAL);
m.addShorthand(generics[PR_BACKGROUND_POSITION]);
addPropertyMaker("background-position-vertical", m);
// border-before-color
m = new ColorProperty.Maker(PR_BORDER_BEFORE_COLOR);
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_TOP_COLOR, PR_BORDER_TOP_COLOR,
PR_BORDER_RIGHT_COLOR, PR_BORDER_LEFT_COLOR);
corr.setRelative(true);
addPropertyMaker("border-before-color", m);
// border-before-style
m = new EnumProperty.Maker(PR_BORDER_BEFORE_STYLE);
m.useGeneric(genericBorderStyle);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_TOP_STYLE, PR_BORDER_TOP_STYLE,
PR_BORDER_RIGHT_STYLE, PR_BORDER_LEFT_STYLE);
corr.setRelative(true);
addPropertyMaker("border-before-style", m);
// border-before-width
m = new CondLengthProperty.Maker(PR_BORDER_BEFORE_WIDTH);
m.useGeneric(genericCondBorderWidth);
m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_TOP_WIDTH, PR_BORDER_TOP_WIDTH,
PR_BORDER_RIGHT_WIDTH, PR_BORDER_LEFT_WIDTH);
corr.setRelative(true);
addPropertyMaker("border-before-width", m);
// border-after-color
m = new ColorProperty.Maker(PR_BORDER_AFTER_COLOR);
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_BOTTOM_COLOR, PR_BORDER_BOTTOM_COLOR,
PR_BORDER_LEFT_COLOR, PR_BORDER_RIGHT_COLOR);
corr.setRelative(true);
addPropertyMaker("border-after-color", m);
// border-after-style
m = new EnumProperty.Maker(PR_BORDER_AFTER_STYLE);
m.useGeneric(genericBorderStyle);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_BOTTOM_STYLE, PR_BORDER_BOTTOM_STYLE,
PR_BORDER_LEFT_STYLE, PR_BORDER_RIGHT_STYLE);
corr.setRelative(true);
addPropertyMaker("border-after-style", m);
// border-after-width
m = new CondLengthProperty.Maker(PR_BORDER_AFTER_WIDTH);
m.useGeneric(genericCondBorderWidth);
m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_BOTTOM_WIDTH, PR_BORDER_BOTTOM_WIDTH,
PR_BORDER_LEFT_WIDTH, PR_BORDER_LEFT_WIDTH);
corr.setRelative(true);
addPropertyMaker("border-after-width", m);
// border-start-color
m = new ColorProperty.Maker(PR_BORDER_START_COLOR);
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_LEFT_COLOR, PR_BORDER_RIGHT_COLOR,
PR_BORDER_TOP_COLOR, PR_BORDER_TOP_COLOR);
corr.setRelative(true);
addPropertyMaker("border-start-color", m);
// border-start-style
m = new EnumProperty.Maker(PR_BORDER_START_STYLE);
m.useGeneric(genericBorderStyle);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_LEFT_STYLE, PR_BORDER_RIGHT_STYLE,
PR_BORDER_TOP_STYLE, PR_BORDER_TOP_STYLE);
corr.setRelative(true);
addPropertyMaker("border-start-style", m);
// border-start-width
m = new CondLengthProperty.Maker(PR_BORDER_START_WIDTH);
m.useGeneric(genericCondBorderWidth);
m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_LEFT_WIDTH, PR_BORDER_RIGHT_WIDTH,
PR_BORDER_TOP_WIDTH, PR_BORDER_TOP_WIDTH);
corr.setRelative(true);
addPropertyMaker("border-start-width", m);
// border-end-color
m = new ColorProperty.Maker(PR_BORDER_END_COLOR);
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_RIGHT_COLOR, PR_BORDER_LEFT_COLOR,
PR_BORDER_BOTTOM_COLOR, PR_BORDER_BOTTOM_COLOR);
corr.setRelative(true);
addPropertyMaker("border-end-color", m);
// border-end-style
m = new EnumProperty.Maker(PR_BORDER_END_STYLE);
m.useGeneric(genericBorderStyle);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_RIGHT_STYLE, PR_BORDER_LEFT_STYLE,
PR_BORDER_BOTTOM_STYLE, PR_BORDER_BOTTOM_STYLE);
corr.setRelative(true);
addPropertyMaker("border-end-style", m);
// border-end-width
m = new CondLengthProperty.Maker(PR_BORDER_END_WIDTH);
m.useGeneric(genericCondBorderWidth);
m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_RIGHT_WIDTH, PR_BORDER_LEFT_WIDTH,
PR_BORDER_BOTTOM_WIDTH, PR_BORDER_BOTTOM_WIDTH);
corr.setRelative(true);
addPropertyMaker("border-end-width", m);
// border-top-color
m = new ColorProperty.Maker(PR_BORDER_TOP_COLOR);
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
m.addShorthand(generics[PR_BORDER_TOP]);
m.addShorthand(generics[PR_BORDER_COLOR]);
m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_BEFORE_COLOR, PR_BORDER_BEFORE_COLOR,
PR_BORDER_START_COLOR, PR_BORDER_START_COLOR);
addPropertyMaker("border-top-color", m);
// border-top-style
m = new EnumProperty.Maker(PR_BORDER_TOP_STYLE);
m.useGeneric(genericBorderStyle);
m.addShorthand(generics[PR_BORDER_TOP]);
m.addShorthand(generics[PR_BORDER_STYLE]);
m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_BEFORE_STYLE, PR_BORDER_BEFORE_STYLE,
PR_BORDER_START_STYLE, PR_BORDER_START_STYLE);
addPropertyMaker("border-top-style", m);
// border-top-width
bwm = new BorderWidthPropertyMaker(PR_BORDER_TOP_WIDTH);
bwm.useGeneric(genericBorderWidth);
bwm.setBorderStyleId(PR_BORDER_TOP_STYLE);
bwm.addShorthand(generics[PR_BORDER_TOP]);
bwm.addShorthand(generics[PR_BORDER_WIDTH]);
bwm.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(bwm);
corr.setCorresponding(PR_BORDER_BEFORE_WIDTH, PR_BORDER_BEFORE_WIDTH,
PR_BORDER_START_WIDTH, PR_BORDER_START_WIDTH);
addPropertyMaker("border-top-width", bwm);
// border-bottom-color
m = new ColorProperty.Maker(PR_BORDER_BOTTOM_COLOR);
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
m.addShorthand(generics[PR_BORDER_BOTTOM]);
m.addShorthand(generics[PR_BORDER_COLOR]);
m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_AFTER_COLOR, PR_BORDER_AFTER_COLOR,
PR_BORDER_END_COLOR, PR_BORDER_END_COLOR);
addPropertyMaker("border-bottom-color", m);
// border-bottom-style
m = new EnumProperty.Maker(PR_BORDER_BOTTOM_STYLE);
m.useGeneric(genericBorderStyle);
m.addShorthand(generics[PR_BORDER_BOTTOM]);
m.addShorthand(generics[PR_BORDER_STYLE]);
m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_AFTER_STYLE, PR_BORDER_AFTER_STYLE,
PR_BORDER_END_STYLE, PR_BORDER_END_STYLE);
addPropertyMaker("border-bottom-style", m);
// border-bottom-width
bwm = new BorderWidthPropertyMaker(PR_BORDER_BOTTOM_WIDTH);
bwm.useGeneric(genericBorderWidth);
bwm.setBorderStyleId(PR_BORDER_BOTTOM_STYLE);
bwm.addShorthand(generics[PR_BORDER_BOTTOM]);
bwm.addShorthand(generics[PR_BORDER_WIDTH]);
bwm.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(bwm);
corr.setCorresponding(PR_BORDER_AFTER_WIDTH, PR_BORDER_AFTER_WIDTH,
PR_BORDER_END_WIDTH, PR_BORDER_END_WIDTH);
addPropertyMaker("border-bottom-width", bwm);
// border-left-color
m = new ColorProperty.Maker(PR_BORDER_LEFT_COLOR);
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
m.addShorthand(generics[PR_BORDER_LEFT]);
m.addShorthand(generics[PR_BORDER_COLOR]);
m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_START_COLOR, PR_BORDER_END_COLOR,
PR_BORDER_AFTER_COLOR, PR_BORDER_BEFORE_COLOR);
addPropertyMaker("border-left-color", m);
// border-left-style
m = new EnumProperty.Maker(PR_BORDER_LEFT_STYLE);
m.useGeneric(genericBorderStyle);
m.addShorthand(generics[PR_BORDER_LEFT]);
m.addShorthand(generics[PR_BORDER_STYLE]);
m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_START_STYLE, PR_BORDER_END_STYLE,
PR_BORDER_AFTER_STYLE, PR_BORDER_BEFORE_STYLE);
addPropertyMaker("border-left-style", m);
// border-left-width
bwm = new BorderWidthPropertyMaker(PR_BORDER_LEFT_WIDTH);
bwm.useGeneric(genericBorderWidth);
bwm.setBorderStyleId(PR_BORDER_LEFT_STYLE);
bwm.addShorthand(generics[PR_BORDER_LEFT]);
bwm.addShorthand(generics[PR_BORDER_WIDTH]);
bwm.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(bwm);
corr.setCorresponding(PR_BORDER_START_WIDTH, PR_BORDER_END_WIDTH,
PR_BORDER_AFTER_WIDTH, PR_BORDER_BEFORE_WIDTH);
addPropertyMaker("border-left-width", bwm);
// border-right-color
m = new ColorProperty.Maker(PR_BORDER_RIGHT_COLOR);
m.useGeneric(genericColor);
m.setInherited(false);
m.setDefault("black");
m.addShorthand(generics[PR_BORDER_RIGHT]);
m.addShorthand(generics[PR_BORDER_COLOR]);
m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_END_COLOR, PR_BORDER_START_COLOR,
PR_BORDER_BEFORE_COLOR, PR_BORDER_AFTER_COLOR);
addPropertyMaker("border-right-color", m);
// border-right-style
m = new EnumProperty.Maker(PR_BORDER_RIGHT_STYLE);
m.useGeneric(genericBorderStyle);
m.addShorthand(generics[PR_BORDER_RIGHT]);
m.addShorthand(generics[PR_BORDER_STYLE]);
m.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_BORDER_END_STYLE, PR_BORDER_START_STYLE,
PR_BORDER_BEFORE_STYLE, PR_BORDER_AFTER_STYLE);
addPropertyMaker("border-right-style", m);
// border-right-width
bwm = new BorderWidthPropertyMaker(PR_BORDER_RIGHT_WIDTH);
bwm.useGeneric(genericBorderWidth);
bwm.setBorderStyleId(PR_BORDER_RIGHT_STYLE);
bwm.addShorthand(generics[PR_BORDER_RIGHT]);
bwm.addShorthand(generics[PR_BORDER_WIDTH]);
bwm.addShorthand(generics[PR_BORDER]);
corr = new CorrespondingPropertyMaker(bwm);
corr.setCorresponding(PR_BORDER_END_WIDTH, PR_BORDER_START_WIDTH,
PR_BORDER_BEFORE_WIDTH, PR_BORDER_AFTER_WIDTH);
addPropertyMaker("border-right-width", bwm);
// padding-before
m = new CondLengthProperty.Maker(PR_PADDING_BEFORE);
m.useGeneric(genericCondPadding);
m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_PADDING_TOP, PR_PADDING_TOP,
PR_PADDING_RIGHT, PR_PADDING_LEFT);
corr.setRelative(true);
addPropertyMaker("padding-before", m);
// padding-after
m = new CondLengthProperty.Maker(PR_PADDING_AFTER);
m.useGeneric(genericCondPadding);
m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_PADDING_BOTTOM, PR_PADDING_BOTTOM,
PR_PADDING_LEFT, PR_PADDING_RIGHT);
corr.setRelative(true);
addPropertyMaker("padding-after", m);
// padding-start
m = new CondLengthProperty.Maker(PR_PADDING_START);
m.useGeneric(genericCondPadding);
m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_PADDING_LEFT, PR_PADDING_RIGHT,
PR_PADDING_TOP, PR_PADDING_TOP);
corr.setRelative(true);
addPropertyMaker("padding-start", m);
// padding-end
m = new CondLengthProperty.Maker(PR_PADDING_END);
m.useGeneric(genericCondPadding);
m.getSubpropMaker(CP_CONDITIONALITY).setDefault("discard");
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_PADDING_RIGHT, PR_PADDING_LEFT,
PR_PADDING_BOTTOM, PR_PADDING_BOTTOM);
corr.setRelative(true);
addPropertyMaker("padding-end", m);
// padding-top
m = new LengthProperty.Maker(PR_PADDING_TOP);
m.useGeneric(genericPadding);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_PADDING_BEFORE, PR_PADDING_BEFORE,
PR_PADDING_START, PR_PADDING_START);
addPropertyMaker("padding-top", m);
// padding-bottom
m = new LengthProperty.Maker(PR_PADDING_BOTTOM);
m.useGeneric(genericPadding);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_PADDING_AFTER, PR_PADDING_AFTER,
PR_PADDING_END, PR_PADDING_END);
addPropertyMaker("padding-bottom", m);
// padding-left
m = new LengthProperty.Maker(PR_PADDING_LEFT);
m.useGeneric(genericPadding);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_PADDING_START, PR_PADDING_END,
PR_PADDING_AFTER, PR_PADDING_BEFORE);
addPropertyMaker("padding-left", m);
// padding-right
m = new LengthProperty.Maker(PR_PADDING_RIGHT);
m.useGeneric(genericPadding);
corr = new CorrespondingPropertyMaker(m);
corr.setCorresponding(PR_PADDING_END, PR_PADDING_START,
PR_PADDING_BEFORE, PR_PADDING_AFTER);
addPropertyMaker("padding-right", m);
}