Skip to content

Commit

Permalink
fix: Remove warning The constructor AWindow() is deprecated.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Sep 22, 2023
1 parent 7af7822 commit 8904963
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client/src/de/schaeffer/compiere/tools/DocumentSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class DocumentSearch extends AbstractDocumentSearch {
static CLogger log = CLogger.getCLogger(DocumentSearch.class);
@Override
protected boolean openWindow(int windowId, MQuery query) {
final AWindow frame = new AWindow();
final AWindow frame = new AWindow(null);
AEnv.addToWindowManager(frame);
if (frame.initWindow(windowId, query)) {
frame.pack();
Expand Down
6 changes: 3 additions & 3 deletions client/src/org/compiere/apps/AEnv.java
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public static void zoom (int AD_Table_ID, int Record_ID)
}

log.config(TableName + " - Record_ID=" + Record_ID + " (IsSOTrx=" + isSOTrx + ")");
AWindow frame = new AWindow();
AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, MQuery.getEqualQuery(TableName + "_ID", Record_ID)))
return;
addToWindowManager(frame);
Expand Down Expand Up @@ -655,7 +655,7 @@ public static void zoom (MQuery query)
}

log.config(query + " (IsSOTrx=" + isSOTrx + ")");
AWindow frame = new AWindow();
AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, query))
return;
addToWindowManager(frame);
Expand Down Expand Up @@ -806,7 +806,7 @@ public static void startWorkflowProcess (int AD_Table_ID, int Record_ID)
query.addRestriction("Record_ID", MQuery.EQUAL, Record_ID);
}
//
AWindow frame = new AWindow();
AWindow frame = new AWindow(null);
if (!frame.initWindow(s_workflow_Window_ID, query))
return;
addToWindowManager(frame);
Expand Down
2 changes: 1 addition & 1 deletion client/src/org/compiere/apps/AZoomAcross.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private void launchZoom (final ZoomInfoFactory.ZoomInfo zoomInfo)
logger.info("AD_Window_ID=" + AD_Window_ID
+ " - " + query);

AWindow frame = new AWindow();
AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, query))
return;
AEnv.addToWindowManager(frame);
Expand Down
2 changes: 1 addition & 1 deletion client/src/org/compiere/apps/form/VTrxMaterial.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public void zoom()

// Zoom
panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
AWindow frame = new AWindow();
AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, query))
{
panel.setCursor(Cursor.getDefaultCursor());
Expand Down
3 changes: 1 addition & 2 deletions client/src/org/compiere/apps/search/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -1395,11 +1395,10 @@ public void valueChanged(ListSelectionEvent lse)
* @param AD_Window_ID window id
* @param zoomQuery zoom query
*/
@SuppressWarnings("deprecation")
protected void zoom (int AD_Window_ID, MQuery zoomQuery)
{
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
final AWindow frame = new AWindow();
final AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, zoomQuery))
return;
AEnv.addToWindowManager(frame);
Expand Down
2 changes: 1 addition & 1 deletion client/src/org/compiere/apps/wf/WFActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ private void cmd_button()
//
log.info("Zoom to AD_Window_ID=" + AD_Window_ID
+ " - " + query + " (IsSOTrx=" + IsSOTrx + ")");
AWindow frame = new AWindow();
AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, query))
return;
AEnv.addToWindowManager(frame);
Expand Down
2 changes: 1 addition & 1 deletion client/src/org/compiere/apps/wf/WFPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ private void zoom()
MQuery query = null;
if (m_wf != null)
query = MQuery.getEqualQuery("AD_Workflow_ID", m_wf.getAD_Workflow_ID());
AWindow frame = new AWindow();
AWindow frame = new AWindow(null);
if (!frame.initWindow (m_WF_Window_ID, query))
return;
AEnv.addToWindowManager(frame);
Expand Down
2 changes: 1 addition & 1 deletion client/src/org/compiere/grid/ed/VLocator.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ private void actionZoom()
log.info("");
//
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
AWindow frame = new AWindow();
AWindow frame = new AWindow(null);

MQuery zoomQuery = new MQuery();
zoomQuery.addRestriction(MLocator.COLUMNNAME_M_Locator_ID, MQuery.EQUAL, getValue());
Expand Down
2 changes: 1 addition & 1 deletion client/src/org/compiere/grid/ed/VPAttributeDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ private void cmd_zoom()
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
//
int AD_Window_ID = MWindow.getWindow_ID("Lot"); // Lot
AWindow frame = new AWindow();
AWindow frame = new AWindow(null);
if (frame.initWindow(AD_Window_ID, zoomQuery))
{
this.setVisible(false);
Expand Down
2 changes: 1 addition & 1 deletion client/src/org/compiere/print/SwingViewerProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class SwingViewerProvider implements ReportViewerProvider {

public void openViewer(ReportEngine re) {
Viewer viewer = new Viewer(re);
Viewer viewer = new Viewer(null, re);
JFrame top = Env.getWindow(0);
if (top instanceof AMenu)
((AMenu)top).getWindowManager().add(viewer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ public void vetoableChange(PropertyChangeEvent evt)
public void zoom(int AD_Window_ID, MQuery zoomQuery) {
panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

final AWindow frame = new AWindow();
final AWindow frame = new AWindow(null);
if (!frame.initWindow(AD_Window_ID, zoomQuery))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private void zoom() {
MQuery query = new MQuery();
query.setTableName(tablename);

AWindow window = new AWindow();
AWindow window = new AWindow(null);
if (window.initWindow(tableid, query)) {

AEnv.showCenterScreen(window);
Expand Down

0 comments on commit 8904963

Please sign in to comment.