no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@104 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Luis Flores 22 years ago
parent ba16481b44
commit be6517efc4

@ -20,6 +20,7 @@ public class DataChooserWindow extends CustomJDialog
{ {
private final String labels[]; private final String labels[];
private final String items[]; private final String items[];
private final String empty[];
private final String allItems[][]; private final String allItems[][];
private final JComboBox combos[]; private final JComboBox combos[];
private final int preselected[]; private final int preselected[];
@ -37,6 +38,11 @@ public class DataChooserWindow extends CustomJDialog
super( modalFrame, true ); super( modalFrame, true );
labels = names; labels = names;
items = data[ 0 ]; items = data[ 0 ];
empty = new String[ items.length ];
for( int i = 0; i < empty.length; ++i )
{
empty[ i ] = "";
}
allItems = data; allItems = data;
combos = new JComboBox[ labels.length ]; combos = new JComboBox[ labels.length ];
preselected = selected; preselected = selected;
@ -144,13 +150,26 @@ public class DataChooserWindow extends CustomJDialog
Hashtable hash = new Hashtable(); Hashtable hash = new Hashtable();
for( int i = 0; i < labels.length; ++i ) for( int i = 0; i < labels.length; ++i )
{ {
String sel = combos[ i ].getSelectedItem().toString();
if( multiple ) if( multiple )
{ {
hash.put( labels[ i ], allItems[ combos[ i ].getSelectedIndex() ] ); if( sel.length() > 0 )
{
String col[] = new String[ allItems.length ];
for( int j = 0; j < allItems.length; ++j )
{
col[ j ] = allItems[ j ][ combos[ i ].getSelectedIndex() ];
}
hash.put( labels[ i ], col );
}
else
{
hash.put( labels[ i ], empty );
}
} }
else else
{ {
hash.put( labels[ i ], combos[ i ].getSelectedItem() ); hash.put( labels[ i ], sel );
} }
} }
return hash; return hash;

@ -44,7 +44,7 @@ public class Importer extends CustomJDialog
private String vals[][]; private String vals[][];
private final int[] DEFAULT_SELECTION = new int[]{ 0, 2, 3, 1, -1, 4, 5, 7, 6, -1 }; private final int[] DEFAULT_SELECTION = new int[]{ 0, 2, 3, 1, -1, 4, 5, 7, 6, -1 };
public final String NAMES[] = new String[]{ public static final String NAMES[] = new String[]{
NOME, NOME,
SEXO, SEXO,
NACIONALIDADE, NACIONALIDADE,

Loading…
Cancel
Save