Revision 4187
branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/fmap/layers/FLyrWMS.java | ||
---|---|---|
512 | 512 |
} |
513 | 513 |
|
514 | 514 |
/** |
515 |
* |
|
515 | 516 |
* This is the method used to draw a tile in a WMS mosaic layer. |
516 | 517 |
*/ |
517 | 518 |
private void drawTile(Graphics2D g, ViewPort vp, Cancellable cancel) throws DriverException { |
branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/fmap/layers/TimeDimension.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.3.2.4 2006-02-10 13:22:35 jaume |
|
46 |
* Revision 1.3.2.5 2006-02-23 10:36:30 jaume |
|
47 |
* *** empty log message *** |
|
48 |
* |
|
49 |
* Revision 1.3.2.4 2006/02/10 13:22:35 jaume |
|
47 | 50 |
* now analyzes dimensions on demand |
48 | 51 |
* |
49 | 52 |
* Revision 1.3.2.3 2006/01/31 16:25:24 jaume |
... | ... | |
101 | 104 |
*/ |
102 | 105 |
package com.iver.cit.gvsig.fmap.layers; |
103 | 106 |
|
107 |
import java.util.ArrayList; |
|
104 | 108 |
import java.util.GregorianCalendar; |
105 | 109 |
|
106 | 110 |
/** |
... | ... | |
119 | 123 |
* |
120 | 124 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
121 | 125 |
*/ |
126 |
|
|
122 | 127 |
public class TimeDimension implements IFMapWMSDimension { |
123 | 128 |
static private final long millisXsec = 1000; |
124 | 129 |
static private final long millisXminute = 60 * millisXsec; |
... | ... | |
235 | 240 |
public boolean isValidValue(String value) { |
236 | 241 |
return (value.matches(regexDateForGeologicDatasets) || value.matches(regexDateExtendedForBCE)); |
237 | 242 |
} |
238 |
|
|
243 |
|
|
239 | 244 |
public Object valueOf(String value) throws IllegalArgumentException { |
240 | 245 |
if (compiled) { |
241 | 246 |
// TODO Missing geological dates |
... | ... | |
461 | 466 |
} else { |
462 | 467 |
maxValue = valueOf(s[0]); |
463 | 468 |
} |
469 |
} |
|
470 |
} |
|
471 |
|
|
472 |
/* |
|
473 |
class _TimeDimensionDePrueba implements IFMapWMSDimension { |
|
474 |
static private final byte YEAR_FORMAT = -1; |
|
475 |
static private final byte YEAR_TO_MONTH_FORMAT = -2; |
|
476 |
static private final byte YEAR_TO_DAY_FORMAT = -3; |
|
477 |
static private final byte FULL_FORMAT = -4; |
|
478 |
|
|
479 |
static private final long millisXsec = 1000; |
|
480 |
static private final long millisXminute = 60 * millisXsec; |
|
481 |
static private final long millisXhour = 60 * millisXminute; |
|
482 |
static private final long millisXday = 24 * millisXhour; |
|
483 |
static private final long millisXmonth = 30 * millisXday; |
|
484 |
// according on the Wikipedia (1 year = 365 days 6 hours 9 minutes 9,7 seconds) |
|
485 |
static private final long millisXyear = (365*millisXday) + (6*millisXhour) + (9*millisXminute) + 9700; |
|
486 |
|
|
487 |
static private final String digit = "[0-9]"; |
|
488 |
static private final String nonZeroDigit = "[1-9]"; |
|
489 |
static private final String letter = "[a-zA-Z]"; |
|
490 |
static private final String seconds = "([0-5]"+digit+"((\\.|,)"+digit+digit+")?)"; |
|
491 |
static private final String minutes = "([0-5]"+digit+")"; |
|
492 |
static private final String hours = "(0"+digit+"|1"+digit+"|2[0-3])"; |
|
493 |
static private final String time = hours+":"+minutes+"(:"+seconds+")?"; |
|
494 |
static private final String days = "(0?"+nonZeroDigit+"|1"+digit+"|2"+digit+"|30|31)"; |
|
495 |
static private final String months = "(0?"+nonZeroDigit+"|10|11|12)"; |
|
496 |
static private final String year = "("+digit+digit+")"; |
|
497 |
static private final String century = "("+digit+digit+")"; |
|
498 |
|
|
499 |
private String name; |
|
500 |
private String unit; |
|
501 |
private String unitSymbol; |
|
502 |
private ArrayList valueList; |
|
503 |
private boolean compiled; |
|
504 |
private boolean isGeologic; |
|
505 |
private String expression; |
|
506 |
private int type; |
|
507 |
private byte format = 0; |
|
508 |
static private final String regexDateExtendedForBCE1 = "B?"+century+year+"-"; |
|
509 |
static private final String regexDateExtendedForBCE2 = "B?"+century+year+"-"+months; |
|
510 |
static private final String regexDateExtendedForBCE3 = "B?"+century+year+"-"+months+"-"+days; |
|
511 |
static private final String regexDateExtendedForBCE4 = "B?"+century+year+"-"+months+"-"+days+"(T| )"+time+"Z"; |
|
512 |
// Note: in WMS 1.1.0 the suffix Z is optional |
|
513 |
// TODO truncated values not yet allowed |
|
514 |
|
|
515 |
static private final String regexDateExtendedForBCE = |
|
516 |
"(" + regexDateExtendedForBCE1 + "|" |
|
517 |
+ regexDateExtendedForBCE2 + "|" |
|
518 |
+ regexDateExtendedForBCE3 + "|" |
|
519 |
+ regexDateExtendedForBCE4 + ")"; |
|
520 |
|
|
521 |
public String getName() { |
|
522 |
return name; |
|
523 |
} |
|
524 |
|
|
525 |
public String getUnit() { |
|
526 |
return unit; |
|
527 |
} |
|
528 |
|
|
529 |
public String getUnitSymbol() { |
|
530 |
return unitSymbol; |
|
531 |
} |
|
532 |
|
|
533 |
public String getLowLimit() { |
|
534 |
return (String) valueList.get(0); |
|
535 |
} |
|
536 |
|
|
537 |
public String getHighLimit() { |
|
538 |
return (String) valueList.get(valueList.size()-1); |
|
539 |
} |
|
540 |
|
|
541 |
|
|
542 |
public String getResolution() { |
|
543 |
return null; |
|
544 |
} |
|
545 |
|
|
546 |
public boolean isValidValue(String value) { |
|
547 |
// TODO Auto-generated method stub |
|
548 |
return false; |
|
549 |
} |
|
550 |
|
|
551 |
public Object valueOf(String value) throws IllegalArgumentException { |
|
552 |
if (compiled) { |
|
553 |
// TODO Missing geological dates |
|
554 |
String myValue = value.toUpperCase(); |
|
555 |
if (isValidValue(myValue)) { |
|
556 |
Object val = null; |
|
557 |
if (!isGeologic){ |
|
558 |
// This is a normal date |
|
559 |
int myYear; |
|
560 |
int myMonth; |
|
561 |
int myDay; |
|
562 |
int myHour; |
|
563 |
int myMinute; |
|
564 |
float mySecond; |
|
565 |
String[] s = myValue.split("-"); |
|
566 |
myYear = (s[0].charAt(0)=='B') ? -Integer.parseInt(s[0].substring(1, 5)) : Integer.parseInt(s[0].substring(0, 4)); |
|
567 |
myMonth = (s.length>1) ? Integer.parseInt(s[1])-1 : 0; |
|
568 |
if (myValue.matches(regexDateExtendedForBCE4)){ |
|
569 |
if (s[2].endsWith("Z")) |
|
570 |
s[2] = s[2].substring(0,s[2].length()-1); |
|
571 |
s = (s[2].indexOf('T')!=-1) ? s[2].split("T") : s[2].split(" "); |
|
572 |
myDay = Integer.parseInt(s[0]); |
|
573 |
|
|
574 |
// Go with the time |
|
575 |
s = s[1].split(":"); |
|
576 |
myHour = Integer.parseInt(s[0]); |
|
577 |
myMinute = (s.length>1) ? Integer.parseInt(s[1]) : 0; |
|
578 |
mySecond = (s.length>2) ? Float.parseFloat(s[2]) : 0; |
|
579 |
} else { |
|
580 |
myDay = (s.length>2) ? Integer.parseInt(s[2]) : 1; |
|
581 |
|
|
582 |
myHour = 0; |
|
583 |
myMinute = 0; |
|
584 |
mySecond = 0; |
|
585 |
} |
|
586 |
GregorianCalendar cal = new GregorianCalendar(myYear, myMonth, myDay, myHour, myMinute, (int)mySecond); |
|
587 |
val = cal; |
|
588 |
} else{ |
|
589 |
// this is a geological date >:-( |
|
590 |
} |
|
591 |
return val; |
|
592 |
} else throw new IllegalArgumentException(myValue); |
|
593 |
} |
|
594 |
return null; |
|
595 |
} |
|
596 |
|
|
597 |
public String valueAt(int pos) throws ArrayIndexOutOfBoundsException { |
|
598 |
return (String) valueList.get(pos); |
|
599 |
} |
|
600 |
|
|
601 |
public int valueCount() { |
|
602 |
return valueList.size(); |
|
603 |
} |
|
604 |
|
|
605 |
public String getExpression() { |
|
606 |
return expression; |
|
607 |
} |
|
608 |
|
|
609 |
public void setExpression(String expr) { |
|
610 |
this.expression = expr; |
|
611 |
} |
|
612 |
|
|
613 |
public int getType() { |
|
614 |
return type; |
|
615 |
} |
|
616 |
|
|
617 |
public void compile() throws IllegalArgumentException { |
|
618 |
String[] items = expression.split(","); |
|
619 |
for (int i = 0; i < items.length; i++) { |
|
620 |
if (items[i].matches(regexDateExtendedForBCE1)) { |
|
621 |
upgradeFormat(YEAR_FORMAT); |
|
622 |
if (format == 0) |
|
623 |
format = YEAR_FORMAT; |
|
624 |
} |
|
625 |
else if (items[i].matches(regexDateExtendedForBCE2)) { |
|
626 |
if (format >= YEAR_FORMAT) |
|
627 |
format = YEAR_TO_MONTH_FORMAT; |
|
628 |
} |
|
629 |
else if (items[i].matches(regexDateExtendedForBCE3)) { |
|
630 |
if (format >= YEAR_TO_MONTH_FORMAT) |
|
631 |
format = YEAR_TO_DAY_FORMAT; |
|
632 |
} |
|
633 |
else if (items[i].matches(regexDateExtendedForBCE4)) { |
|
634 |
if (format >= YEAR_TO_DAY_FORMAT) |
|
635 |
format = FULL_FORMAT; |
|
636 |
} |
|
637 |
else |
|
638 |
throw new IllegalArgumentException(); |
|
639 |
} |
|
640 |
|
|
641 |
if (expression.matches(regexTimeDimension)){ |
|
642 |
isGeologic = false; |
|
643 |
} else if (expression.matches(regexDateExtendedForBCE)) { |
|
644 |
isGeologic = false; |
|
645 |
} else if (expression.matches(regexDateForGeologicDatasets)){ |
|
646 |
isGeologic = true; |
|
647 |
} else { |
|
648 |
throw new IllegalArgumentException(); |
|
649 |
} |
|
650 |
String separator; |
|
464 | 651 |
|
465 |
|
|
466 |
|
|
652 |
if (expression.indexOf("/")!=-1) { |
|
653 |
separator = "/"; |
|
654 |
type = INTERVAL; |
|
655 |
} else if (expression.indexOf(",")!=-1) { |
|
656 |
separator = ","; |
|
657 |
type = MULTIPLE_VALUE; |
|
658 |
} else { |
|
659 |
separator = ","; |
|
660 |
type = SINGLE_VALUE; |
|
661 |
} |
|
662 |
|
|
663 |
compiled = true; |
|
664 |
String[] s = expression.split(separator); |
|
665 |
minValue = valueOf(s[0]); |
|
666 |
if (type == INTERVAL) { |
|
667 |
maxValue = (s.length>1) ? valueOf(s[1]) : valueOf(s[0]); |
|
668 |
period = (s.length>2 && s[2].matches(regexPeriod)) ? s[2] : null; |
|
669 |
} else if (type == MULTIPLE_VALUE) { |
|
670 |
maxValue = valueOf(s[s.length-1]); |
|
671 |
} else { |
|
672 |
maxValue = valueOf(s[0]); |
|
673 |
} |
|
674 |
} |
|
675 |
|
|
676 |
private void upgradeFormat(byte sFormat) { |
|
677 |
switch (sFormat) { |
|
678 |
case YEAR_FORMAT: |
|
679 |
break; |
|
680 |
case YEAR_TO_MONTH_FORMAT: |
|
681 |
break; |
|
682 |
case YEAR_TO_DAY_FORMAT: |
|
683 |
break; |
|
684 |
case FULL_FORMAT: |
|
685 |
break; |
|
686 |
} |
|
467 | 687 |
} |
468 |
} |
|
688 |
}*/
|
branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/fmap/layers/IFMapWMSDimension.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.4 2006-02-10 13:22:35 jaume |
|
46 |
* Revision 1.2.2.5 2006-02-23 10:36:30 jaume |
|
47 |
* *** empty log message *** |
|
48 |
* |
|
49 |
* Revision 1.2.2.4 2006/02/10 13:22:35 jaume |
|
47 | 50 |
* now analyzes dimensions on demand |
48 | 51 |
* |
49 | 52 |
* Revision 1.2.2.3 2006/01/31 16:25:24 jaume |
... | ... | |
138 | 141 |
* means the step lenght between two consecutive points along the |
139 | 142 |
* dimension's axis. |
140 | 143 |
* @return String containing the coded value, or null if no value for resolution. |
144 |
* @deprecated |
|
141 | 145 |
*/ |
142 | 146 |
public String getResolution(); |
143 | 147 |
|
branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/gui/beans/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); |
branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/gui/panels/DimensionPanel.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 |
* |
... | ... | |
143 | 143 |
private Pager getJPanel() { |
144 | 144 |
if (pager == null) { |
145 | 145 |
pager = new Pager(Pager.HORIZONTAL); |
146 |
pager.setBounds(5, 20, 190, 50);
|
|
146 |
pager.setBounds(5, 20, 240, 50);
|
|
147 | 147 |
pager.addListener(new BeanListener() { |
148 | 148 |
public void beanValueChanged(Object value) { |
149 | 149 |
currentSelectedValue = ((Integer) value).intValue(); |
... | ... | |
164 | 164 |
if (valueEditionPanel == null) { |
165 | 165 |
ButtonGroup group = new ButtonGroup(); |
166 | 166 |
lblValueText = new JLabel(); |
167 |
lblValueText.setBounds(54, 4, 140, 20);
|
|
167 |
lblValueText.setBounds(54, 4, 190, 20);
|
|
168 | 168 |
lblValueText.setText(""); |
169 | 169 |
lblValue = new JLabel(); |
170 | 170 |
lblValue.setBounds(7, 4, 45, 20); |
... | ... | |
173 | 173 |
java.awt.Font.BOLD, 11)); |
174 | 174 |
valueEditionPanel = new JPanel(); |
175 | 175 |
valueEditionPanel.setLayout(null); |
176 |
valueEditionPanel.setBounds(256, 12, 195, 200);
|
|
176 |
valueEditionPanel.setBounds(206, 12, 245, 200);
|
|
177 | 177 |
valueEditionPanel.add(getRdBtnSingleValue(), null); |
178 | 178 |
valueEditionPanel.add(getRdBtnMultipleValue(), null); |
179 | 179 |
valueEditionPanel.add(getRdBtnInterval(), null); |
... | ... | |
199 | 199 |
private JRadioButton getRdBtnSingleValue() { |
200 | 200 |
if (rdBtnSingle == null) { |
201 | 201 |
rdBtnSingle = new JRadioButton(); |
202 |
rdBtnSingle.setBounds(7, 70, 128, 20);
|
|
202 |
rdBtnSingle.setBounds(7, 70, 180, 20);
|
|
203 | 203 |
rdBtnSingle.addActionListener(new java.awt.event.ActionListener() { |
204 | 204 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
205 | 205 |
mode = SINGLE_VALUE; |
... | ... | |
219 | 219 |
private JRadioButton getRdBtnMultipleValue() { |
220 | 220 |
if (rdBtnMultiple == null) { |
221 | 221 |
rdBtnMultiple = new JRadioButton(); |
222 |
rdBtnMultiple.setBounds(7, 89, 130, 20);
|
|
222 |
rdBtnMultiple.setBounds(7, 89, 180, 20);
|
|
223 | 223 |
rdBtnMultiple |
224 | 224 |
.addActionListener(new java.awt.event.ActionListener() { |
225 | 225 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
... | ... | |
241 | 241 |
private JRadioButton getRdBtnInterval() { |
242 | 242 |
if (rdBtnInterval == null) { |
243 | 243 |
rdBtnInterval = new JRadioButton(); |
244 |
rdBtnInterval.setBounds(7, 108, 130, 20);
|
|
244 |
rdBtnInterval.setBounds(7, 108, 180, 20);
|
|
245 | 245 |
rdBtnInterval |
246 | 246 |
.addActionListener(new java.awt.event.ActionListener() { |
247 | 247 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
... | ... | |
262 | 262 |
private JButton getBtnAdd() { |
263 | 263 |
if (btnAdd == null) { |
264 | 264 |
btnAdd = new JButton(); |
265 |
btnAdd.setBounds(7, 127, 90, 23);
|
|
265 |
btnAdd.setBounds(7, 130, 110, 20);
|
|
266 | 266 |
btnAdd.addActionListener(new java.awt.event.ActionListener() { |
267 | 267 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
268 | 268 |
execute("add"); |
... | ... | |
419 | 419 |
private JTextField getTxt() { |
420 | 420 |
if (txt == null) { |
421 | 421 |
txt = new JTextField(); |
422 |
txt.setBounds(8, 152, 180, 22);
|
|
422 |
txt.setBounds(7, 153, 234, 22);
|
|
423 | 423 |
txt.addKeyListener(new java.awt.event.KeyAdapter() { |
424 | 424 |
public void keyTyped(java.awt.event.KeyEvent e) { |
425 | 425 |
userEdits = true; |
... | ... | |
437 | 437 |
private JScrollPane getScrlDimension() { |
438 | 438 |
if (scrlDimension == null) { |
439 | 439 |
scrlDimension = new JScrollPane(); |
440 |
scrlDimension.setBounds(5, 17, 250, 196);
|
|
440 |
scrlDimension.setBounds(5, 17, 200, 196);
|
|
441 | 441 |
scrlDimension.setViewportView(getLstDimensions()); |
442 | 442 |
} |
443 | 443 |
return scrlDimension; |
... | ... | |
505 | 505 |
} |
506 | 506 |
} |
507 | 507 |
pager.setItemCount(currentDimension.valueCount()); |
508 |
pager.setValue(0, false);
|
|
508 |
pager.setValue(0, true);
|
|
509 | 509 |
} |
510 | 510 |
|
511 | 511 |
/** |
... | ... | |
592 | 592 |
private JButton getBtnSet() { |
593 | 593 |
if (btnSet == null) { |
594 | 594 |
btnSet = new JButton(); |
595 |
btnSet.setBounds(7, 177, 90, 23);
|
|
595 |
btnSet.setBounds(7, 178, 110, 20);
|
|
596 | 596 |
btnSet.setText(PluginServices.getText(this, "set")); |
597 | 597 |
btnSet.addActionListener(new java.awt.event.ActionListener() { |
598 | 598 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
... | ... | |
611 | 611 |
private JButton getBtnClear() { |
612 | 612 |
if (btnClear == null) { |
613 | 613 |
btnClear = new JButton(); |
614 |
btnClear.setBounds(97, 127, 90, 23);
|
|
614 |
btnClear.setBounds(131, 130, 110, 20);
|
|
615 | 615 |
btnClear.setText(PluginServices.getText(this, "clear")); |
616 | 616 |
btnClear.addActionListener(new java.awt.event.ActionListener() { |
617 | 617 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
... | ... | |
664 | 664 |
String separator = (val.getMode() == MULTIPLE_VALUE) ? "," : "/"; |
665 | 665 |
Integer[] indexes = val.getIndexes(); |
666 | 666 |
for (int j = 0; j < indexes.length; j++) { |
667 |
// values += ((IFMapWMSDimension) key).valueAt(indexes[j] |
|
668 |
// .intValue()); |
|
669 | 667 |
values += val.getOwner().valueAt(indexes[j].intValue()); |
670 | 668 |
if (j < indexes.length - 1) |
671 | 669 |
values += separator; |
672 | 670 |
} |
673 |
// v.add(((IFMapWMSDimension) key).getName() + "=" + values); |
|
674 | 671 |
v.add((String)key + "=" + values); |
675 | 672 |
} |
676 | 673 |
i++; |
Also available in: Unified diff