Rendering.renderHiddenField(writer,
component.getClientId(context) + SELECTED_INDEX_SUFFIX,
String.valueOf(selectedIndex));
TabPlacement placement = tabSet.getPlacement();
if (placement == null) {
placement = TabPlacement.TOP;
}
List<Object> borderSideNames = borderNames.getListWithFirst(placement, -1);
String borderMask = "border-{0}: {4}; border-{1}: {4}; border-{2}: {4}; border-{3}: {5};";
String frontBorderClass = FRONT_BORDER_CLASS_PREFIX + placement;
int gapWidth = tabSet.getGapWidth();
boolean hasGap = gapWidth > 0;
String borderMaskPre;
if (hasGap) {
borderMaskPre = "border-{0}: {4}; border-{1}: {4}; border-{2}: {4}; border-{3}: {5};";
} else {
borderMaskPre = "border-{0}: {4}; border-{1}: {4}; border-{2}: 0px; border-{3}: {5};";
}
String backBorderClassPre = BACK_BORDER_CLASS_PREFIX + placement;
String borderMaskPost;
if (hasGap) {
borderMaskPost = borderMaskPre;
} else {
borderMaskPost = "border-{0}: 0px;border-{1}: {4};border-{2}: {4};border-{3}: {5};";
}
String backBorderClassPost = backBorderClassPre;
String frontBorderStyle = tabSet.getFrontBorderStyle();
boolean frontBorderDefined = frontBorderStyle != null && frontBorderStyle.length() > 0;
if (frontBorderDefined) {
String frontBorder = formatBorderClassString(borderMask, borderSideNames, frontBorderStyle, "0px");
frontBorderClass = Styles.getCSSClass(context, tabSet, frontBorder, frontBorderClass);
}
String backBorderStyle = tabSet.getBackBorderStyle();
boolean backBorderDefined = backBorderStyle != null && backBorderStyle.length() > 0;
if (backBorderDefined || frontBorderDefined) {
String backBorderPre = formatBorderClassString(borderMaskPre, borderSideNames, backBorderStyle, frontBorderStyle);
backBorderClassPre = Styles.getCSSClass(context, tabSet, backBorderPre, backBorderClassPre);
String backBorderPost = formatBorderClassString(borderMaskPost, borderSideNames, backBorderStyle, frontBorderStyle);
backBorderClassPost = Styles.getCSSClass(context, component, backBorderPost);
}
String defaultClass = DEFAULT_CLASS_PREFIX + placement;
/**/
String tabClass = Styles.getCSSClass(context, component, tabSet.getTabStyle(), defaultClass, tabSet.getTabClass());
String defaultRolloverClass = DEFAULT_ROLLOVER_CLASS_PREFIX + placement;
String rolloverClass = Styles.getCSSClass(context, component, tabSet.getRolloverTabStyle(), StyleGroup.rolloverStyleGroup(), tabSet.getRolloverTabClass(), defaultRolloverClass);
String defaultSelectedClass = DEFAULT_SELECTED_STYLE.format(new Object[]{placement});
String selectedClass = Styles.getStyleClassesStr(context, component, tabSet.getSelectedTabStyle(), tabSet.getSelectedTabClass(), defaultSelectedClass, StyleGroup.selectedStyleGroup());
String defaultSelectedRolloverClass = DEFAULT_SELECTED_ROLLOVER_CLASS_PREFIX + placement.toString();
String selectedRolloverClass = Styles.getCSSClass(context, component, tabSet.getRolloverSelectedTabStyle(), StyleGroup.selectedStyleGroup(1), tabSet.getRolloverSelectedTabClass(), defaultSelectedRolloverClass);
String focusedTabClass = Styles.getStyleClassesStr(context, component, tabSet.getFocusedTabStyle(), tabSet.getFocusedTabClass(), null, StyleGroup.selectedStyleGroup(2));
/// focus area style
String defaultFocusedClass = Styles.getCSSClass(context, component, Rendering.DEFAULT_FOCUSED_STYLE, StyleGroup.selectedStyleGroup(1));
String focusAreaClass = Styles.getCSSClass(context, component, tabSet.getFocusAreaStyle(),