@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); // This is an obsolete hack that was required before Map<Conenctor, ?> // was supported. The workaround is to instead use a Map<String, ?> with // the connector id as the key, but that can only be used once the // connector has been attached. getState().childCss.clear(); for (Iterator<Component> ci = getComponentIterator(); ci.hasNext();) { Component child = ci.next(); String componentCssString = getCss(child); if (componentCssString != null) { getState().childCss.put(child, componentCssString); } } }
@Override protected String getCss(Component c) { if (c instanceof QueueRolePermissionBox) { String basicCss = "float: left; margin: 3px; margin-bottom: 8px; padding: 3px; display: inline; font-weight: bold; border: 2px solid "; return basicCss + "#287ece; -moz-border-radius: 5px; border-radius: 5px; padding-left: 6px; padding-right: 6px;"; } return super.getCss(c); } };
@Override protected String getCss(Component c) { if (c instanceof PermissionWrapperBox) { String basicCss = "float: left; margin: 3px; margin-bottom: 8px; padding: 3px; display: inline; font-weight: bold; border: 2px solid "; return basicCss + "#287ece; -moz-border-radius: 5px; border-radius: 5px; padding-left: 6px; padding-right: 6px;"; } return super.getCss(c); } };
@Override protected String getCss(Component component) { if (component instanceof WidgetInfoDnDWrapper) { WidgetInfoDnDWrapper wrapper = (WidgetInfoDnDWrapper) component; String basicCss = "float: left; margin: 3px; padding: 3px; display: inline; font-weight: bold; border: 2px solid "; return basicCss + (nvl(wrapper.widgetItem.getChildrenAllowed(), false) ? "#287ece;" : "#60b30e;"); } return super.getCss(component); } };
@Override protected String getCss(Component c) { if (c instanceof WidgetDragAndDropWrapper) { WidgetDragAndDropWrapper widgetDragAndDropWrapper = (WidgetDragAndDropWrapper) c; Class cls = widgetDragAndDropWrapper.getCls(); String basicCss = "float: left; margin: 3px; padding: 3px; display: inline; font-weight: bold; border: 2px solid "; if (getFieldAnnotation(cls, XmlElements.class) != null) return basicCss + "#287ece;"; else if (WidgetElement.class.isAssignableFrom(cls)) return basicCss + "#60b30e;"; else return basicCss + "#c6c6c6"; } return super.getCss(c); } };