KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > report > core > ResultTableCellEditor


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.report.core;
15
16 import java.util.*;
17 import java.awt.*;
18 import javax.swing.*;
19 import javax.swing.table.*;
20 import javax.swing.event.*;
21
22 /**
23  * Cell Editor for Report Result Table
24  *
25  * @author Jorg Janke
26  * @version $Id: ResultTableCellEditor.java,v 1.1 2001/11/21 04:56:35 jjanke Exp $
27  */

28 public class ResultTableCellEditor extends AbstractCellEditor implements TableCellEditor
29 {
30     /**
31      * Constructor (read only)
32      */

33     public ResultTableCellEditor()
34     {
35     } // ResultTableCellEditor
36

37     /**
38      * Constructor
39      */

40     public ResultTableCellEditor(RColumn rc)
41     {
42         m_rc = rc;
43     } // ResultTableCellEditor
44

45     /** Report Column */
46     private RColumn m_rc = null;
47
48     /**
49      * Return Editor
50      */

51     public Component getTableCellEditorComponent (JTable table, Object JavaDoc value,
52         boolean isSelected, int row, int col)
53     {
54         if (m_rc == null)
55             return null;
56         return null;
57     } // getTableCellEditorComponent
58

59     /**
60      * Get Value
61      */

62     public Object JavaDoc getCellEditorValue()
63     {
64         if (m_rc == null)
65             return null;
66         return null;
67     } // getCellEditorValue
68

69     /**
70      * Is Cell editable
71      */

72     public boolean isCellEditable(EventObject anEvent)
73     {
74         if (m_rc == null)
75             return false;
76         return !m_rc.isReadOnly();
77     } // isCellEditable
78

79     /**
80      * Should Cell be selected
81      */

82     public boolean shouldSelectCell(EventObject anEvent)
83     {
84         if (m_rc == null)
85             return false;
86         return !m_rc.isReadOnly();
87     } // shouldSelectCell
88

89 } // ResultTableCellEditor
90
Popular Tags