Project

General

Profile

evl_upd20151124b.diff

Changes to fix button pressed state drawing - Eugenie Lyzenko, 11/24/2015 06:15 PM

Download (2.55 KB)

View differences:

src/com/goldencode/p2j/ui/client/gui/ComboBoxGuiImpl.java 2015-11-24 23:01:14 +0000
48 48
**                  GUI mode ignoring SESSION:DATA-ENTRY-RETURN value.  The combo-box does not
49 49
**                  react to the ENTER key in GUI.  Key processsing fixes for GUI mode.
50 50
** 014 EVL 20151120 Fix for drop-down line spacing issue. And fix for button incorrect drawing
51
**                  over 3d border.
51
**                  over 3d border.  Drop-down button fix for pressed state drawing.  Pressing
52
**                  the drop-down button need to be painted accordingly.
52 53
*/
53 54

  
54 55
package com.goldencode.p2j.ui.client.gui;
......
396 397
      {
397 398
         requestFocus();
398 399
         pressed = true;
400

  
399 401
         // drop-down is opening on mouse press
400 402
         if (config.mode != ComboBoxConfig.Mode.SIMPLE)
401 403
         {
404
            // first need to display the button pressing effect 
405
            ThinClient.getInstance().independentEventDrawingBracket(this, new Runnable()
406
            {
407
               public void run()
408
               {
409
                  repaint();
410
               }
411
            });
412

  
413
            // depending on current state activate or dismiss drop-down 
402 414
            if (dropDownActive)
403 415
            {
404 416
               // second click to drop-down button or area dismisses the active drop-down
src/com/goldencode/p2j/ui/client/gui/ScrollBarGuiButton.java 2015-11-24 23:01:14 +0000
24 24
** 010 EVL 20151010 Fix for thumb drawing issues. Also reworked image loader specifically for
25 25
**                  small images.  Optimization for button painting on mouse press, release.  In
26 26
**                  these cases we do not need to repaint whole window.
27
** 011 EVL 20151124 The button pressed state needs repaint() call to properly display pressed mode
28
**                  when running indide drop-down life cycle. 
27 29
*/
28 30

  
29 31
package com.goldencode.p2j.ui.client.gui;
......
227 229
      if (owner.isEnabled())
228 230
      {
229 231
         up = false;
230
         refresh();
232
         // need to use repaint() here instead of refresh() because for example inside combo-box
233
         // drop-down standalone event loop the screen synchronization is not happening
234
         repaint();
231 235
      }         
232 236
   }
233 237