* [ 1662485 ] Zoom functionality doesn't open maximized window
This commit is contained in:
parent
3e9beb2dd8
commit
fe5f84af7b
|
@ -52,6 +52,18 @@ public final class AEnv
|
|||
window.setVisible(true);
|
||||
window.toFront();
|
||||
} // showCenterScreen
|
||||
|
||||
/**
|
||||
* Show frame as maximized.
|
||||
* @param frame
|
||||
*/
|
||||
public static void showMaximized(Frame frame)
|
||||
{
|
||||
frame.pack();
|
||||
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
|
||||
frame.setVisible(true);
|
||||
frame.toFront();
|
||||
}
|
||||
|
||||
/**
|
||||
* Position window in center of the screen
|
||||
|
@ -493,7 +505,14 @@ public final class AEnv
|
|||
if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID)))
|
||||
return;
|
||||
addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED))
|
||||
{
|
||||
AEnv.showMaximized(frame);
|
||||
}
|
||||
else
|
||||
{
|
||||
AEnv.showCenterScreen(frame);
|
||||
}
|
||||
frame = null;
|
||||
} // zoom
|
||||
|
||||
|
@ -544,7 +563,14 @@ public final class AEnv
|
|||
if (!frame.initWindow(AD_Window_ID, query))
|
||||
return;
|
||||
addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED))
|
||||
{
|
||||
AEnv.showMaximized(frame);
|
||||
}
|
||||
else
|
||||
{
|
||||
AEnv.showCenterScreen(frame);
|
||||
}
|
||||
frame = null;
|
||||
} // zoom
|
||||
|
||||
|
|
|
@ -236,18 +236,12 @@ public class AMenuStartItem extends Thread implements ActionListener
|
|||
SwingUtilities.invokeLater(m_updatePB); // 2
|
||||
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) )
|
||||
{
|
||||
frame.pack();
|
||||
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
|
||||
AEnv.showMaximized(frame);
|
||||
}
|
||||
|
||||
// Center the window
|
||||
SwingUtilities.invokeLater(m_updatePB); // 3
|
||||
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) )
|
||||
{
|
||||
frame.setVisible(true);
|
||||
frame.toFront();
|
||||
}
|
||||
else
|
||||
if (!(Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED)) )
|
||||
{
|
||||
frame.validate();
|
||||
AEnv.showCenterScreen(frame);
|
||||
|
@ -343,10 +337,7 @@ public class AMenuStartItem extends Thread implements ActionListener
|
|||
// Center the window
|
||||
SwingUtilities.invokeLater(m_updatePB); // 3
|
||||
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) ) {
|
||||
ff.pack();
|
||||
ff.setExtendedState(Frame.MAXIMIZED_BOTH);
|
||||
ff.setVisible(true);
|
||||
ff.toFront();
|
||||
AEnv.showMaximized(ff);
|
||||
} else
|
||||
AEnv.showCenterScreen(ff);
|
||||
} // startForm
|
||||
|
|
|
@ -206,7 +206,14 @@ public class AZoomAcross implements ActionListener
|
|||
if (!frame.initWindow(AD_Window_ID, m_query))
|
||||
return;
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) )
|
||||
{
|
||||
AEnv.showMaximized(frame);
|
||||
}
|
||||
else
|
||||
{
|
||||
AEnv.showCenterScreen(frame);
|
||||
}
|
||||
frame = null;
|
||||
} // launchZoom
|
||||
|
||||
|
|
|
@ -1135,7 +1135,14 @@ public class VLookup extends JComponent
|
|||
else
|
||||
{
|
||||
AEnv.addToWindowManager(frame);
|
||||
AEnv.showCenterScreen(frame);
|
||||
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED))
|
||||
{
|
||||
AEnv.showMaximized(frame);
|
||||
}
|
||||
else
|
||||
{
|
||||
AEnv.showCenterScreen(frame);
|
||||
}
|
||||
}
|
||||
// async window - not able to get feedback
|
||||
frame = null;
|
||||
|
|
Loading…
Reference in New Issue