/** * Process the color tags - labelcolor and valuecolor * * @param w * The widget to process * @param snippet * The snippet to translate * @return The updated snippet */ protected String processColor(Widget w, String originalSnippet) { String style = ""; String color = ""; String snippet = originalSnippet; color = itemUIRegistry.getLabelColor(w); if (color != null) { style = "style=\"color:" + color + "\""; } snippet = StringUtils.replace(snippet, "%labelstyle%", style); style = ""; color = itemUIRegistry.getValueColor(w); if (color != null) { style = "style=\"color:" + color + "\""; } snippet = StringUtils.replace(snippet, "%valuestyle%", style); return snippet; }
String color = itemUIRegistry.getLabelColor(w); if (color != null) { style = "color:" + color;
event.pageId = pageId; event.label = itemUIRegistry.getLabel(w); event.labelcolor = itemUIRegistry.getLabelColor(w); event.valuecolor = itemUIRegistry.getValueColor(w); event.widgetId = itemUIRegistry.getWidgetId(w);
private Set<SitemapEvent> constructSitemapEvents(Item item, List<Widget> widgets) { Set<SitemapEvent> events = new HashSet<>(); for (Widget w : widgets) { if (w instanceof Frame) { events.addAll(constructSitemapEvents(item, itemUIRegistry.getChildren((Frame) w))); } if ((w.getItem() != null && w.getItem().equals(item.getName())) || definesVisibility(w, item.getName())) { SitemapWidgetEvent event = new SitemapWidgetEvent(); event.sitemapName = sitemapName; event.pageId = pageId; event.label = itemUIRegistry.getLabel(w); event.labelcolor = itemUIRegistry.getLabelColor(w); event.valuecolor = itemUIRegistry.getValueColor(w); event.widgetId = itemUIRegistry.getWidgetId(w); event.visibility = itemUIRegistry.getVisiblity(w); event.item = EnrichedItemDTOMapper.map(item, false, null, null); // adjust the state according to the widget type event.item.state = itemUIRegistry.getState(w).toFullString(); events.add(event); } } return events; }
bean.labelcolor = itemUIRegistry.getLabelColor(widget); bean.valuecolor = itemUIRegistry.getValueColor(widget); bean.label = itemUIRegistry.getLabel(widget);
bean.labelcolor = itemUIRegistry.getLabelColor(widget); bean.valuecolor = itemUIRegistry.getValueColor(widget); bean.label = itemUIRegistry.getLabel(widget);