/** * Assignment Dialog. * * <pre> * Creates a new assignment oor displays an assignment * Create new: (ID == 0) * check availability & create assignment * (confirmed when order/incoice/timeExpense is processed) * alternatively let InfoResource do the assignment * return ID * Existing assignment: (ID != 0) * if confirmed - no change. * ability to delete or change assignment * return ID * </pre> * * @param mAssignment Assignment * @param allowZoom allow to zoom to schedule * @param allowDelete allow to delete recorde */ public WAssignmentDialog( MResourceAssignment mAssignment, boolean allowZoom, boolean allowDelete) { super(); this.setTitle(Msg.getMsg(Env.getCtx(), "VAssignmentDialog")); this.setAttribute("mode", "modal"); this.setBorder("normal"); log.config(mAssignment.toString()); m_mAssignment = mAssignment; try { init(); if (!allowZoom) confirmPanel.getButton("Zoom").setVisible(false); delete.setVisible(allowDelete); } catch (Exception e) { log.log(Level.SEVERE, "", e); } setDisplay(); // from mAssignment // AEnv.showWindow(this); } // VAssignmentDialog