* [ 1662485 ] Zoom functionality doesn't open maximized window

This commit is contained in:
Heng Sin Low 2007-03-16 08:25:34 +00:00
parent 3e9beb2dd8
commit fe5f84af7b
4 changed files with 47 additions and 16 deletions

View File

@ -53,6 +53,18 @@ public final class AEnv
window.toFront(); window.toFront();
} // showCenterScreen } // 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 * Position window in center of the screen
* @param window Window to position * @param window Window to position
@ -493,7 +505,14 @@ public final class AEnv
if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID))) if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID)))
return; return;
addToWindowManager(frame); addToWindowManager(frame);
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED))
{
AEnv.showMaximized(frame);
}
else
{
AEnv.showCenterScreen(frame); AEnv.showCenterScreen(frame);
}
frame = null; frame = null;
} // zoom } // zoom
@ -544,7 +563,14 @@ public final class AEnv
if (!frame.initWindow(AD_Window_ID, query)) if (!frame.initWindow(AD_Window_ID, query))
return; return;
addToWindowManager(frame); addToWindowManager(frame);
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED))
{
AEnv.showMaximized(frame);
}
else
{
AEnv.showCenterScreen(frame); AEnv.showCenterScreen(frame);
}
frame = null; frame = null;
} // zoom } // zoom

View File

@ -236,18 +236,12 @@ public class AMenuStartItem extends Thread implements ActionListener
SwingUtilities.invokeLater(m_updatePB); // 2 SwingUtilities.invokeLater(m_updatePB); // 2
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) ) if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) )
{ {
frame.pack(); AEnv.showMaximized(frame);
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
} }
// Center the window // Center the window
SwingUtilities.invokeLater(m_updatePB); // 3 SwingUtilities.invokeLater(m_updatePB); // 3
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) ) if (!(Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED)) )
{
frame.setVisible(true);
frame.toFront();
}
else
{ {
frame.validate(); frame.validate();
AEnv.showCenterScreen(frame); AEnv.showCenterScreen(frame);
@ -343,10 +337,7 @@ public class AMenuStartItem extends Thread implements ActionListener
// Center the window // Center the window
SwingUtilities.invokeLater(m_updatePB); // 3 SwingUtilities.invokeLater(m_updatePB); // 3
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) ) { if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) ) {
ff.pack(); AEnv.showMaximized(ff);
ff.setExtendedState(Frame.MAXIMIZED_BOTH);
ff.setVisible(true);
ff.toFront();
} else } else
AEnv.showCenterScreen(ff); AEnv.showCenterScreen(ff);
} // startForm } // startForm

View File

@ -206,7 +206,14 @@ public class AZoomAcross implements ActionListener
if (!frame.initWindow(AD_Window_ID, m_query)) if (!frame.initWindow(AD_Window_ID, m_query))
return; return;
AEnv.addToWindowManager(frame); AEnv.addToWindowManager(frame);
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED) )
{
AEnv.showMaximized(frame);
}
else
{
AEnv.showCenterScreen(frame); AEnv.showCenterScreen(frame);
}
frame = null; frame = null;
} // launchZoom } // launchZoom

View File

@ -1135,8 +1135,15 @@ public class VLookup extends JComponent
else else
{ {
AEnv.addToWindowManager(frame); AEnv.addToWindowManager(frame);
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED))
{
AEnv.showMaximized(frame);
}
else
{
AEnv.showCenterScreen(frame); AEnv.showCenterScreen(frame);
} }
}
// async window - not able to get feedback // async window - not able to get feedback
frame = null; frame = null;
// //