merged tag ooo/OOO330_m14
[LibreOffice.git] / xmlsecurity / tools / uno / UnsolvedReferenceTableModel.java
blob21f17de8877dc3934b089b80c88c7ef5b6dd1272
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 package com.sun.star.xml.security.uno;
30 import javax.swing.table.AbstractTableModel;
33 * this class is used to maintain the unsolved reference
34 * table.
36 class UnsolvedReferenceTableModel extends AbstractTableModel
38 private String[] m_columnNames = {"id",
39 "refNum",
40 "EC's id"};
42 private TestTool m_testTool;
44 UnsolvedReferenceTableModel(TestTool testTool)
46 m_testTool = testTool;
49 public String getColumnName(int col)
51 return m_columnNames[col].toString();
54 public int getRowCount()
56 return m_testTool.getUnsolvedReferenceIds().size();
59 public int getColumnCount()
61 return m_columnNames.length;
64 public Object getValueAt(int row, int col)
66 if (col == 0)
68 return (String)m_testTool.getUnsolvedReferenceIds().elementAt(row);
70 else if (col == 1)
72 return ((Integer)m_testTool.getUnsolvedReferenceRefNum().elementAt(row)).toString();
74 else if (col == 2)
76 return ((Integer)m_testTool.getUnsolvedReferenceKeeperIds().elementAt(row)).toString();
78 else
80 return null;
84 public boolean isCellEditable(int row, int col)
86 return false;