public void preserveValues(final Widget widget) { ScrolledComposite composite = (ScrolledComposite) widget; ControlLCAUtil.preserveValues(composite); IWidgetAdapter adapter = WidgetUtil.getAdapter(composite); adapter.preserve(PROP_BOUNDS, composite.getBounds()); adapter.preserve(PROP_OVERFLOW, getOverflow(composite)); adapter.preserve(PROP_H_BAR_SELECTION, getBarSelection(composite.getHorizontalBar())); adapter.preserve(PROP_V_BAR_SELECTION, getBarSelection(composite.getVerticalBar())); adapter.preserve(Props.SELECTION_LISTENERS, Boolean.valueOf(hasSelectionListener(composite))); adapter.preserve(PROP_SHOW_FOCUSED_CONTROL, Boolean.valueOf(composite.getShowFocusedControl())); WidgetLCAUtil.preserveCustomVariant(composite); }
public void preserveValues(final Widget widget) { ControlLCAUtil.preserveValues((Control) widget); Shell shell = (Shell) widget; IWidgetAdapter adapter = WidgetUtil.getAdapter(shell); adapter.preserve(PROP_ACTIVE_CONTROL, getActiveControl(shell)); adapter.preserve(PROP_ACTIVE_SHELL, shell.getDisplay().getActiveShell()); adapter.preserve(PROP_TEXT, shell.getText()); adapter.preserve(PROP_IMAGE, shell.getImage()); adapter.preserve(PROP_ALPHA, new Integer(shell.getAlpha())); adapter.preserve(PROP_MODE, getMode(shell)); adapter.preserve(PROP_FULLSCREEN, Boolean.valueOf(shell.getFullScreen())); adapter.preserve(PROP_SHELL_LISTENER, Boolean.valueOf(ShellEvent.hasListener(shell))); adapter.preserve(PROP_SHELL_MENU, shell.getMenuBar()); adapter.preserve(PROP_MINIMUM_SIZE, shell.getMinimumSize()); WidgetLCAUtil.preserveCustomVariant(shell); }
public void preserveValues(final Widget widget) { Tree tree = (Tree) widget; ControlLCAUtil.preserveValues((Control) widget); IWidgetAdapter adapter = WidgetUtil.getAdapter(tree); adapter.preserve(PROP_SELECTION_LISTENERS, Boolean.valueOf(SelectionEvent.hasListener(tree))); adapter.preserve(PROP_HEADER_HEIGHT, new Integer(tree.getHeaderHeight())); adapter.preserve(PROP_HEADER_VISIBLE, Boolean.valueOf(tree.getHeaderVisible())); int[] values = tree.getColumnOrder(); Integer[] columnOrder = new Integer[values.length]; for (int i = 0; i < values.length; i++) { columnOrder[i] = new Integer(values[i]); } adapter.preserve(PROP_COLUMN_ORDER, columnOrder); adapter.preserve(PROP_SCROLL_LEFT, getScrollLeft(tree)); adapter.preserve(PROP_HAS_H_SCROLL_BAR, hasHScrollBar(tree)); adapter.preserve(PROP_HAS_V_SCROLL_BAR, hasVScrollBar(tree)); WidgetLCAUtil.preserveCustomVariant(tree); }