Package org.compiere.swing

Examples of org.compiere.swing.CDialog


   * @param mTab the parent tab that is launching the dialog.
   * @return the CDialog referenced by the name or null if the name is unknown.
   */
  public CDialog createDialog(String name, GridTab mTab)
  {
    CDialog dialog = null;
   
    if (name.equals(ADD_PRODUCT_TO_PRICE_LISTS))
    {
      int windowNo = mTab.getWindowNo();
     
View Full Code Here


    // the the letters "Dlg".  The name of the column can then be added to the
    // DialogFactory which will return the relevant dialog for the column name.
    else if (col.startsWith("Dlg"))
    {
      DialogFactory factory = new DialogFactory();
      CDialog dialog = factory.createDialog(col, m_curTab);
      if (dialog != null)
      {
        dialog.setVisible(true);
        dialog.dispose();
        m_curTab.dataRefresh();
      }
      return;
     
    //  Dlg...
    // CHANGES END HERE 2009-11-03 rgliddon

    /**
     *  Start Process ----
     *  or invoke user form
     */

    log.config("Process_ID=" + vButton.getProcess_ID() + ", Record_ID=" + record_ID);
    if (vButton.getProcess_ID() == 0)
      return;
    //  Save item changed
    if (m_curTab.needSave(true, false))
      if (!cmd_save(true))
        return;
   
    // call form
    MProcess pr = new MProcess(m_ctx, vButton.getProcess_ID(), null);
    int form_ID = pr.getAD_Form_ID();
    if (form_ID != 0 )
    {
     
      if (m_curTab.needSave(true, false))
        if (!cmd_save(true))
          return;
     
      FormFrame ff = new FormFrame();
      String title = vButton.getDescription();
      if (title == null || title.length() == 0)
        title = vButton.getName();
      ProcessInfo pi = new ProcessInfo (title, vButton.getProcess_ID(), table_ID, record_ID);
      pi.setAD_User_ID (Env.getAD_User_ID(m_ctx));
      pi.setAD_Client_ID (Env.getAD_Client_ID(m_ctx));
      ff.setProcessInfo(pi);
      ff.openForm(form_ID);
      ff.pack();
      AEnv.showCenterScreen(ff);
      return;
    }   
    else {
      ProcessModalDialog dialog = new ProcessModalDialog(m_ctx, Env.getWindow(m_curWindowNo), Env.getHeader(m_ctx, m_curWindowNo),
          this, m_curWindowNo, vButton.getProcess_ID(), table_ID,
          record_ID, startWOasking);
      if (dialog.isValidDialog())
      {
        dialog.validate();
        dialog.pack();
        AEnv.showCenterWindow(Env.getWindow(m_curWindowNo), dialog);
      }
    }
  }  //  actionButton
View Full Code Here

TOP

Related Classes of org.compiere.swing.CDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.