Revision 6577 trunk/libraries/libUI/src/org/gvsig/gui/beans/comboBoxItemsSeeker/ComboBoxItemsSeekerDynamicModel.java
ComboBoxItemsSeekerDynamicModel.java | ||
---|---|---|
61 | 61 |
public class ComboBoxItemsSeekerDynamicModel extends DefaultComboBoxModel implements java.io.Serializable { |
62 | 62 |
// INNER MODEL STRUCTURES |
63 | 63 |
private Set itemsShowed; |
64 |
private Object itemsShowedSortedOrDisordered[]; |
|
64 |
private Object itemsShowedSortedOrDisordered[]; |
|
65 |
private String writtenText; |
|
65 | 66 |
// private String writtenString = ""; |
66 | 67 |
// END INNER MODEL STRUCTURES |
67 | 68 |
|
68 |
// CONFIGURATION FLAGS |
|
69 |
// CONTANTS FOR CONFIGURE THE BEHAVIOR |
|
70 |
public final int ORIGINAL_POSITION_ALL = 0; |
|
71 |
public final int SORTED_ALL = 1; |
|
72 |
public final int DISORDERED_ALL = 2; |
|
73 |
|
|
74 |
public final int ORIGINAL_POSITION_SEARCH = 0; |
|
75 |
public final int SORTED_SEARCH = 1; |
|
76 |
public final int DISORDERED_SEARCH = 2; |
|
77 |
// END CONTANTS FOR CONFIGURE THE BEHAVIOR |
|
78 |
|
|
79 |
// CONFIGURATION FLAGS (Voy a Cambiar algunas!!!!) |
|
69 | 80 |
private boolean maintainPositionItems; |
70 | 81 |
private boolean alphanumericSortedSearches; |
71 | 82 |
private boolean allAlphanumericSorted; |
... | ... | |
127 | 138 |
thisIsAComboBoxItemsSeekerDynamicModelClass = true; |
128 | 139 |
|
129 | 140 |
// this.currentString = ""; |
141 |
this.writtenText = ""; |
|
130 | 142 |
this.setDefaultBehaviorFlagsConfiguration(); |
131 | 143 |
this.allItemsAreSorted = false; |
132 | 144 |
this.allItemsAreDisordered = false; |
... | ... | |
346 | 358 |
public Object getElementAt(int index) { |
347 | 359 |
if (this.showAllItems) |
348 | 360 |
{ |
361 |
|
|
362 |
// Primero considerar el mostrar todos al comienzo |
|
363 |
|
|
364 |
|
|
365 |
|
|
366 |
// Caso de las b?squedas |
|
367 |
|
|
349 | 368 |
// If the items have to be showed in ascending order |
350 | 369 |
if (this.alphanumericSortedSearches) |
351 | 370 |
{ |
... | ... | |
538 | 557 |
// } |
539 | 558 |
|
540 | 559 |
|
541 |
|
|
542 |
public void setWrittenString(String writtenString) { |
|
560 |
/** |
|
561 |
* |
|
562 |
*/ |
|
563 |
public void setWrittenString(String text) { |
|
543 | 564 |
// System.out.println("Entrada: " + writtenString); |
565 |
writtenText = text; |
|
544 | 566 |
|
545 | 567 |
if ((!this.maintainPositionItems) && (!this.alphanumericSortedSearches)) |
546 | 568 |
this.disorderItemsCopy(); |
Also available in: Unified diff