Revision 4187 branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/gui/beans/Pager.java
Pager.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
|
1 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
|
2 | 2 |
* |
3 | 3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
4 | 4 |
* |
... | ... | |
20 | 20 |
* |
21 | 21 |
* Generalitat Valenciana |
22 | 22 |
* Conselleria d'Infraestructures i Transport |
23 |
* Av. Blasco Ib??ez, 50
|
|
23 |
* Av. Blasco Ib��ez, 50
|
|
24 | 24 |
* 46010 VALENCIA |
25 | 25 |
* SPAIN |
26 | 26 |
* |
... | ... | |
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.2.2.5 2006-02-16 10:36:41 jaume
|
|
46 |
* Revision 1.2.2.6 2006-02-23 10:36:30 jaume
|
|
47 | 47 |
* *** empty log message *** |
48 | 48 |
* |
49 |
* Revision 1.2.2.5 2006/02/16 10:36:41 jaume |
|
50 |
* *** empty log message *** |
|
51 |
* |
|
49 | 52 |
* Revision 1.1 2006/02/16 09:09:05 caballero |
50 | 53 |
* PAger de Jaume |
51 | 54 |
* |
... | ... | |
131 | 134 |
private JSlider slider = null; |
132 | 135 |
private int itemCount; |
133 | 136 |
private int lowLimit; |
134 |
private int currentValue; |
|
137 |
private int currentValue = -1;
|
|
135 | 138 |
private int orientation; |
136 | 139 |
private boolean refreshing = false; |
137 | 140 |
public static int HORIZONTAL=0; |
... | ... | |
154 | 157 |
public Pager(int lowIndex, int itemCount,int orientation) { |
155 | 158 |
super(); |
156 | 159 |
this.orientation=orientation; |
157 |
if (orientation==VERTICAL){ |
|
158 |
initialize(lowIndex, itemCount); |
|
159 |
}else{ |
|
160 |
initialize(lowIndex, itemCount); |
|
161 |
} |
|
162 |
|
|
160 |
initialize(lowIndex, itemCount); |
|
163 | 161 |
} |
164 | 162 |
|
165 | 163 |
/** |
... | ... | |
170 | 168 |
private void initialize(int lowIndex, int itemCount) { |
171 | 169 |
setItemCount(itemCount); |
172 | 170 |
this.lowLimit = lowIndex; |
173 |
this.currentValue = lowLimit; |
|
174 | 171 |
this.setLayout(null); |
175 | 172 |
if (orientation==VERTICAL){ |
176 | 173 |
this.setSize(45,305); |
177 | 174 |
this.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.lightGray,1)); |
178 | 175 |
this.setPreferredSize(new Dimension(40,300)); |
179 | 176 |
}else{ |
180 |
this.setSize(190, 50);
|
|
177 |
this.setSize(240, 50);
|
|
181 | 178 |
this.setPreferredSize(new Dimension(190,50)); |
182 | 179 |
} |
183 | 180 |
|
... | ... | |
199 | 196 |
if (orientation==VERTICAL){ |
200 | 197 |
buttonsPanel.setBounds(3, 182, 35,115); |
201 | 198 |
}else{ |
202 |
buttonsPanel.setBounds(5, 25, 180, 25);
|
|
199 |
buttonsPanel.setBounds(5, 25, 240, 25);
|
|
203 | 200 |
} |
204 | 201 |
|
205 | 202 |
buttonsPanel.add(getBtnFastBackward(), null); |
... | ... | |
275 | 272 |
txtItemCountDisplay.setHorizontalAlignment(javax.swing.JTextField.CENTER); |
276 | 273 |
if (orientation==VERTICAL){ |
277 | 274 |
txtItemCountDisplay.setBounds(2,43, 33, 23); |
278 |
}else{
|
|
279 |
txtItemCountDisplay.setBounds(43, 2, 94, 23);
|
|
275 |
} else {
|
|
276 |
txtItemCountDisplay.setBounds(43, 2, 144, 23);
|
|
280 | 277 |
} |
281 | 278 |
|
282 | 279 |
txtItemCountDisplay.setText(lowLimit+" / "+itemCount); |
... | ... | |
365 | 362 |
if (orientation==VERTICAL){ |
366 | 363 |
btnForward.setBounds(7, 67, 20, 24); |
367 | 364 |
}else{ |
368 |
btnForward.setBounds(139, 1, 20, 24);
|
|
365 |
btnForward.setBounds(189, 1, 20, 24);
|
|
369 | 366 |
} |
370 | 367 |
|
371 | 368 |
btnForward.setEnabled(itemCount!=0); |
... | ... | |
391 | 388 |
if (orientation==VERTICAL){ |
392 | 389 |
btnFastForward.setBounds(7, 91, 20, 24); |
393 | 390 |
}else{ |
394 |
btnFastForward.setBounds(158, 1, 20, 24);
|
|
391 |
btnFastForward.setBounds(208, 1, 20, 24);
|
|
395 | 392 |
} |
396 | 393 |
|
397 | 394 |
btnFastForward.setEnabled(itemCount!=0); |
... | ... | |
419 | 416 |
if (orientation==VERTICAL){ |
420 | 417 |
sliderPanel.setBounds(3, 0, 35, 181); |
421 | 418 |
}else{ |
422 |
sliderPanel.setBounds(5, 0, 181, 26);
|
|
419 |
sliderPanel.setBounds(5, 0, 300, 26);
|
|
423 | 420 |
} |
424 | 421 |
sliderPanel.setEnabled(false); |
425 | 422 |
sliderPanel.add(getSlider(), null); |
... | ... | |
438 | 435 |
slider.setValue(0); |
439 | 436 |
if (orientation==VERTICAL){ |
440 | 437 |
slider.setOrientation(JSlider.VERTICAL); |
441 |
slider.setSize(24, 180);
|
|
438 |
slider.setSize(24, 230);
|
|
442 | 439 |
}else{ |
443 | 440 |
slider.setOrientation(JSlider.HORIZONTAL); |
444 |
slider.setSize(180, 24);
|
|
441 |
slider.setSize(230, 24);
|
|
445 | 442 |
} |
446 | 443 |
|
447 | 444 |
slider.setLocation(0, 1); |
Also available in: Unified diff