root / org.gvsig.expressionfield / trunk / org.gvsig.expressionfield / src / main / java / org / gvsig / expressionfield / project / documents / table / gui / ListOperatorsModel.java @ 24
History | View | Annotate | Download (1.95 KB)
1 |
/*******************************************************************************
|
---|---|
2 |
*
|
3 |
* gvSIG. Desktop Geographic Information System.
|
4 |
*
|
5 |
* Copyright (C) 2007-2013 gvSIG Association.
|
6 |
*
|
7 |
* This program is free software; you can redistribute it and/or
|
8 |
* modify it under the terms of the GNU General Public License
|
9 |
* as published by the Free Software Foundation; either version 3
|
10 |
* of the License, or (at your option) any later version.
|
11 |
*
|
12 |
* This program is distributed in the hope that it will be useful,
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
* GNU General Public License for more details.
|
16 |
*
|
17 |
* You should have received a copy of the GNU General Public License
|
18 |
* along with this program; if not, write to the Free Software
|
19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
20 |
* MA 02110-1301, USA.
|
21 |
*
|
22 |
* For any additional information, do not hesitate to contact us
|
23 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
24 |
*
|
25 |
*******************************************************************************/
|
26 |
package org.gvsig.expressionfield.project.documents.table.gui; |
27 |
|
28 |
import java.util.ArrayList; |
29 |
|
30 |
import javax.swing.AbstractListModel; |
31 |
|
32 |
|
33 |
/**
|
34 |
* Modelo de la Lista de operadores a seleccionar.
|
35 |
*
|
36 |
* @author Vicente Caballero Navarro
|
37 |
*/
|
38 |
public class ListOperatorsModel extends AbstractListModel { |
39 |
private ArrayList operators = new ArrayList(); |
40 |
|
41 |
/**
|
42 |
* A?ade los comandos que tiene el proyecto a la lista.
|
43 |
*/
|
44 |
public void addOperator(Object command) { |
45 |
operators.add(command); |
46 |
} |
47 |
|
48 |
/**
|
49 |
* @see javax.swing.ListModel#getSize()
|
50 |
*/
|
51 |
public int getSize() { |
52 |
return operators.size();
|
53 |
} |
54 |
|
55 |
/**
|
56 |
* @see javax.swing.ListModel#getElementAt(int)
|
57 |
*/
|
58 |
public Object getElementAt(int index) { |
59 |
return operators.get(index);
|
60 |
} |
61 |
public void clear() { |
62 |
operators.clear(); |
63 |
} |
64 |
} |