Search in sources :

Example 6 with FormFrame

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());
}
Also used : AWindow(org.compiere.apps.AWindow) FormFrame(org.compiere.apps.form.FormFrame) MWFNode(org.compiere.wf.MWFNode) MQuery(org.compiere.model.MQuery) CFrame(org.compiere.swing.CFrame)

Example 7 with FormFrame

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);
}
Also used : ALogin(org.compiere.apps.ALogin) FormFrame(org.compiere.apps.form.FormFrame) Splash(org.compiere.util.Splash) Properties(java.util.Properties) CFrame(org.compiere.swing.CFrame)

Example 8 with FormFrame

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;
}
Also used : ArchiveViewer(org.compiere.apps.form.ArchiveViewer) FormFrame(org.compiere.apps.form.FormFrame)

Aggregations

FormFrame (org.compiere.apps.form.FormFrame)8 MBrowse (org.adempiere.model.MBrowse)4 Properties (java.util.Properties)2 ProcessInfo (org.compiere.process.ProcessInfo)2 CFrame (org.compiere.swing.CFrame)2 VBrowser (org.eevolution.form.VBrowser)2 Dimension (java.awt.Dimension)1 Point (java.awt.Point)1 AdempiereException (org.adempiere.exceptions.AdempiereException)1 CommandReceiver (org.adempiere.pos.command.CommandReceiver)1 ALogin (org.compiere.apps.ALogin)1 AWindow (org.compiere.apps.AWindow)1 Waiting (org.compiere.apps.Waiting)1 ArchiveViewer (org.compiere.apps.form.ArchiveViewer)1 ICreateFrom (org.compiere.grid.ICreateFrom)1 VPayment (org.compiere.grid.VPayment)1 VDocAction (org.compiere.grid.ed.VDocAction)1 GridTab (org.compiere.model.GridTab)1 MBPartner (org.compiere.model.MBPartner)1 MProcess (org.compiere.model.MProcess)1