hc_upd20151124a.diff
src/com/goldencode/p2j/main/ClientCore.java | ||
---|---|---|
41 | 41 |
** Also added a chui/gui flag to the parms so that the server doesn't need to |
42 | 42 |
** call down to the client to figure that out. |
43 | 43 |
** 021 CA 20150131 Clean the security caches when client restarts. |
44 |
** 022 HC 20151124 Improved loading of boolean environment variables from Progress INI files and |
|
45 |
** Windows Registry. |
|
44 | 46 |
*/ |
45 | 47 | |
46 | 48 |
package com.goldencode.p2j.main; |
... | ... | |
214 | 216 |
|
215 | 217 |
// finish initializing the thin client |
216 | 218 |
ThinClient.initializePost(config, session, context); |
217 |
|
|
219 | ||
218 | 220 |
// attempt to emulate the '-ininame' command-line parameter: |
219 | 221 |
Directory remoteDir = DirectoryManager.getInstance(); |
220 | 222 |
if (remoteDir != null) |
... | ... | |
235 | 237 |
} |
236 | 238 |
} |
237 | 239 |
|
240 |
ThinClient.loadEnvironment(config); |
|
241 |
|
|
238 | 242 |
// After full initialization of the client code we can set up the ErrorWriter for |
239 | 243 |
// client side. |
240 | 244 |
if (session != null) |
src/com/goldencode/p2j/ui/chui/ThinClient.java | ||
---|---|---|
2185 | 2185 |
** More fixes related to working with HIDDEN frame/widgets and resolving |
2186 | 2186 |
** the window when nested frames are viewed directly. |
2187 | 2187 |
** 792 CA 20151123 More fixes related to nested frame support. |
2188 |
** HC 20151124 Utilized Keep3DFillinBorder environment variable when drawing FILL- |
|
2189 |
** IN border. |
|
2188 | 2190 |
*/ |
2189 | 2191 | |
2190 | 2192 |
package com.goldencode.p2j.ui.chui; |
... | ... | |
2560 | 2562 |
|
2561 | 2563 |
/** THREE-D value for this session. */ |
2562 | 2564 |
private boolean is3D; |
2565 |
|
|
2566 |
/** The effective value of the keep3DFillinBorder environment variable. */ |
|
2567 |
private boolean keep3DFillinBorder; |
|
2563 | 2568 | |
2564 | 2569 |
/** |
2565 | 2570 |
* Constructor. |
... | ... | |
2794 | 2799 |
// initialize the font manager |
2795 | 2800 |
FontManager.init(tc.server); |
2796 | 2801 | |
2802 |
// initialize the client side widget ID worker |
|
2803 |
WidgetIdHelper.initWorker(new ClientIdHelper()); |
|
2804 |
} |
|
2805 |
|
|
2806 |
/** |
|
2807 |
* The method is called when the enviornment ({@see EnvironmentDaemon}) has |
|
2808 |
* been fully initialized. |
|
2809 |
* |
|
2810 |
* @param cfg |
|
2811 |
* A valid bootstrap configuration. |
|
2812 |
*/ |
|
2813 |
public static void loadEnvironment(BootstrapConfig cfg) |
|
2814 |
{ |
|
2815 |
ThinClient tc = getInstance(); |
|
2816 |
|
|
2797 | 2817 |
if (!OutputManager.instance().isChui()) |
2798 | 2818 |
{ |
2799 | 2819 |
Window<?> defw = WindowManager.getDefaultWindow(); |
... | ... | |
2839 | 2859 |
|
2840 | 2860 |
// get the default value for the "use-3d-size" setting - if a custom env exists, that |
2841 | 2861 |
// is the value which will be used |
2862 |
boolean use3dSize = true; |
|
2842 | 2863 |
String cuse3dSize = cfg.getString("client", "gui", "use-3d-size", null); |
2843 |
String suse3dSize = (ed == null ? null : ed.getKeyValue("Startup", "use-3d-size")); |
|
2844 |
boolean use3dSize = (cuse3dSize == null || cuse3dSize.length() == 0 |
|
2845 |
? suse3dSize == null || suse3dSize.length() == 0 |
|
2846 |
? true |
|
2847 |
: Boolean.parseBoolean(suse3dSize) |
|
2848 |
: Boolean.parseBoolean(cuse3dSize)); |
|
2864 |
if (cuse3dSize != null && !cuse3dSize.isEmpty()) |
|
2865 |
{ |
|
2866 |
use3dSize = Boolean.parseBoolean(cuse3dSize); |
|
2867 |
} |
|
2868 |
else |
|
2869 |
{ |
|
2870 |
use3dSize = ed.getBooleanKeyValue("Startup", "use-3d-size", use3dSize); |
|
2871 |
} |
|
2849 | 2872 |
FontManager.setThreeD(use3dSize); |
2850 | 2873 | |
2874 |
// get the value for the "Keep3DFillinBorder" environment variable |
|
2875 |
boolean keep3DFillinBorder = ed.getBooleanKeyValue("Startup", "Keep3DFillinBorder", false); |
|
2876 |
tc.setKeep3DFillinBorder(keep3DFillinBorder); |
|
2877 |
|
|
2851 | 2878 |
// initialize initial tooltip settings |
2852 | 2879 |
ToolTip.setSessionTooltips(tc.server.getSessionTooltips()); |
2853 | 2880 |
} |
2854 | ||
2855 |
// initialize the client side widget ID worker |
|
2856 |
WidgetIdHelper.initWorker(new ClientIdHelper()); |
|
2857 |
} |
|
2881 |
} |
|
2858 | 2882 | |
2859 | 2883 |
/** |
2860 | 2884 |
* Clears all content from the terminal. |
... | ... | |
18385 | 18409 |
} |
18386 | 18410 | |
18387 | 18411 |
/** |
18412 |
* Get the Keep3DFillinBorder environment value for this client session. |
|
18413 |
* |
|
18414 |
* @return See above. |
|
18415 |
*/ |
|
18416 |
public boolean isKeep3DFillinBorder() |
|
18417 |
{ |
|
18418 |
return keep3DFillinBorder; |
|
18419 |
} |
|
18420 | ||
18421 |
/** |
|
18422 |
* Set the Keep3DFillinBorder environment value for this client session. |
|
18423 |
* |
|
18424 |
* @param value |
|
18425 |
* The value to set. |
|
18426 |
*/ |
|
18427 |
public void setKeep3DFillinBorder(boolean value) |
|
18428 |
{ |
|
18429 |
keep3DFillinBorder = value; |
|
18430 |
} |
|
18431 |
|
|
18432 |
/** |
|
18388 | 18433 |
* Move the widget to the top in z-order |
18389 | 18434 |
* |
18390 | 18435 |
* @param id |
src/com/goldencode/p2j/ui/client/gui/EntryFieldGuiImpl.java | ||
---|---|---|
18 | 18 |
** GuiDriver: all access to the driver is done exclusively, each thread taking |
19 | 19 |
** and releasing ownership for the duration of the drawing operation or other |
20 | 20 |
** GUI API invocation which requires access to the underlying physical window. |
21 |
** 005 HC 20151124 Utilized Keep3DFillinBorder environment variable when drawing FILL-IN border. |
|
21 | 22 |
*/ |
22 | 23 | |
23 | 24 |
package com.goldencode.p2j.ui.client.gui; |
... | ... | |
26 | 27 |
// AWT/Swing event model itself; no other AWT/Swing usage is occurring in this class |
27 | 28 | |
28 | 29 |
import com.goldencode.p2j.ui.*; |
29 |
import com.goldencode.p2j.ui.chui.ThinClient; |
|
30 | 30 |
import com.goldencode.p2j.ui.client.*; |
31 | 31 |
import com.goldencode.p2j.ui.client.event.*; |
32 | 32 |
import com.goldencode.p2j.ui.client.gui.driver.*; |
... | ... | |
251 | 251 |
* The border box color. |
252 | 252 |
* @param borderDim |
253 | 253 |
* The border box size. |
254 |
* @param three_d |
|
255 |
* Indicates whether 3d or flat border should be drawn. |
|
254 | 256 |
*/ |
255 | 257 |
@Override |
256 |
protected void drawBorder(ColorRgb borderColor, NativeDimension borderDim) |
|
258 |
protected void drawBorder(ColorRgb borderColor, NativeDimension borderDim, boolean three_d)
|
|
257 | 259 |
{ |
258 | 260 |
// entry field in combo-box has no border |
259 | 261 |
} |
src/com/goldencode/p2j/ui/client/gui/FillInGuiImpl.java | ||
---|---|---|
51 | 51 |
** EVL 20151021 Fix for selection replacement. This covers resolution for tiny input issue |
52 | 52 |
** when selected text replacing incorrectly. |
53 | 53 |
** HC 20151112 Implemented THREE-D runtime support. |
54 |
** 022 HC 20151124 Utilized Keep3DFillinBorder environment variable when drawing FILL-IN border. |
|
54 | 55 |
*/ |
55 | 56 | |
56 | 57 |
package com.goldencode.p2j.ui.client.gui; |
... | ... | |
60 | 61 |
import java.awt.event.MouseEvent; |
61 | 62 | |
62 | 63 |
import com.goldencode.p2j.ui.*; |
64 |
import com.goldencode.p2j.ui.chui.*; |
|
63 | 65 |
import com.goldencode.p2j.ui.client.*; |
64 | 66 |
import com.goldencode.p2j.ui.client.event.*; |
65 | 67 |
import com.goldencode.p2j.ui.client.event.listener.*; |
... | ... | |
830 | 832 |
gd.setColor(gcd.bgColor); |
831 | 833 |
gd.fillRect(0, 0, dim.width, dim.height); |
832 | 834 |
|
833 |
if (isEnabled()) |
|
835 |
ThinClient tc = ThinClient.getInstance(); |
|
836 |
|
|
837 |
boolean enabled = isEnabled(); |
|
838 |
boolean threeDBorder = isThreeD() && (tc.isKeep3DFillinBorder() || enabled); |
|
839 |
|
|
840 |
if (enabled || threeDBorder) |
|
834 | 841 |
{ |
835 |
drawBorder(gcd.boxColor, dim); |
|
842 |
drawBorder(gcd.boxColor, dim, threeDBorder);
|
|
836 | 843 |
} |
837 | 844 | |
838 | 845 |
if (!uninit) |
... | ... | |
1046 | 1053 |
* The border box color in the non THREE-D mode. |
1047 | 1054 |
* @param borderDim |
1048 | 1055 |
* The border box size. |
1056 |
* @param three_d |
|
1057 |
* Indicates whether 3d or flat border should be drawn. |
|
1049 | 1058 |
*/ |
1050 |
protected void drawBorder(ColorRgb borderColor, NativeDimension borderDim) |
|
1059 |
protected void drawBorder(ColorRgb borderColor, NativeDimension borderDim, boolean three_d)
|
|
1051 | 1060 |
{ |
1052 |
if (isThreeD())
|
|
1061 |
if (three_d)
|
|
1053 | 1062 |
{ |
1054 | 1063 |
gd.setColor(gd.getSysColor(SysColor.COLOR_3DSHADOW)); |
1055 | 1064 |
gd.drawLine(0, 0, 0, borderDim.height - 2); |
src/com/goldencode/p2j/util/EnvironmentDaemon.java | ||
---|---|---|
2 | 2 |
** Module : EnvironmentDaemon.java |
3 | 3 |
** Abstract : Client side daemon to handle Progress 4GL compatible Winodws environment handling |
4 | 4 |
** |
5 |
** Copyright (c) 2013-2014, Golden Code Development Corporation.
|
|
5 |
** Copyright (c) 2013-2015, Golden Code Development Corporation.
|
|
6 | 6 |
** ALL RIGHTS RESERVED. Use is subject to license terms. |
7 | 7 |
** |
8 | 8 |
** Golden Code Development Corporation |
... | ... | |
16 | 16 |
** 004 MAG 20140908 Added getEnvironmentType APIs. Added return value to load() method. |
17 | 17 |
** Change the unload() implementation. Implements read only environments loading. |
18 | 18 |
** Added setDefaultEnvironment() which override default environment. |
19 |
** 005 HC 20151124 Improved loading of boolean environment variables from Progress INI files and |
|
20 |
** Windows Registry. |
|
19 | 21 |
*/ |
20 | 22 | |
21 | 23 |
package com.goldencode.p2j.util; |
... | ... | |
235 | 237 |
} |
236 | 238 |
return ""; |
237 | 239 |
} |
240 |
|
|
241 |
/** |
|
242 |
* Getting the boolean key value from the current environment. |
|
243 |
* |
|
244 |
* @param section |
|
245 |
* The name of the section containing the key to get. |
|
246 |
* @param key |
|
247 |
* The name of the key key to get or default key if not specified. |
|
248 |
* @param defValue |
|
249 |
* The default value, to be returned when the value does not exist |
|
250 |
* in the environment. |
|
251 |
* |
|
252 |
* @return The boolean key value, <code>defValue</code> if the value |
|
253 |
* does not exist in the environment. |
|
254 |
*/ |
|
255 |
public Boolean getBooleanKeyValue(String section, String key, Boolean defValue) |
|
256 |
{ |
|
257 |
String strValue = getKeyValue(section, key); |
|
258 |
if (strValue == null) |
|
259 |
{ |
|
260 |
return defValue; |
|
261 |
} |
|
262 |
|
|
263 |
// the only valid boolean true for Progress INI file is the case insensitive 'yes' |
|
264 |
// TODO: is this compatible with the allowed boolean values in Windows registry? |
|
265 |
return strValue.trim().equalsIgnoreCase("yes"); |
|
266 |
} |
|
238 | 267 | |
239 | 268 |
/** |
240 | 269 |
* Unloads specifies environment from the current one. |