Project

General

Profile

10450wip.patch

Paula Păstrăguș, 08/20/2025 09:38 AM

Download (2.63 KB)

View differences:

new/src/com/goldencode/p2j/ui/client/gui/ButtonGuiImpl.java 2025-08-20 13:28:29 +0000
196 196
import com.goldencode.p2j.ui.client.gui.theme.*;
197 197
import com.goldencode.p2j.ui.client.widget.*;
198 198
import com.goldencode.p2j.util.*;
199
import com.goldencode.p2j.util.logging.CentralLogger;
199 200
import com.goldencode.util.*;
200 201

  
201 202
/**
......
245 246
   
246 247
   /** Shift in XY to draw images on the button. */
247 248
   private static final int IMAGE_SHIFT = 3;
249
   
250
   /** TODO */
251
   private static final CentralLogger LOG = CentralLogger.get(ButtonGuiImpl.class);
248 252

  
249 253
   /**
250 254
    * Special constructor used to restore component using given configuration.
......
754 758
   @Override
755 759
   public void mouseClicked(MouseEvent e)
756 760
   {
761
      LOG.info("User clicked: " + config.label + " button.");
762
      
757 763
      super.mouseClicked(e);
758 764
      
759 765
      // simulate enter key
new/src/com/goldencode/p2j/ui/client/widget/TitledWindow.java 2025-08-20 13:13:40 +0000
119 119
import com.goldencode.p2j.ui.chui.ThinClient;
120 120
import com.goldencode.p2j.ui.client.*;
121 121
import com.goldencode.p2j.ui.client.event.*;
122
import com.goldencode.p2j.ui.client.gui.OverlayWindow;
122 123
import com.goldencode.p2j.ui.client.layout.*;
123 124
import com.goldencode.p2j.util.*;
125
import com.goldencode.p2j.util.logging.CentralLogger;
124 126

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

  
135 141

  
136 142
   /**
137 143
    * Constructor.
......
190 196
   {
191 197
      if (!isVisible())
192 198
         return;
199
      
200
      if (hasTitle() && (!((this instanceof OverlayWindow &&   
201
         ((OverlayWindow) this).getRelativeTo() == WidgetLocationRef.RELATIVE_TO_CURSOR))))
202
      {
203
         // make sure to not output tooltip show / hide
204
         LOG.info("Window closed: " + title());
205
      }
193 206

  
194 207
      repaint();
195 208
      
......
342 355
      {
343 356
         return;
344 357
      }
358
      
359
      if (hasTitle() && (!((this instanceof OverlayWindow &&   
360
         ((OverlayWindow) this).getRelativeTo() == WidgetLocationRef.RELATIVE_TO_CURSOR))))
361
      {
362
         // make sure to not output tooltip show / hide
363
         LOG.info("Window opened: " + title());
364
      }
345 365

  
346 366
      super.show();
347 367
      WindowManager.addWindow(this);