=== modified file 'src/com/goldencode/p2j/ui/MenuWidget.java'
--- src/com/goldencode/p2j/ui/MenuWidget.java 2015-09-07 10:24:13 +0000
+++ src/com/goldencode/p2j/ui/MenuWidget.java 2015-11-23 07:48:49 +0000
@@ -14,6 +14,7 @@
** added initialization code.
** 003 VIG 20150501 Implemented CommonHandleTree interface.
** 004 VIG 20150823 Fixed firstChild and lastChild methods.
+** 005 VIG 20151123 Added setVisible methods showing the "not setable" error.
*/
package com.goldencode.p2j.ui;
@@ -130,6 +131,34 @@
}
/**
+ * Set the VISIBLE writable attribute.
+ *
+ * @param visible
+ * The new value for the VISIBLE attribute.
+ */
+ @Override
+ public void setVisible(logical visible)
+ {
+ String name = dynamic().getValue() ? "widget" : name().getValue();
+ ErrorManager.recordOrShowError(4052,
+ "VISIBLE is not a setable attribute for MENU " + name, false);
+ }
+
+ /**
+ * Set the VISIBLE writable attribute.
+ *
+ * @param visible
+ * The new value for the VISIBLE attribute.
+ */
+ @Override
+ public void setVisible(boolean visible)
+ {
+ String name = dynamic().getValue() ? "widget" : name().getValue();
+ ErrorManager.recordOrShowError(4052,
+ "VISIBLE is not a setable attribute for MENU " + name, false);
+ }
+
+ /**
* Finds menu-item in this menu tree. It can appear on different levels.
* Menu-item is searched using some sort of depth-first algorithm.
* See {@link #findMenuItemInt(String)}
=== modified file 'src/com/goldencode/p2j/ui/chui/ThinClient.java'
--- src/com/goldencode/p2j/ui/chui/ThinClient.java 2015-11-25 15:18:22 +0000
+++ src/com/goldencode/p2j/ui/chui/ThinClient.java 2015-11-25 16:46:23 +0000
@@ -2188,10 +2188,12 @@
** HC 20151124 Utilized Keep3DFillinBorder environment variable when drawing FILL-
** IN border.
** A DISPLAY with a hidden frame must not place it on window.
+** VIG 20151118 Fixed MENUBAR repaint for dynamic case.
*/
package com.goldencode.p2j.ui.chui;
+import java.awt.event.MouseEvent;
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
@@ -10698,13 +10700,14 @@
}
wnd.getMenubar().setVisible(true);
+ wnd.doLayout();
eventDrawingBracket(wnd, new Runnable()
{
@Override
public void run()
{
- wnd.getMenubar().repaint();
+ wnd.repaint();
}
});
}
=== modified file 'src/com/goldencode/p2j/ui/client/gui/SubMenuGuiImpl.java'
--- src/com/goldencode/p2j/ui/client/gui/SubMenuGuiImpl.java 2015-11-12 16:04:40 +0000
+++ src/com/goldencode/p2j/ui/client/gui/SubMenuGuiImpl.java 2015-11-24 11:42:59 +0000
@@ -21,6 +21,7 @@
** handle processing to modal windows.
** 006 CA 20151026 Enclose driver API calls in select/releaseWindow().
** VIG 20151027 Added "pressed" state transferring to neighbor MENUBAR element.
+** Added mouseEntered=false to hideBody(..) and fixed javadoc.
*/
package com.goldencode.p2j.ui.client.gui;
@@ -592,6 +593,7 @@
parent().repaint();
setSubmenusPressed(false, true);
+ mouseEntered = false;
super.hideBody(recursive);
@@ -1137,6 +1139,8 @@
*
* @param pressed
* true
means pressed, false
true denotes recursive processing of nested sub-menus.
*/
protected void setSubmenusPressed(boolean pressed, boolean recursive)
{
=== modified file 'src/com/goldencode/p2j/ui/client/gui/WindowLayout.java'
--- src/com/goldencode/p2j/ui/client/gui/WindowLayout.java 2015-10-29 08:28:52 +0000
+++ src/com/goldencode/p2j/ui/client/gui/WindowLayout.java 2015-11-23 08:00:40 +0000
@@ -45,6 +45,7 @@
** 025 HC 20151027 Implemented WINDOW MESSAGE-AREA and STATUS-AREA attributes.
** CA 20151029 If workspace is resized, ensure the new window dimension includes the
** decorations and the border.
+** 026 VIG 20151122 Added isVisible check for menubar layout.
*/
package com.goldencode.p2j.ui.client.gui;
@@ -232,7 +233,7 @@
if (window instanceof Window)
{
Menu> menubar = ((Window>) window).getMenubar();
- if (menubar != null)
+ if (menubar != null && menubar.isVisible())
{
menubar.doLayout();
mbarHeight = c.heightToNative(menubar.height());
@@ -301,7 +302,7 @@
if (window instanceof WindowGuiImpl)
{
Menu menubar = ((WindowGuiImpl)window).getMenubar();
- if (menubar != null)
+ if (menubar != null && menubar.isVisible())
{
MenuConfig mc = menubar.config();
menubar.setPhysicalLocation(x, y);