Project

General

Profile

10451a.patch

Paula Păstrăguș, 09/08/2025 07:26 AM

Download (8.58 KB)

View differences:

new/src/com/goldencode/p2j/ui/chui/ThinClient.java 2025-09-08 08:09:30 +0000
3122 3122
**                            server context.
3123 3123
**                            Updated error output to allow client-side code to be executed in server context.
3124 3124
** 1050 SB  20250718          Do not resolve the focus when the focus frame gets hidden for GUI. Refs #10273.
3125
** 1051 PMP 20250908          Added finest logging for tab and return key input events.
3125 3126
*/
3126 3127

  
3127 3128
/*
......
22109 22110
      int      key      = (evt == null ? KeyInput.CHAR_UNDEFINED : evt.keyCode());
22110 22111
      int      keyState = (evt == null ? 0 : evt.getKeyState());
22111 22112
      int      action   = (evt == null ? KeyInput.CHAR_UNDEFINED  : evt.actionCode());
22113
      
22114
      if (action == Keyboard.KA_TAB)
22115
      {
22116
         LOG.finest("TAB key dispatched for source = " + src);
22117
      }
22118
      else if (action == Keyboard.KA_RETURN)
22119
      {
22120
         LOG.finest("Return key dispatched for source = " + src);
22121
      }
22122
      else if (action == Keyboard.SE_CHOOSE)
22123
      {
22124
         LOG.finest("Choose key dispatched for source = " + src);
22125
      }
22126
         
22112 22127

  
22113 22128
      // skip developer events U1-U10
22114 22129
      if (!Keyboard.isDevEvent(action)) 
new/src/com/goldencode/p2j/ui/client/WindowManager.java 2025-09-08 07:15:07 +0000
156 156
** 076 AI  20250603 Changed forceActivateWindow to use gd.moveToTop instead of wm.moveToTop.
157 157
** 077 HC  20250606 ACTIVE-WINDOW can only hold WINDOW widget instances.
158 158
** 078 PMP 20250721 Added isMenuDisplayed method.
159
** 079 PMP 20250828 Added finest level logging when windows are opened and closed, excluding tooltips.
160
**     PMP 20250901 Updated CentralLogger initialization to use getName, instead of getSimpleName.
161 159
*/
162 160
/*
163 161
** This program is free software: you can redistribute it and/or modify
......
239 237
public class WindowManager
240 238
{
241 239
   /** The logger */
242
   private static final CentralLogger LOG = CentralLogger.get(WindowManager.class.getName());
240
   private static final CentralLogger LOG = CentralLogger.get(WindowManager.class.getSimpleName());
243 241

  
244 242
   /** Stores context-local state variables. */
245 243
   private static final ContextLocal<WorkArea> work = 
......
395 393
               wa.windowIDs.put(widInt, window);
396 394
               wa.windowIDSet.add(widInt);
397 395
            }
398
            
399
            if (!(window instanceof OverlayWindow && 
400
                ((OverlayWindow) window).getRelativeTo() == WidgetLocationRef.RELATIVE_TO_CURSOR))
401
            {
402
               LOG.finest(window + " opened.");
403
            }
404 396
         }
405 397
      }
406 398
   }
......
1333 1325
      window.destroy();
1334 1326
      
1335 1327
      removeNoDestroy(window);
1336
      
1337
      if (!(window instanceof OverlayWindow && 
1338
          ((OverlayWindow) window).getRelativeTo() == WidgetLocationRef.RELATIVE_TO_CURSOR))
1339
      {
1340
         LOG.finest(window + " closed.");
1341
      }
1342 1328
   }
