private static void renderSelectionBackgroundGradient(CTabFolder folder) { ICTabFolderAdapter adapter = getCTabFolderAdapter(folder); IWidgetGraphicsAdapter gfxAdapter = adapter.getUserSelectionBackgroundGradient(); Color[] bgGradientColors = gfxAdapter.getBackgroundGradientColors(); int[] bgGradientPercents = gfxAdapter.getBackgroundGradientPercents(); Boolean bgGradientVertical = Boolean.valueOf(gfxAdapter.isBackgroundGradientVertical()); boolean hasChanged = WidgetLCAUtil.hasChanged(folder, PROP_SELECTION_BG_GRADIENT_COLORS, bgGradientColors, null) || WidgetLCAUtil.hasChanged( folder, PROP_SELECTION_BG_GRADIENT_PERCENTS, bgGradientPercents, null) || WidgetLCAUtil.hasChanged( folder, PROP_SELECTION_BG_GRADIENT_VERTICAL, bgGradientVertical, Boolean.FALSE); if (hasChanged) { JsonValue gradient = JsonValue.NULL; if (bgGradientColors != null) { JsonArray colors = new JsonArray(); for (int i = 0; i < bgGradientColors.length; i++) { colors.add(toJson(bgGradientColors[i])); } JsonValue percents = createJsonArray(bgGradientPercents); gradient = new JsonArray().add(colors).add(percents).add(bgGradientVertical.booleanValue()); } getRemoteObject(folder).set(PROP_SELECTION_BG_GRADIENT, gradient); } }
@Override public void renderChanges(ExpandItem item) throws IOException { WidgetLCAUtil.renderCustomVariant(item); WidgetLCAUtil.renderBounds(item, getBounds(item)); ItemLCAUtil.renderChanges(item); renderProperty(item, PROP_EXPANDED, item.getExpanded(), false); renderProperty(item, PROP_HEADER_HEIGHT, item.getHeaderHeight(), DEFAULT_HEADER_HEIGHT); }
@Override public void preserveValues(ExpandItem item) { WidgetLCAUtil.preserveBounds(item, getBounds(item)); ItemLCAUtil.preserve(item); preserveProperty(item, PROP_EXPANDED, item.getExpanded()); preserveProperty(item, PROP_HEADER_HEIGHT, item.getHeaderHeight()); }
@Override public void renderChanges(CTabFolder folder) throws IOException { ControlLCAUtil.renderChanges(folder); WidgetLCAUtil.renderCustomVariant(folder); renderProperty(folder, PROP_TAB_POSITION, getTabPosition(folder), DEFAULT_TAB_POSITION); renderProperty(folder, PROP_TAB_HEIGHT, folder.getTabHeight(), DEFAULT_TAB_HEIGHT); renderProperty(folder, PROP_MIN_MAX_STATE, getMinMaxState(folder), DEFAULT_MIN_MAX_STATE); renderProperty(folder, PROP_MINIMIZE_BOUNDS, getMinimizeBounds(folder), ZERO_BOUNDS); renderProperty(folder, PROP_MINIMIZE_VISIBLE, folder.getMinimizeVisible(), false); renderProperty(folder, PROP_MAXIMIZE_BOUNDS, getMaximizeBounds(folder), ZERO_BOUNDS); renderProperty(folder, PROP_MAXIMIZE_VISIBLE, folder.getMaximizeVisible(), false); renderProperty(folder, PROP_CHEVRON_BOUNDS, getChevronBounds(folder), ZERO_BOUNDS); renderProperty(folder, PROP_CHEVRON_VISIBLE, getChevronVisible(folder), false); renderProperty(folder, PROP_UNSELECTED_CLOSE_VISIBLE, folder.getUnselectedCloseVisible(), true); renderProperty(folder, PROP_SELECTION, folder.getSelection(), null); renderProperty(folder, PROP_SELECTION_BACKGROUND, getSelectionBackground(folder), null); renderProperty(folder, PROP_SELECTION_FOREGROUND, getSelectionForeground(folder), null); renderProperty( folder, PROP_SELECTION_BACKGROUND_IMAGE, getSelectionBackgroundImage(folder), null); renderSelectionBackgroundGradient(folder); renderProperty(folder, PROP_BORDER_VISIBLE, folder.getBorderVisible(), false); renderListenDefaultSelection(folder); }