Project

General

Profile

2711_rev10978.diff

Vadim Gindin, 11/27/2015 02:53 PM

Download (3.4 KB)

View differences:

src/com/goldencode/p2j/ui/chui/ThinClient.java 2015-11-27 19:46:35 +0000
2196 2196
**                           Fixed implicit window show by frame statements, in GUI. 
2197 2197
**     HC  20151124          Utilized Keep3DFillinBorder environment variable when drawing FILL-
2198 2198
**                           IN border.
2199
**     VIG 20151118          Fixed MENUBAR repaint for dynamic case.
2199
**     VIG 20151118          Fixed MENUBAR repaint for dynamic case and added right/middle mouse 
2200
**                           buttons ignoring when sending ENTRY event and requesting a focus.
2200 2201
*/
2201 2202

  
2202 2203
package com.goldencode.p2j.ui.chui;
2203 2204

  
2205
import java.awt.event.MouseEvent;
2204 2206
import java.io.*;
2205 2207
import java.lang.reflect.*;
2206 2208
import java.util.*;
......
15264 15266
             evtID == MouseEvt.MOUSE_RELEASED ||
15265 15267
             evtID == MouseEvt.MOUSE_CLICKED)
15266 15268
         {
15267
            maySwitchFocus = (mouseSource != null && evtID == MouseEvt.MOUSE_PRESSED);
15269
            // ENTRY event and focus request are sent only for a press of the left mouse button 
15270
            // FILL-IN: ENTRY is sent later, after pop-up menu is closed.
15271
            maySwitchFocus = (mouseSource != null && 
15272
                              evtID == MouseEvt.MOUSE_PRESSED && 
15273
                              evt.getEvent().getButton() == MouseEvent.BUTTON1);
15274
            
15268 15275
            Widget<?> focus = UiUtils.getCurrentFocus();
15269 15276
            
15270 15277
            if (focus != null && focus.isLeaveEventRequired((Widget) mouseSource, evt))
src/com/goldencode/p2j/ui/client/gui/ToggleBoxGuiImpl.java 2015-11-27 19:39:10 +0000
26 26
** 010 VIG 20151023 Fixed disposition of the label and highlight rectangle relative to check-box 
27 27
**                  and highlight rectangle coloring using XOR.
28 28
**     HC  20151112 Implemented THREE-D runtime support.
29
**     VIG 20151118 Added processing only left mouse button in mousePressed() and mouseReleased().
29 30
*/
30 31

  
31 32
package com.goldencode.p2j.ui.client.gui;
......
56 57
   /** Checkbox width or length */
57 58
   private static int CHKBOX_WIDTH = 11;
58 59
   
59
   /**
60
    * Color which is XORed with background to draw current row highlighting (dotted rectangle).
61
    */
62
   private final static ColorRgb CURRENT_ROW_XOR_COLOR = new ColorRgb(192, 192, 192);
63
   
64 60
   /** Color resolver */
65 61
   private GuiColorResolver gc;
66 62

  
......
376 372
   @Override
377 373
   public void mousePressed(MouseEvent e)
378 374
   {
379
      boolean oldVal = pressed; 
380
      pressed = true;
381
      
382
      if (!oldVal)
375
      if (e.getButton() == MouseEvent.BUTTON1)
383 376
      {
384
         repaint();
377
         boolean oldVal = pressed; 
378
         pressed = true;
379

  
380
         if (!oldVal)
381
         {
382
            repaint();
383
         }
385 384
      }
386 385
   }
387 386

  
......
394 393
   @Override
395 394
   public void mouseReleased(MouseEvent e)
396 395
   {
397
      boolean oldVal = pressed; 
398
      pressed = false;
399
      
400
      if (oldVal)
396
      if (e.getButton() == MouseEvent.BUTTON1)
401 397
      {
402
         repaint();
398
         boolean oldVal = pressed; 
399
         pressed = false;
400

  
401
         if (oldVal)
402
         {
403
            repaint();
404
         }
403 405
      }
404 406
   }
405 407