1343 1329

  
1344 1330
   /**
new/src/com/goldencode/p2j/ui/client/event/EventManager.java 2025-09-08 07:15:07 +0000
65 65
** 031 SBI 20250317 Applied new KeyInput constructor.
66 66
** 032 SBI 20250515 Applied KeyCode.isPrintableCodePoint() to provide data for KeyInput event
67 67
**                  to support unicode characters.
68
** 033 PMP 20250901 Added finest logging for tab and enter key input events.
69 68
*/
70 69
/*
71 70
** This program is free software: you can redistribute it and/or modify
......
444 443
         }
445 444
      
446 445
         wa.queue.post(event);
447
         
448
         if (event instanceof KeyInput)
449
         {
450
            int action = ((KeyInput) event).actionCode();
451
            if (action == Keyboard.KA_TAB)
452
            {
453
               LOG.finest("TAB key input event received.");
454
            }
455
            else if (action == Keyboard.KA_RETURN)
456
            {
457
               LOG.finest("RETURN key input event received.");
458
            }
459
         }
460 446
      }
461 447
   }
462 448

  
new/src/com/goldencode/p2j/ui/client/gui/ButtonListGuiImpl.java 2025-09-08 07:09:42 +0000
2630 2630
      @Override
2631 2631
      public String toString()
2632 2632
      {
2633
         return "Item{" + String.valueOf(getId()) + ", \"" + textWidget.getText() + "\"}";
2633
         return "Item [id=" + String.valueOf(getId()) + ", title=" + textWidget.getText() + "]";
2634 2634
      }
2635 2635
   }
2636 2636
}
new/src/com/goldencode/p2j/ui/client/gui/ModalWindow.java 2025-09-08 08:10:12 +0000
2 2
** Module   : ModalWindow.java
3 3
** Abstract : Base class for modal windows
4 4
**
5
** Copyright (c) 2015-2024, Golden Code Development Corporation.
5
** Copyright (c) 2015-2025, Golden Code Development Corporation.
6 6
**
7 7
** -#- -I- --Date-- ---------------------------------Description----------------------------------
8 8
** 001 HC  20150612 Initial version.
......
82 82
** 043 HC  20240806 Added support for displaying frame widget in an overlay window.
83 83
** 044 PMP 20240826 Implemented getRelativeTo method.
84 84
** 045 AI  20240925 Added catch of WindowEmulatorNotFoundException in processEvents.
85
** 046 PMP 20250908 Added finest logging when a modal window is shown.
85 86
*/
86 87
/*
87 88
** This program is free software: you can redistribute it and/or modify
......
480 481
      if (isVisible())
481 482
         return;
482 483
      
484
      LOG.finest("Window " + this + " was shown.");
483 485
      // to preserve the assigned modal window owner
484 486
      TopLevelWindow<?> owner = getOwner();
485 487
      
......
559 561
   {
560 562
      if (!isVisible())
561 563
         return;
562
      
564
            
563 565
      // The order of super.hide() and GuiWindowCommons.hide(this) is important, otherwise
564 566
      // an incorrect window will be activated by GuiWindowCommons.hide(this).
565 567
      super.hide();
new/src/com/goldencode/p2j/ui/client/widget/TitledWindow.java 2025-09-08 08:05:35 +0000
2 2
** Module   : TitledWindow.java
3 3
** Abstract : Window with title.
4 4
**
5
** Copyright (c) 2010-2022, Golden Code Development Corporation.
5
** Copyright (c) 2010-2025, Golden Code Development Corporation.
6 6
**
7 7
** -#- -I- --Date-- ---------------------------------Description----------------------------------
8 8
** 001 SIY 20100629 Created initial version
......
59 59
** 035 VVT 20220202 findMouseSource(MouseEvt) removed. See #6013.
60 60
**     VVT 20220215 Change 13474 for #6013 temporary reverted (caused multiple regressions,
61 61
**                  need to be completed).
62
** 036 PMP 20250908 Added finest logging when showing / hiding the window.
62 63
*/
63 64
/*
64 65
** This program is free software: you can redistribute it and/or modify
......
119 120
import com.goldencode.p2j.ui.chui.ThinClient;
120 121
import com.goldencode.p2j.ui.client.*;
121 122
import com.goldencode.p2j.ui.client.event.*;
123
import com.goldencode.p2j.ui.client.gui.OverlayWindow;
122 124
import com.goldencode.p2j.ui.client.layout.*;
123 125
import com.goldencode.p2j.util.*;
126
import com.goldencode.p2j.util.logging.CentralLogger;
124 127

  
125 128
/**
126 129
 * Simple window with title.
......
132 135
{
133 136
   /** Window title. */
134 137
   private String title;
138
   
139
   /** Logger. */
140
   private static final CentralLogger LOG = CentralLogger.get(TitledWindow.class);
135 141

  
136 142
   /**
137 143
    * Constructor.
......
197 203
      // window no longer exists.  for it to be removed, it must be destroyed
198 204
      
199 205
      forceVisibility(false);
206
      if (!(this instanceof OverlayWindow && 
207
          ((OverlayWindow) this).getRelativeTo() == WidgetLocationRef.RELATIVE_TO_CURSOR))
208
      {
209
         LOG.finest("Window " + this + " was hidden.");         
210
      }
200 211
   }
201 212

  
202 213
   /**
......
343 354
         return;
344 355
      }
345 356

  
357
      if (!(this instanceof OverlayWindow && 
358
          ((OverlayWindow) this).getRelativeTo() == WidgetLocationRef.RELATIVE_TO_CURSOR))
359
      {
360
         LOG.finest("Window " + this + " was shown.");
361
      }
362

  
346 363
      super.show();
347 364
      WindowManager.addWindow(this);
348 365