* Tidy up the open window tracking code. Earlier code failed to track window open from zoom action.
This commit is contained in:
parent
6ab73d009c
commit
63fcc2160c
|
@ -485,6 +485,7 @@ public final class AEnv
|
|||
AWindow frame = new AWindow();
|
||||
if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID)))
|
||||
return;
|
||||
addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
frame = null;
|
||||
} // zoom
|
||||
|
@ -535,11 +536,23 @@ public final class AEnv
|
|||
AWindow frame = new AWindow();
|
||||
if (!frame.initWindow(AD_Window_ID, query))
|
||||
return;
|
||||
addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
frame = null;
|
||||
} // zoom
|
||||
|
||||
|
||||
/**
|
||||
* Track open frame in window manager
|
||||
* @param frame
|
||||
*/
|
||||
public static void addToWindowManager(CFrame frame)
|
||||
{
|
||||
JFrame top = Env.getWindow(0);
|
||||
if (top instanceof AMenu)
|
||||
{
|
||||
((AMenu)top).getWindowManager().add(frame);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Exit System
|
||||
* @param status System exit status (usually 0 for no error)
|
||||
|
@ -633,9 +646,9 @@ public final class AEnv
|
|||
}
|
||||
//
|
||||
AWindow frame = new AWindow();
|
||||
((AMenu)Env.getWindow(0)).getWindowManager().add(frame);
|
||||
if (!frame.initWindow(s_workflow_Window_ID, query))
|
||||
return;
|
||||
addToWindowManager(frame);
|
||||
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) ) {
|
||||
frame.pack();
|
||||
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
|
||||
|
|
|
@ -184,7 +184,7 @@ public class ARequest implements ActionListener
|
|||
AWindow frame = new AWindow();
|
||||
if (!frame.initWindow(AD_Window_ID, query))
|
||||
return;
|
||||
|
||||
AEnv.addToWindowManager(frame);
|
||||
// New - set Table/Record
|
||||
if (e.getSource() == m_new)
|
||||
{
|
||||
|
|
|
@ -190,11 +190,7 @@ public class AZoomAcross implements ActionListener
|
|||
AWindow frame = new AWindow();
|
||||
if (!frame.initWindow(AD_Window_ID, m_query))
|
||||
return;
|
||||
JFrame top = Env.getWindow(0);
|
||||
if (top instanceof AMenu)
|
||||
{
|
||||
((AMenu)top).getWindowManager().add(frame);
|
||||
}
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
frame = null;
|
||||
} // launchZoom
|
||||
|
|
|
@ -403,6 +403,7 @@ public class VTrxMaterial extends CPanel
|
|||
setCursor(Cursor.getDefaultCursor());
|
||||
return;
|
||||
}
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
frame = null;
|
||||
setCursor(Cursor.getDefaultCursor());
|
||||
|
|
|
@ -686,6 +686,7 @@ public abstract class Info extends CDialog
|
|||
final AWindow frame = new AWindow();
|
||||
if (!frame.initWindow(AD_Window_ID, zoomQuery))
|
||||
return;
|
||||
AEnv.addToWindowManager(frame);
|
||||
// Modal Window causes UI lock
|
||||
if (isModal())
|
||||
{
|
||||
|
|
|
@ -509,6 +509,7 @@ public class WFActivity extends CPanel
|
|||
AWindow frame = new AWindow();
|
||||
if (!frame.initWindow(AD_Window_ID, query))
|
||||
return;
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
frame = null;
|
||||
}
|
||||
|
|
|
@ -432,6 +432,7 @@ public class WFPanel extends CPanel
|
|||
AWindow frame = new AWindow();
|
||||
if (!frame.initWindow (AD_Window_ID, query))
|
||||
return;
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
frame = null;
|
||||
} // zoom
|
||||
|
|
|
@ -451,6 +451,7 @@ public class VLocator extends JComponent
|
|||
AWindow frame = new AWindow();
|
||||
if (!frame.initWindow(AD_Window_ID, null))
|
||||
return;
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
frame = null;
|
||||
setCursor(Cursor.getDefaultCursor());
|
||||
|
|
|
@ -1133,7 +1133,10 @@ public class VLookup extends JComponent
|
|||
ADialog.error(m_lookup.getWindowNo(), this, msg, pp==null ? "" : pp.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
}
|
||||
// async window - not able to get feedback
|
||||
frame = null;
|
||||
//
|
||||
|
|
|
@ -580,6 +580,7 @@ public class VPAttributeDialog extends CDialog
|
|||
this.setVisible(false);
|
||||
this.setModal (false); // otherwise blocked
|
||||
this.setVisible(true);
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showScreen(frame, SwingConstants.EAST);
|
||||
}
|
||||
// async window - not able to get feedback
|
||||
|
|
|
@ -953,6 +953,7 @@ public class Viewer extends CFrame
|
|||
int AD_Window_ID = 240; // hardcoded
|
||||
int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID();
|
||||
win.initWindow(AD_Window_ID, MQuery.getEqualQuery("AD_PrintFormat_ID", AD_PrintFormat_ID));
|
||||
AEnv.addToWindowManager(win);
|
||||
AEnv.showCenterScreen(win);
|
||||
// see windowStateChanged for applying change
|
||||
} // cmd_customize
|
||||
|
|
Loading…
Reference in New Issue