Statistics
| Revision:

root / trunk / extensions / extGeoreferencing / src / com / iver / cit / gvsig / gui / Panels / TableControlerPanel.java @ 3014

History | View | Annotate | Download (3.86 KB)

1
package com.iver.cit.gvsig.gui.Panels;
2

    
3
import java.awt.FlowLayout;
4

    
5
import javax.swing.ImageIcon;
6
import javax.swing.JButton;
7
import javax.swing.JComboBox;
8
import javax.swing.JLabel;
9
import javax.swing.JPanel;
10
import javax.swing.JTextField;
11

    
12
import com.iver.andami.PluginServices;
13
import com.iver.cit.gvsig.fmap.layers.FLyrPoints;
14

    
15
/**
16
 * Control para el manejo de tablas. No contiene eventos, estos deben 
17
 * ser manejados desde la clase que lo llame.
18
 * 
19
 * @author Nacho Brodin (brodin_ign@gva.es)
20
 *
21
 */
22
public class TableControlerPanel extends JPanel{
23
        
24
        private JButton bPrev = null;
25
        private JComboBox cPoint = null;
26
        private JButton bNext = null;
27
        private JButton bNew = null;
28
        private JButton bFirst = null;
29
        private JButton bLast = null;
30
        private JPanel pTableControl = null;
31
        private JLabel lPoints = null;
32
        private JLabel lNumberOfPoints = null;
33
        
34
        /**
35
         * This is the default constructor
36
         */
37
        public TableControlerPanel() {
38
                super();
39
                initialize();
40
        }
41

    
42
        /**
43
         * This method initializes this
44
         * 
45
         * @return void
46
         */
47
        private void initialize() {                
48
                FlowLayout flowLayout5 = new FlowLayout();
49
                flowLayout5.setHgap(0);
50
                flowLayout5.setVgap(0);
51
        
52
                this.setLayout(flowLayout5);
53
                
54
                lNumberOfPoints = new JLabel();
55
                lNumberOfPoints.setText(PluginServices.getText(this, "de 0"));
56
                lNumberOfPoints.setPreferredSize(new java.awt.Dimension(40,15));
57
                lPoints = new JLabel();
58
                lPoints.setText(PluginServices.getText(this, "puntos"));
59
                
60
                this.add(getBFirst(), null);
61
                this.add(getBPrev(), null);
62
                this.add(lPoints, null);
63
                this.add(getCPoint(), null);
64
                this.add(getBNext(), null);
65
                this.add(getBLast(), null);
66
                this.add(lNumberOfPoints, null);
67
                this.add(lNumberOfPoints, null);
68
        }
69
        
70
        
71
        /**
72
         * This method initializes jButton        
73
         *         
74
         * @return javax.swing.JButton        
75
         */    
76
        public JButton getBFirst() {
77
                if (bFirst == null) {
78
                        bFirst = new JButton();
79
                        bFirst.setPreferredSize(new java.awt.Dimension(25,25));
80
                        bFirst.setEnabled(false);
81
                        bFirst.setIcon(new ImageIcon(getClass().getResource("/com/iver/cit/gvsig/gui/Panels/images/first.png")));
82
                }
83
                return bFirst;
84
        }
85
        
86
        /**
87
         * This method initializes jButton        
88
         *         
89
         * @return javax.swing.JButton        
90
         */    
91
        public JButton getBLast() {
92
                if (bLast == null) {
93
                        bLast = new JButton();
94
                        bLast.setPreferredSize(new java.awt.Dimension(25,25));
95
                        bLast.setEnabled(false);
96
                        bLast.setIcon(new ImageIcon(getClass().getResource("/com/iver/cit/gvsig/gui/Panels/images/last.png")));
97
                }
98
                return bLast;
99
        }
100
        
101
        /**
102
         * This method initializes bBefore        
103
         *         
104
         * @return javax.swing.JButton        
105
         */
106
        public JButton getBPrev() {
107
                if (bPrev == null) {
108
                        bPrev = new JButton();
109
                        bPrev.setText("");
110
                        bPrev.setEnabled(false);
111
                        bPrev.setPreferredSize(new java.awt.Dimension(25,25));
112
                        bPrev.setIcon(new ImageIcon(getClass().getResource("/com/iver/cit/gvsig/gui/Panels/images/prev.png")));
113
                        bPrev.setActionCommand("");
114
                }
115
                return bPrev;
116
        }
117

    
118
        /**
119
         * This method initializes bNext        
120
         *         
121
         * @return javax.swing.JButton        
122
         */
123
        public JButton getBNext() {
124
                if (bNext == null) {
125
                        bNext = new JButton();
126
                        bNext.setText("");
127
                        bNext.setEnabled(false);
128
                        bNext.setPreferredSize(new java.awt.Dimension(25,25));
129
                        bNext.setIcon(new ImageIcon(getClass().getResource("/com/iver/cit/gvsig/gui/Panels/images/next.png")));
130
                        bNext.setActionCommand("");
131
                }
132
                return bNext;
133
        }
134
        
135
        /**
136
         * Este m?todo inicializa el combo que contiene el n?mero de puntos.        
137
         *         
138
         * @return javax.swing.JComboBox        
139
         */
140
        public JComboBox getCPoint() {
141
                if (cPoint == null) {
142
                        cPoint = new JComboBox();
143
                        cPoint.setPreferredSize(new java.awt.Dimension(50,24));
144
                        
145
                }
146
                return cPoint;
147
        }
148

    
149
        /**
150
         * @return Returns the lNumberOfPoints.
151
         */
152
        public JLabel getLNumberOfPoints() {
153
                return lNumberOfPoints;
154
        }
155

    
156
        /**
157
         * @param numberOfPoints The lNumberOfPoints to set.
158
         */
159
        public void setLNumberOfPoints(JLabel numberOfPoints) {
160
                lNumberOfPoints = numberOfPoints;
161
        }
162
        
163
}