KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > www > WWindowStatus


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package org.compiere.www;
15
16 import java.util.*;
17 import java.text.*;
18
19 import org.compiere.model.*;
20 import org.compiere.util.*;
21 /**
22  * WWindow Status Information (Value Object)
23  *
24  * @author Jorg Janke
25  * @version $Id: WWindowStatus.java,v 1.1.1.1 2002/10/12 01:06:56 jjanke Exp $
26  */

27 public class WWindowStatus
28 {
29     /**
30      * Constructor - First Tab - First Row - Single Row.
31      * <br>
32      * Initialize Formats
33      * @param mWindowVO window VO
34      */

35     public WWindowStatus(MWindowVO mWindowVO)
36     {
37         mWindow = new MWindow(mWindowVO);
38         curTab = mWindow.getTab(0);
39         curTab.setSingleRow(true);
40         //
41
ctx = mWindowVO.ctx;
42         Language lang = Env.getLanguage (ctx);
43         //
44
dateFormat = DisplayType.getDateFormat(DisplayType.Date, lang);
45         dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, lang);
46         //
47
amountFormat = DisplayType.getNumberFormat(DisplayType.Amount, lang);
48         integerFormat = DisplayType.getNumberFormat(DisplayType.Integer, lang);
49         numberFormat = DisplayType.getNumberFormat(DisplayType.Number, lang);
50         quantityFormat = DisplayType.getNumberFormat(DisplayType.Quantity, lang);
51     } // WWindowStatus
52

53     /** The MWindow */
54     protected MWindow mWindow;
55     /** The current MTab */
56     protected MTab curTab;
57     /** Point to WWindow Properties */
58     protected Properties ctx = null;
59
60     /** Localized Date format */
61     protected SimpleDateFormat dateFormat = null;
62     /** Localized Timestamp format */
63     protected SimpleDateFormat dateTimeFormat = null;
64
65     /** Localized Amount format */
66     protected DecimalFormat amountFormat = null;
67     /** Localized Integer format */
68     protected DecimalFormat integerFormat = null;
69     /** Localized Number format */
70     protected DecimalFormat numberFormat = null;
71     /** Localized Quantity format */
72     protected DecimalFormat quantityFormat = null;
73
74     /**
75      * String representation
76      * @return String representation
77      */

78     public String JavaDoc toString()
79     {
80         return "WWindowStatus[" + mWindow + "]";
81     } // toString
82

83 } // WWindowStatus
84
Popular Tags