示例#1
0
 private static void processWidgetDefaultSelectedEvent(final Tree tree) {
   HttpServletRequest request = ContextProvider.getRequest();
   String eventName = JSConst.EVENT_WIDGET_DEFAULT_SELECTED;
   if (WidgetLCAUtil.wasEventSent(tree, eventName)) {
     String itemId = request.getParameter(eventName + ".item");
     Item treeItem = (Item) WidgetUtil.find(tree, itemId);
     int eventType = SelectionEvent.WIDGET_DEFAULT_SELECTED;
     SelectionEvent event = new SelectionEvent(tree, treeItem, eventType);
     event.stateMask = EventLCAUtil.readStateMask(JSConst.EVENT_WIDGET_SELECTED_MODIFIER);
     event.processEvent();
   }
 }
示例#2
0
 private static void processWidgetSelectedEvent(final Tree tree) {
   HttpServletRequest request = ContextProvider.getRequest();
   String eventName = JSConst.EVENT_WIDGET_SELECTED;
   if (WidgetLCAUtil.wasEventSent(tree, eventName)) {
     Rectangle bounds = new Rectangle(0, 0, 0, 0);
     String itemId = request.getParameter(eventName + ".item");
     Item treeItem = (Item) WidgetUtil.find(tree, itemId);
     String detailStr = request.getParameter(eventName + ".detail");
     int detail = "check".equals(detailStr) ? SWT.CHECK : SWT.NONE;
     int eventType = SelectionEvent.WIDGET_SELECTED;
     int stateMask = EventLCAUtil.readStateMask(JSConst.EVENT_WIDGET_SELECTED_MODIFIER);
     SelectionEvent event =
         new SelectionEvent(tree, treeItem, eventType, bounds, stateMask, null, true, detail);
     event.processEvent();
   }
 }