use of org.compiere.apps.form.FormFrame in project adempiere by adempiere.
the class WFActivity method cmd_button.
// cmd_zoom
/**
* Answer Button
*/
private void cmd_button() {
log.config("Activity=" + m_activity);
if (m_activity == null)
return;
//
MWFNode node = m_activity.getNode();
if (MWFNode.ACTION_UserWindow.equals(node.getAction())) {
// Explicit Window
int AD_Window_ID = node.getAD_Window_ID();
String ColumnName = m_activity.getPO().get_TableName() + "_ID";
int Record_ID = m_activity.getRecord_ID();
MQuery query = MQuery.getEqualQuery(ColumnName, Record_ID);
boolean IsSOTrx = m_activity.isSOTrx();
//
log.info("Zoom to AD_Window_ID=" + AD_Window_ID + " - " + query + " (IsSOTrx=" + IsSOTrx + ")");
AWindow frame = new AWindow();
if (!frame.initWindow(AD_Window_ID, query))
return;
AEnv.addToWindowManager(frame);
AEnv.showCenterScreen(frame);
frame = null;
} else if (MWFNode.ACTION_UserForm.equals(node.getAction())) {
int AD_Form_ID = node.getAD_Form_ID();
FormFrame ff = new FormFrame();
ff.openForm(AD_Form_ID);
ff.pack();
AEnv.addToWindowManager(ff);
AEnv.showCenterScreen(ff);
} else if (MWFNode.ACTION_SmartBrowse.equals(node.getAction())) {
CFrame ff = VBrowser.openBrowse(0, node.getAD_Browse_ID(), "", m_activity.isSOTrx());
ff.pack();
AEnv.addToWindowManager(ff);
AEnv.showCenterScreen(ff);
} else
/*
else if (MWFNode.ACTION_UserWorkbench.equals(node.getAction()))
{
}*/
log.log(Level.SEVERE, "No User Action:" + node.getAction());
}
use of org.compiere.apps.form.FormFrame in project adempiere by adempiere.
the class POSClient method main.
public static void main(String[] args) {
/** Properties */
Properties m_ctx = new Properties();
// needs to be here for UI
Adempiere.startup(true);
Splash splash = new Splash("POS Client");
final FormFrame frame = new FormFrame(new CFrame("POS Client"));
// Focus Traversal
KeyboardFocusManager.setCurrentKeyboardFocusManager(AKeyboardFocusManager.get());
ALogin login = new ALogin(splash);
if (// no automatic login
!login.initLogin()) {
// Center the window
try {
// HTML load errors
AEnv.showCenterScreen(login);
} catch (Exception ex) {
}
if (!login.isConnected() || !login.isOKpressed())
AEnv.exit(1);
}
// Check Build
if (!DB.isBuildOK(m_ctx))
AEnv.exit(1);
// Check DB (AppsServer Version checked in Login)
DB.isDatabaseOK(m_ctx);
splash.setText(Msg.getMsg(m_ctx, "Loading"));
splash.toFront();
//
if (// Load Environment
!Adempiere.startupEnvironment(true))
System.exit(1);
// Start Session
MSession.get(Env.getCtx(), true);
// Default Image
frame.setIconImage(Adempiere.getImage16());
splash.dispose();
splash = null;
POSClientWindow m_window;
m_window = new POSClientWindow(m_ctx);
m_window.setVisible(true);
}
use of org.compiere.apps.form.FormFrame in project adempiere by adempiere.
the class AArchive method actionPerformed.
// getZoomTargets
/**
* Listner
* @param e event
*/
public void actionPerformed(ActionEvent e) {
// ArchiveViewer
int AD_Form_ID = 118;
FormFrame ff = new FormFrame(m_graphicsconfig);
ff.openForm(AD_Form_ID);
ArchiveViewer av = (ArchiveViewer) ff.getFormPanel();
//
if (e.getSource() == m_documents)
av.query(false, m_AD_Table_ID, m_Record_ID);
else if (e.getSource() == m_reports)
av.query(true, m_AD_Table_ID, m_Record_ID);
else
// all Reports
av.query(true, m_AD_Table_ID, 0);
// Yamel Senih 2015-11-23 Add support to dynamic Create From
if (!ff.isDialog()) {
AEnv.addToWindowManager(ff);
}
ff.pack();
AEnv.showCenterScreen(ff);
// End Yamel Senih
ff = null;
}
Aggregations