Frame position on multiple monitors incorrect.
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2975622
This commit is contained in:
parent
359f90cee2
commit
db9c487d37
|
@ -324,7 +324,7 @@ public class HtmlDashboard extends JPanel implements MouseListener,
|
|||
html.setCursor(Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ));
|
||||
*/
|
||||
int AD_Window_ID=Integer.parseInt(url.getRef());
|
||||
AWindow frame = new AWindow();
|
||||
AWindow frame = new AWindow(getGraphicsConfiguration());
|
||||
if (!frame.initWindow(AD_Window_ID, null))//MQuery.getEqualQuery(TableName + "_ID", Record_ID)))
|
||||
return;
|
||||
AEnv.addToWindowManager(frame);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*****************************************************************************/
|
||||
package org.compiere.apps;
|
||||
|
||||
import java.awt.GraphicsConfiguration;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.sql.PreparedStatement;
|
||||
|
@ -71,6 +72,7 @@ public class AArchive implements ActionListener
|
|||
private CMenuItem m_documents = null;
|
||||
/** Where Clause */
|
||||
StringBuffer m_where = null;
|
||||
private GraphicsConfiguration m_graphicsconfig = null;
|
||||
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger (AArchive.class);
|
||||
|
@ -150,6 +152,8 @@ public class AArchive implements ActionListener
|
|||
|
||||
if (documentCount == 0 && reportCount == 0 && allReports == 0)
|
||||
m_popup.add(Msg.getMsg(Env.getCtx(), "ArchivedNone"));
|
||||
|
||||
m_graphicsconfig = invoker.getGraphicsConfiguration();
|
||||
//
|
||||
if (invoker.isShowing())
|
||||
m_popup.show(invoker, 0, invoker.getHeight()); // below button
|
||||
|
@ -162,7 +166,7 @@ public class AArchive implements ActionListener
|
|||
public void actionPerformed (ActionEvent e)
|
||||
{
|
||||
int AD_Form_ID = 118; // ArchiveViewer
|
||||
FormFrame ff = new FormFrame();
|
||||
FormFrame ff = new FormFrame(m_graphicsconfig);
|
||||
ff.openForm(AD_Form_ID);
|
||||
ArchiveViewer av = (ArchiveViewer)ff.getFormPanel();
|
||||
//
|
||||
|
|
|
@ -2633,7 +2633,7 @@ public final class APanel extends CPanel
|
|||
if (!cmd_save(true))
|
||||
return;
|
||||
|
||||
FormFrame ff = new FormFrame();
|
||||
FormFrame ff = new FormFrame(getGraphicsConfiguration());
|
||||
String title = vButton.getDescription();
|
||||
if (title == null || title.length() == 0)
|
||||
title = vButton.getName();
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*****************************************************************************/
|
||||
package org.compiere.apps;
|
||||
|
||||
import java.awt.GraphicsConfiguration;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.sql.PreparedStatement;
|
||||
|
@ -89,9 +90,11 @@ public class ARequest implements ActionListener
|
|||
private CMenuItem m_new = null;
|
||||
private CMenuItem m_active = null;
|
||||
private CMenuItem m_all = null;
|
||||
private GraphicsConfiguration m_graphicsconfig = null;
|
||||
/** Where Clause */
|
||||
StringBuffer m_where = null;
|
||||
|
||||
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger (ARequest.class);
|
||||
|
||||
|
@ -104,6 +107,7 @@ public class ARequest implements ActionListener
|
|||
m_new = new CMenuItem(Msg.getMsg(Env.getCtx(), "RequestNew"));
|
||||
m_new.setIcon(Env.getImageIcon("New16.gif"));
|
||||
m_popup.add(m_new).addActionListener(this);
|
||||
m_graphicsconfig = invoker.getGraphicsConfiguration();
|
||||
//
|
||||
int activeCount = 0;
|
||||
int inactiveCount = 0;
|
||||
|
@ -198,7 +202,7 @@ public class ARequest implements ActionListener
|
|||
}
|
||||
//
|
||||
int AD_Window_ID = 232; // 232=all - 201=my
|
||||
AWindow frame = new AWindow();
|
||||
AWindow frame = new AWindow(m_graphicsconfig);
|
||||
if (!frame.initWindow(AD_Window_ID, query))
|
||||
return;
|
||||
AEnv.addToWindowManager(frame);
|
||||
|
|
|
@ -303,7 +303,7 @@ public class VGenPanel extends CPanel implements ActionListener, ChangeListener,
|
|||
PrintInfo info = new PrintInfo(table.getTableName(),table.get_Table_ID(), Record_ID);
|
||||
ReportEngine re = new ReportEngine(Env.getCtx(), format, query, info);
|
||||
re.print();
|
||||
new Viewer(re);
|
||||
new Viewer(m_frame.getGraphicsConfiguration(), re);
|
||||
}
|
||||
else
|
||||
ReportCtl.startDocumentPrint(genForm.getReportEngineType(), Record_ID, this, Env.getWindowNo(this), true);
|
||||
|
|
|
@ -1184,7 +1184,7 @@ public class Viewer extends CFrame
|
|||
*/
|
||||
private void cmd_customize()
|
||||
{
|
||||
AWindow win = new AWindow ();
|
||||
AWindow win = new AWindow (getGraphicsConfiguration());
|
||||
new AWindowListener (win, this); // forwards Window Events
|
||||
int AD_Window_ID = 240; // hardcoded
|
||||
int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID();
|
||||
|
|
Loading…
Reference in New Issue