public class EventActionBarRenderer extends RendererBase {
@Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
EventActionBar actionBar = (EventActionBar) component;
ResponseWriter writer = context.getResponseWriter();
writer.startElement("div", actionBar);
String clientId = actionBar.getClientId(context);
writer.writeAttribute("id", clientId, null);
Rendering.writeStandardEvents(writer, actionBar);
TimetableView timeTable = (TimetableView) actionBar.getParent();
if (!(timeTable instanceof MonthTable)) {
writer.writeText(actionBar.getNoteText(), null);
}
writer.endElement("div");
String userSpecifiedStyle = Styles.getCSSClass(context, actionBar, actionBar.getStyle(), actionBar.getStyleClass());
JSONArray eventActions = getEventActions(context, actionBar);
double actionRolloverBackgroundIntensity = actionBar.getActionRolloverBackgroundIntensity();
double actionPressedBackgroundIntensity = actionBar.getActionPressedBackgroundIntensity();
Rendering.renderInitScript(context, new ScriptBuilder().initScript(context, actionBar, "O$.Timetable._initEventActionBar",
actionBar.getBackgroundIntensity(),
userSpecifiedStyle,
eventActions,
actionRolloverBackgroundIntensity,
actionPressedBackgroundIntensity));
Styles.renderStyleClasses(context, actionBar);