Пример #1
0
  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);
  }
Пример #2
0
 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 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);
 }