public void readData(final Widget widget) { // HttpServletRequest request = ContextProvider.getRequest(); // String parameter = request.getParameter( "JSON" ); // if( parameter != null ) { // System.out.println( "#### BEGIN ####"); // System.out.println( parameter ); // System.out.println( "#### END ####"); // } Shell shell = (Shell) widget; // [if] Preserve the menu bounds before setting the new shell bounds. preserveMenuBounds(shell); // Important: Order matters, readMode() before readBounds() readBounds(shell); if (WidgetLCAUtil.wasEventSent(shell, JSConst.EVENT_SHELL_CLOSED)) { shell.close(); } processActiveShell(shell); processActivate(shell); ControlLCAUtil.processMouseEvents(shell); ControlLCAUtil.processKeyEvents(shell); ControlLCAUtil.processMenuDetect(shell); WidgetLCAUtil.processHelp(shell); }
public void readData(final Widget widget) { Tree tree = (Tree) widget; readSelection(tree); readScrollPosition(tree); processWidgetSelectedEvent(tree); processWidgetDefaultSelectedEvent(tree); ControlLCAUtil.processMouseEvents(tree); ControlLCAUtil.processKeyEvents(tree); ControlLCAUtil.processMenuDetect(tree); WidgetLCAUtil.processHelp(tree); }
public void renderChanges(final Widget widget) throws IOException { Tree tree = (Tree) widget; ControlLCAUtil.writeChanges(tree); updateSelectionListener(tree); writeHeaderHeight(tree); writeHeaderVisible(tree); writeColumnOrder(tree); writeScrollLeft(tree); writeOverflow(tree); WidgetLCAUtil.writeCustomVariant(tree); }
public void renderChanges(final Widget widget) throws IOException { ScrolledComposite composite = (ScrolledComposite) widget; ControlLCAUtil.writeChanges(composite); writeClipBounds(composite); // TODO [rh] initial positioning of the client-side scroll bar does not work writeBarSelection(composite); // [if] Order is important: writeScrollBars after writeBarSelection writeScrollBars(composite); writeSelectionListener(composite); writeShowFocusedControl(composite); WidgetLCAUtil.writeCustomVariant(composite); }
public void readData(final Widget widget) { ScrolledComposite composite = (ScrolledComposite) widget; Point origin = composite.getOrigin(); String value = WidgetLCAUtil.readPropertyValue(widget, PARAM_H_BAR_SELECTION); ScrollBar hScroll = composite.getHorizontalBar(); if (value != null && hScroll != null) { origin.x = Integer.parseInt(value); processSelection(hScroll); } value = WidgetLCAUtil.readPropertyValue(widget, PARAM_V_BAR_SELECTION); ScrollBar vScroll = composite.getVerticalBar(); if (value != null && vScroll != null) { origin.y = Integer.parseInt(value); processSelection(vScroll); } composite.setOrigin(origin); ControlLCAUtil.processMouseEvents(composite); ControlLCAUtil.processKeyEvents(composite); ControlLCAUtil.processMenuDetect(composite); WidgetLCAUtil.processHelp(composite); }
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 renderInitialization(final Widget widget) throws IOException { Tree tree = (Tree) widget; JSWriter writer = JSWriter.getWriterFor(tree); StringBuffer style = new StringBuffer(); if ((tree.getStyle() & SWT.MULTI) != 0) { style.append("multi|"); } if ((tree.getStyle() & SWT.CHECK) != 0) { style.append("check|"); } if ((tree.getStyle() & SWT.VIRTUAL) != 0) { style.append("virtual|"); } writer.newWidget("org.eclipse.swt.widgets.Tree", new Object[] {style.toString()}); ControlLCAUtil.writeStyleFlags(tree); }
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); }
public void renderChanges(final Widget widget) throws IOException { Shell shell = (Shell) widget; writeImage(shell); writeText(shell); writeAlpha(shell); // Important: Order matters, writing setActive() before open() leads to // strange behavior! writeOpen(shell); writeActiveShell(shell); // Important: Order matters, write setMode() after open() and before // setBounds() - see bug 302224 writeMode(shell); writeFullScreen(shell); writeCloseListener(shell); writeMinimumSize(shell); writeDefaultButton(shell); ControlLCAUtil.writeChanges(shell); WidgetLCAUtil.writeCustomVariant(shell); }
public void renderInitialization(final Widget widget) throws IOException { ScrolledComposite scrolledComposite = (ScrolledComposite) widget; JSWriter writer = JSWriter.getWriterFor(scrolledComposite); writer.newWidget(QX_TYPE); ControlLCAUtil.writeStyleFlags(scrolledComposite); }