use of org.compiere.apps.AWindow in project adempiere by adempiere.
the class Viewer method cmd_customize.
/**
* Call Customize
*/
private void cmd_customize() {
AWindow win = new AWindow(getGraphicsConfiguration());
// forwards Window Events
new AWindowListener(win, this);
// hardcoded
int AD_Window_ID = 240;
int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID();
boolean loadedOK = win.initWindow(AD_Window_ID, MQuery.getEqualQuery("AD_PrintFormat_ID", AD_PrintFormat_ID));
if (loadedOK) {
AEnv.addToWindowManager(win);
AEnv.showCenterScreen(win);
}
// see windowStateChanged for applying change
}
use of org.compiere.apps.AWindow in project adempiere by adempiere.
the class WFPanel method zoom.
// resetLayout
/**
* Zoom to WorkFlow
*/
private void zoom() {
if (m_WF_Window_ID <= 0) {
m_WF_Window_ID = MTable.get(m_ctx, MWorkflow.Table_ID).getAD_Window_ID();
}
if (m_WF_Window_ID <= 0) {
throw new AdempiereException("@NotFound@ @AD_Window_ID@");
}
MQuery query = null;
if (m_wf != null)
query = MQuery.getEqualQuery("AD_Workflow_ID", m_wf.getAD_Workflow_ID());
AWindow frame = new AWindow();
if (!frame.initWindow(m_WF_Window_ID, query))
return;
AEnv.addToWindowManager(frame);
AEnv.showCenterScreen(frame);
frame = null;
}
use of org.compiere.apps.AWindow in project adempiere by adempiere.
the class HtmlDashboard method htmlUpdate.
private void htmlUpdate(URL url) {
if ((url == null) || (url.getPath().equals("/local/home"))) {
html.setText(createHTML(PAGE_TYPE.PAGE_HOME));
html.setCaretPosition(0);
lastUrl = url;
} else if (url.getPath().equals("/local/logo")) {
html.setText(createHTML(PAGE_TYPE.PAGE_LOGO));
html.setCaretPosition(0);
lastUrl = url;
} else if (url.getPath().equals("/local/performance")) {
html.setText(createHTML(PAGE_TYPE.PAGE_PERFORMANCE));
} else if (url.getPath().equals("/window/node")) {
/* fcsku 3.7.07
CButton button = new CButton(""); // Create the button
button.setActionCommand(String.valueOf(url.getRef())); //getNode_ID()
button.addActionListener(treePanel); //VTreePanel
//AEnv.zoom(130, 0);
html.setCursor(Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ));
button.doClick();
html.setCursor(Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ));
*/
int AD_Window_ID = Integer.parseInt(url.getRef());
AWindow frame = new AWindow(getGraphicsConfiguration());
if (//MQuery.getEqualQuery(TableName + "_ID", Record_ID)))
!frame.initWindow(AD_Window_ID, null))
return;
AEnv.addToWindowManager(frame);
if (Ini.isPropertyBool(Ini.P_OPEN_WINDOW_MAXIMIZED)) {
AEnv.showMaximized(frame);
} else {
AEnv.showCenterScreen(frame);
}
frame = null;
html.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
} else if (url.getPath().equals("/window/zoom")) {
int index = Integer.parseInt(String.valueOf(url.getRef()));
if ((index >= 0) && (index < queryZoom.size())) {
html.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
AEnv.zoom(queryZoom.get(index));
html.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
} else if (url != null) {
// Load some cursors
Cursor cursor = html.getCursor();
html.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
SwingUtilities.invokeLater(new PageLoader(html, url, cursor));
lastUrl = url;
}
}
use of org.compiere.apps.AWindow in project adempiere by adempiere.
the class DocumentSearch method openWindow.
@Override
protected boolean openWindow(int windowId, MQuery query) {
final AWindow frame = new AWindow();
AEnv.addToWindowManager(frame);
if (frame.initWindow(windowId, query)) {
frame.pack();
AEnv.showCenterScreen(frame);
}
return true;
}
use of org.compiere.apps.AWindow in project adempiere by adempiere.
the class VPAttributeDialog method cmd_zoom.
// cmd_newEdit
/**
* Zoom M_Lot
*/
private void cmd_zoom() {
int M_Lot_ID = 0;
KeyNamePair pp = (KeyNamePair) fieldLot.getSelectedItem();
if (pp != null)
M_Lot_ID = pp.getKey();
MQuery zoomQuery = new MQuery("M_Lot");
zoomQuery.addRestriction("M_Lot_ID", MQuery.EQUAL, M_Lot_ID);
log.info(zoomQuery.toString());
//
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
//
// Lot
int AD_Window_ID = MWindow.getWindow_ID("Lot");
AWindow frame = new AWindow();
if (frame.initWindow(AD_Window_ID, zoomQuery)) {
this.setVisible(false);
// otherwise blocked
this.setModal(false);
this.setVisible(true);
AEnv.addToWindowManager(frame);
AEnv.showScreen(frame, SwingConstants.EAST);
}
// async window - not able to get feedback
frame = null;
//
setCursor(Cursor.getDefaultCursor());
}
Aggregations