2850_2511.diff
src/com/goldencode/p2j/ui/MenuWidget.java 2015-11-23 07:48:49 +0000 | ||
---|---|---|
14 | 14 |
** added initialization code. |
15 | 15 |
** 003 VIG 20150501 Implemented CommonHandleTree interface. |
16 | 16 |
** 004 VIG 20150823 Fixed firstChild and lastChild methods. |
17 |
** 005 VIG 20151123 Added setVisible methods showing the "not setable" error. |
|
17 | 18 |
*/ |
18 | 19 | |
19 | 20 |
package com.goldencode.p2j.ui; |
... | ... | |
130 | 131 |
} |
131 | 132 |
|
132 | 133 |
/** |
134 |
* Set the VISIBLE writable attribute. |
|
135 |
* |
|
136 |
* @param visible |
|
137 |
* The new value for the VISIBLE attribute. |
|
138 |
*/ |
|
139 |
@Override |
|
140 |
public void setVisible(logical visible) |
|
141 |
{ |
|
142 |
String name = dynamic().getValue() ? "widget" : name().getValue(); |
|
143 |
ErrorManager.recordOrShowError(4052, |
|
144 |
"VISIBLE is not a setable attribute for MENU " + name, false); |
|
145 |
} |
|
146 | ||
147 |
/** |
|
148 |
* Set the VISIBLE writable attribute. |
|
149 |
* |
|
150 |
* @param visible |
|
151 |
* The new value for the VISIBLE attribute. |
|
152 |
*/ |
|
153 |
@Override |
|
154 |
public void setVisible(boolean visible) |
|
155 |
{ |
|
156 |
String name = dynamic().getValue() ? "widget" : name().getValue(); |
|
157 |
ErrorManager.recordOrShowError(4052, |
|
158 |
"VISIBLE is not a setable attribute for MENU " + name, false); |
|
159 |
} |
|
160 | ||
161 |
/** |
|
133 | 162 |
* Finds menu-item in this menu tree. It can appear on different levels. |
134 | 163 |
* Menu-item is searched using some sort of depth-first algorithm. |
135 | 164 |
* See {@link #findMenuItemInt(String)} |
src/com/goldencode/p2j/ui/chui/ThinClient.java 2015-11-25 16:46:23 +0000 | ||
---|---|---|
2188 | 2188 |
** HC 20151124 Utilized Keep3DFillinBorder environment variable when drawing FILL- |
2189 | 2189 |
** IN border. |
2190 | 2190 |
** A DISPLAY with a hidden frame must not place it on window. |
2191 |
** VIG 20151118 Fixed MENUBAR repaint for dynamic case. |
|
2191 | 2192 |
*/ |
2192 | 2193 | |
2193 | 2194 |
package com.goldencode.p2j.ui.chui; |
2194 | 2195 | |
2196 |
import java.awt.event.MouseEvent; |
|
2195 | 2197 |
import java.io.*; |
2196 | 2198 |
import java.lang.reflect.*; |
2197 | 2199 |
import java.util.*; |
... | ... | |
10698 | 10700 |
} |
10699 | 10701 | |
10700 | 10702 |
wnd.getMenubar().setVisible(true); |
10703 |
wnd.doLayout(); |
|
10701 | 10704 |
|
10702 | 10705 |
eventDrawingBracket(wnd, new Runnable() |
10703 | 10706 |
{ |
10704 | 10707 |
@Override |
10705 | 10708 |
public void run() |
10706 | 10709 |
{ |
10707 |
wnd.getMenubar().repaint();
|
|
10710 |
wnd.repaint(); |
|
10708 | 10711 |
} |
10709 | 10712 |
}); |
10710 | 10713 |
} |
src/com/goldencode/p2j/ui/client/gui/SubMenuGuiImpl.java 2015-11-24 11:42:59 +0000 | ||
---|---|---|
21 | 21 |
** handle processing to modal windows. |
22 | 22 |
** 006 CA 20151026 Enclose driver API calls in select/releaseWindow(). |
23 | 23 |
** VIG 20151027 Added "pressed" state transferring to neighbor MENUBAR element. |
24 |
** Added mouseEntered=false to hideBody(..) and fixed javadoc. |
|
24 | 25 |
*/ |
25 | 26 | |
26 | 27 |
package com.goldencode.p2j.ui.client.gui; |
... | ... | |
592 | 593 |
parent().repaint(); |
593 | 594 | |
594 | 595 |
setSubmenusPressed(false, true); |
596 |
mouseEntered = false; |
|
595 | 597 |
|
596 | 598 |
super.hideBody(recursive); |
597 | 599 |
|
... | ... | |
1137 | 1139 |
* |
1138 | 1140 |
* @param pressed |
1139 | 1141 |
* <code>true</code> means pressed, <code>false</code - means not pressed. |
1142 |
* @param recursive |
|
1143 |
* <code>true</code> denotes recursive processing of nested sub-menus. |
|
1140 | 1144 |
*/ |
1141 | 1145 |
protected void setSubmenusPressed(boolean pressed, boolean recursive) |
1142 | 1146 |
{ |
src/com/goldencode/p2j/ui/client/gui/WindowLayout.java 2015-11-23 08:00:40 +0000 | ||
---|---|---|
45 | 45 |
** 025 HC 20151027 Implemented WINDOW MESSAGE-AREA and STATUS-AREA attributes. |
46 | 46 |
** CA 20151029 If workspace is resized, ensure the new window dimension includes the |
47 | 47 |
** decorations and the border. |
48 |
** 026 VIG 20151122 Added isVisible check for menubar layout. |
|
48 | 49 |
*/ |
49 | 50 | |
50 | 51 |
package com.goldencode.p2j.ui.client.gui; |
... | ... | |
232 | 233 |
if (window instanceof Window) |
233 | 234 |
{ |
234 | 235 |
Menu<?> menubar = ((Window<?>) window).getMenubar(); |
235 |
if (menubar != null) |
|
236 |
if (menubar != null && menubar.isVisible())
|
|
236 | 237 |
{ |
237 | 238 |
menubar.doLayout(); |
238 | 239 |
mbarHeight = c.heightToNative(menubar.height()); |
... | ... | |
301 | 302 |
if (window instanceof WindowGuiImpl) |
302 | 303 |
{ |
303 | 304 |
Menu<GuiOutputManager> menubar = ((WindowGuiImpl)window).getMenubar(); |
304 |
if (menubar != null) |
|
305 |
if (menubar != null && menubar.isVisible())
|
|
305 | 306 |
{ |
306 | 307 |
MenuConfig mc = menubar.config(); |
307 | 308 |
menubar.setPhysicalLocation(x, y); |