1 32 33 package com.nqadmin.swingSet; 34 35 import java.awt.*; 36 import java.awt.event.*; 37 import javax.swing.*; 38 import javax.swing.event.*; 39 import javax.swing.table.*; 40 import javax.swing.border.LineBorder ; 41 import java.sql.SQLException ; 42 import java.sql.Date ; 43 import java.util.GregorianCalendar ; 44 import java.util.Calendar ; 45 import java.util.StringTokenizer ; 46 import java.util.EventObject ; 47 import java.util.Vector ; 48 import com.nqadmin.swingSet.datasources.SSRowSet; 49 50 135 136 public class SSDataGrid extends JTable { 137 138 141 protected Component messageWindow = null; 142 143 146 protected SSRowSet sSRowSet = null; 147 148 151 protected int columnCount = -1; 152 153 156 protected int rowCount = -1; 157 158 161 protected int columnWidth = 100; 162 163 166 protected SSTableModel tableModel = new SSTableModel(); 167 168 171 protected JScrollPane scrollPane = null; 173 176 protected int[] hiddenColumns = null; 177 178 181 protected String [] hiddenColumnNames = null; 182 183 186 protected boolean callExecute = true; 187 188 192 protected boolean insertion = true; 193 194 199 public SSDataGrid(SSRowSet _sSRowSet) { 200 sSRowSet = _sSRowSet; 201 init(); 202 bind(); 203 } 204 205 208 public SSDataGrid() { 209 init(); 210 } 211 212 217 public void setColumnWidth(int _columnWidth) { 218 int oldValue = columnWidth; 219 columnWidth = _columnWidth; 220 firePropertyChange("columnWidth", oldValue, columnWidth); 221 } 222 223 228 public int getColumnWidth() { 229 return columnWidth; 230 } 231 232 238 public void setMessageWindow(Component _messageWindow) { 239 Component oldValue = messageWindow; 240 messageWindow = _messageWindow; 241 firePropertyChange("messageWindow", oldValue, messageWindow); 242 tableModel.setMessageWindow(messageWindow); 243 } 244 245 251 public Component getMessageWindow() { 252 return messageWindow; 253 } 254 255 262 public void setCallExecute(boolean _callExecute) { 263 boolean oldValue = callExecute; 264 callExecute = _callExecute; 265 firePropertyChange("callExecute", oldValue, callExecute); 266 } 267 268 275 public boolean getCallExecute() { 276 return callExecute; 277 } 278 279 285 public void setInsertion(boolean _insertion) { 286 boolean oldValue = insertion; 287 insertion = _insertion; 288 firePropertyChange("insertion", oldValue, insertion); 289 tableModel.setInsertion(_insertion); 290 updateUI(); 291 } 292 293 299 public boolean getInsertion() { 300 return insertion; 301 } 302 303 312 public int[] getSelectedColumns() { 317 if (hiddenColumns == null) { 319 return super.getSelectedColumns(); 320 } 321 322 int[] selectedColumns = super.getSelectedColumns(); 324 Vector filteredColumns = new Vector (); 325 326 for (int i=0; i<selectedColumns.length; i++) { 328 boolean found = false; 329 for (int j=0; j<hiddenColumns.length; j++) { 331 if (selectedColumns[i] == hiddenColumns[j]) { 333 found = true; 334 break; 335 } 336 } 337 if (!found) { 339 filteredColumns.add(new Integer (selectedColumns[i])); 340 } 341 } 342 343 int[] result = new int[filteredColumns.size()]; 345 for (int i=0; i<filteredColumns.size(); i++) { 346 result[i] = ((Integer )filteredColumns.elementAt(i)).intValue(); 347 } 348 349 return result; 350 } 351 352 359 public int getSelectedColumnCount() { 360 int[] selectedColumns = this.getSelectedColumns(); 361 if (selectedColumns == null) { 362 return 0; 363 } 364 365 return selectedColumns.length; 366 } 367 368 374 public void setSSRowSet(SSRowSet _sSRowSet) { 375 SSRowSet oldValue = sSRowSet; 376 sSRowSet = _sSRowSet; 377 firePropertyChange("sSRowSet", oldValue, sSRowSet); 378 bind(); 379 } 381 386 public SSRowSet getSSRowSet() { 387 return sSRowSet; 388 } 389 390 397 public Component getComponent(){ 398 return scrollPane; 399 } 400 401 414 public void setDefaultValues(int[] _columnNumbers, Object [] _values) { 415 tableModel.setDefaultValues(_columnNumbers,_values); 419 } 420 421 436 public void setDefaultValues(String [] _columnNames, Object [] _values) throws SQLException { 437 438 int[] columnNumbers = null; 439 440 444 if ( _columnNames != null) { 445 columnNumbers = new int[_columnNames.length]; 446 447 for (int i=0; i< _columnNames.length;i++) { 448 columnNumbers[i] = sSRowSet.getColumnIndex(_columnNames[i]) -1 ; 449 } 450 } 451 452 tableModel.setDefaultValues(columnNumbers, _values); 453 } 454 455 465 public Object getDefaultValue(int _columnNumber) { 466 return tableModel.getDefaultValue(_columnNumber); 467 } 468 469 481 public Object getDefaultValue(String _columnName) throws SQLException { 482 int columnNumber = sSRowSet.getColumnIndex(_columnName); 483 return tableModel.getDefaultValue(columnNumber -1); 484 } 485 486 496 public void setPrimaryColumn(int _columnNumber) { 497 tableModel.setPrimaryColumn(_columnNumber); 498 } 499 500 510 public void setPrimaryColumn(String _columnName) throws SQLException { 511 int columnNumber = sSRowSet.getColumnIndex(_columnName) -1; 512 tableModel.setPrimaryColumn(columnNumber); 513 } 514 515 523 public void setSSDataValue(SSDataValue _dataValue) { 524 tableModel.setSSDataValue(_dataValue); 525 } 526 527 536 public void setDateRenderer(int _column) { 537 TableColumnModel columnModel = getColumnModel(); 538 TableColumn tableColumn = columnModel.getColumn(_column); 539 tableColumn.setCellRenderer(new DateRenderer()); 540 tableColumn.setCellEditor(new DateEditor()); 541 } 542 543 552 public void setDateRenderer(String _column) throws SQLException { 553 int column = sSRowSet.getColumnIndex(_column) -1; 554 TableColumnModel columnModel = getColumnModel(); 555 TableColumn tableColumn = columnModel.getColumn(column); 556 tableColumn.setCellRenderer(new DateRenderer()); 557 tableColumn.setCellEditor(new DateEditor()); 558 } 559 560 572 public void setComboRenderer(int _column, Object [] _displayItems, Object [] _underlyingValues) { 573 setComboRenderer(_column, _displayItems, _underlyingValues, 250); 574 } 575 576 588 public void setComboRenderer(int _column, Object [] _displayItems, Object [] _underlyingValues, int _columnWidth) { 589 setRowHeight(20); 590 TableColumnModel columnModel = getColumnModel(); 591 TableColumn tableColumn = columnModel.getColumn(_column); 592 tableColumn.setCellRenderer(new ComboRenderer(_displayItems, _underlyingValues)); 593 tableColumn.setCellEditor(new ComboEditor(_displayItems, _underlyingValues)); 594 tableColumn.setMinWidth(_columnWidth); 595 } 596 597 609 public void setComboRenderer(String _column, Object [] _displayItems, Object [] _underlyingValues) throws SQLException { 610 setComboRenderer(_column, _displayItems, _underlyingValues, 250); 611 } 612 613 626 public void setComboRenderer(String _column, Object [] _displayItems, Object [] _underlyingValues, int _columnWidth) throws SQLException { 627 int column = sSRowSet.getColumnIndex(_column)-1; 628 setComboRenderer(column, _displayItems, _underlyingValues, _columnWidth); 629 } 630 631 638 public void setCheckBoxRenderer(String _column) throws SQLException { 639 int column = sSRowSet.getColumnIndex(_column) - 1; 640 setCheckBoxRenderer(column); 641 } 642 643 650 public void setCheckBoxRenderer(int _column) throws SQLException { 651 TableColumnModel columnModel = getColumnModel(); 652 TableColumn tableColumn = columnModel.getColumn(_column); 653 tableColumn.setCellRenderer(new CheckBoxRenderer()); 654 tableColumn.setCellEditor(new CheckBoxEditor()); 655 } 656 657 665 public void setHeaders(String [] _headers) { 666 tableModel.setHeaders(_headers); 667 } 668 669 679 public void setUneditableColumns(int[] _columnNumbers) { 680 tableModel.setUneditableColumns(_columnNumbers); 681 } 682 683 693 public void setUneditableColumns(String [] _columnNames) throws SQLException { 694 int[] columnNumbers = null; 695 if (_columnNames != null) { 696 columnNumbers = new int[_columnNames.length]; 697 698 for (int i=0;i<_columnNames.length;i++) { 699 columnNumbers[i] = sSRowSet.getColumnIndex(_columnNames[i]) -1; 700 } 701 } 702 703 tableModel.setUneditableColumns(columnNumbers); 704 } 705 706 721 public void setHiddenColumns(int[] _columnNumbers) { 722 hiddenColumns = _columnNumbers; 723 tableModel.setHiddenColumns(_columnNumbers); 724 hideColumns(); 725 } 726 727 742 public void setHiddenColumns(String [] _columnNames) throws SQLException { 743 hiddenColumns = null; 744 tableModel.setHiddenColumns(hiddenColumns); 745 if (_columnNames != null) { 746 hiddenColumns = new int[_columnNames.length]; 747 for(int i=0; i<_columnNames.length; i++) { 748 hiddenColumns[i] = sSRowSet.getColumnIndex(_columnNames[i]) -1; 749 } 750 } 751 hideColumns(); 752 } 753 754 762 public void setSSCellEditing(SSCellEditing _cellEditing) { 763 tableModel.setSSCellEditing( _cellEditing ); 764 } 765 766 769 class DefaultEditor extends DefaultCellEditor{ 770 773 Object value; 774 775 778 java.lang.reflect.Constructor constructor; 779 780 781 784 public DefaultEditor() { 785 super(new SSTextField()); 786 MyListener listener = new MyListener(); 787 getComponent().addFocusListener(listener); 788 getComponent().addKeyListener(listener); 789 } 790 791 794 private class MyListener implements KeyListener, FocusListener{ 795 796 int keyPressed = 0; 797 boolean hasFocus = false; 798 799 805 public void keyPressed(KeyEvent ke){ 806 if(ke.getKeyCode() != KeyEvent.VK_TAB) 807 keyPressed++; 808 } 809 810 813 public void keyReleased(KeyEvent ke){ 814 JComponent editor = (JComponent)DefaultEditor.this.getComponent(); 815 if(editor instanceof JTextField){ 816 if(keyPressed == 0 && Character.isLetterOrDigit(ke.getKeyChar())){ 817 ((JTextField)editor).setText(String.valueOf(ke.getKeyChar())); 818 } 819 } 820 keyPressed--; 821 if(keyPressed < 0) 822 keyPressed = 0; 823 824 } 825 826 public void keyTyped(KeyEvent ke){ 827 } 828 829 832 public void focusGained(FocusEvent fe){ 833 ((SSTextField)getComponent()).selectAll(); 834 hasFocus = true; 835 } 836 837 840 public void focusLost(FocusEvent fe){ 841 hasFocus = false; 843 keyPressed = 0; 844 } 845 } 846 847 public boolean stopCellEditing() { 848 String s = (String )super.getCellEditorValue(); 849 850 if (s.trim().equals("")){ 851 if (constructor.getDeclaringClass() == String .class) { 852 value = s; 853 } 854 super.stopCellEditing(); 855 } 856 857 try { 858 value = constructor.newInstance(new Object []{s}); 859 }catch (Exception e) { 860 ((JComponent)getComponent()).setBorder(new LineBorder (Color.red)); 863 return false; 864 } 865 866 return super.stopCellEditing(); 867 } 868 869 public Component getTableCellEditorComponent(JTable table, Object value, 870 boolean isSelected, int row, int column) { 871 this.value = null; 873 874 ((JComponent)getComponent()).setBorder(new LineBorder (Color.black)); 875 876 try { 879 Class type = table.getColumnClass(column); 880 if (type == Object .class) { 881 type = String .class; 882 } 883 constructor = type.getConstructor(new Class []{String .class}); 884 }catch (Exception e) { 885 return null; 886 } 887 888 return super.getTableCellEditorComponent(table, value, isSelected, row, column); 889 } 890 891 894 public Object getCellEditorValue() { 895 return value; 896 } 897 898 } 899 900 901 904 protected void init() { 905 906 setSurrendersFocusOnKeystroke(true); 908 setDefaultEditor(Number .class, new DefaultEditor()); 909 setDefaultEditor(String .class, new DefaultEditor()); 910 setDefaultEditor(Object .class, new DefaultEditor()); 911 912 this.addKeyListener(new KeyAdapter() { 917 private boolean controlPressed = false; 918 919 public void keyPressed(KeyEvent ke) { 921 if (ke.getKeyCode() == KeyEvent.VK_CONTROL) { 922 controlPressed = true; 923 } 924 } 925 926 public void keyReleased(KeyEvent ke) { 928 if (ke.getKeyCode() == KeyEvent.VK_CONTROL) { 930 controlPressed = false; 931 } 932 if (ke.getKeyCode() == KeyEvent.VK_X) { 935 if (! controlPressed) { 936 return; 937 } 938 int numRows = getSelectedRowCount(); 940 if (numRows == 0) { 941 return; 942 } 943 int[] rows = getSelectedRows(); 945 if (messageWindow != null) { 948 int returnValue = JOptionPane.showConfirmDialog(messageWindow,"You are about to delete " + rows.length + " rows. " + 949 "\nAre you sure you want to delete the rows?"); 950 if (returnValue != JOptionPane.YES_OPTION) { 951 return; 952 } 953 } 954 for (int i=rows.length -1;i>=0;i--) { 961 tableModel.deleteRow(rows[i]); 962 } 963 updateUI(); 964 } 965 } 966 }); 967 968 SSTableKeyAdapter keyAdapter = new SSTableKeyAdapter(this); 971 keyAdapter.setAllowInsertion(true); 972 973 976 tableModel.setMessageWindow(messageWindow); 979 tableModel.setJTable(this); 980 981 this.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); 983 984 scrollPane = new JScrollPane(this,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED ); 986 987 } 989 993 protected void bind() { 994 995 try { 996 if (callExecute) { 998 sSRowSet.execute(); 999 } 1000 1001 tableModel.setSSRowSet(sSRowSet); 1006 1008 this.setModel(tableModel); 1010 1011 rowCount = tableModel.getRowCount(); 1013 1014 columnCount = tableModel.getColumnCount(); 1016 1017 } catch(SQLException se) { 1018 se.printStackTrace(); 1019 } 1020 1021 createDefaultColumnModel(); 1024 1025 hideColumns(); 1027 1028 1031 } 1033 1036 protected void hideColumns(){ 1037 TableColumnModel columnModel = this.getColumnModel(); 1039 TableColumn column; 1040 for (int i=columnModel.getColumnCount()-1;i>=0;i--) { 1041 column = columnModel.getColumn(i); 1042 int j = -1; 1043 1044 if (hiddenColumns != null) { 1045 for (j=0; j<hiddenColumns.length;j++) { 1047 if (hiddenColumns[j] == i) { 1048 column.setMaxWidth(0); 1049 column.setMinWidth(0); 1050 column.setPreferredWidth(0); 1051 break; 1052 } 1053 } 1054 if (j == hiddenColumns.length) { 1055 column.setMinWidth(columnWidth); 1056 } 1057 } else { 1058 column.setMinWidth(columnWidth); 1060 } 1061 } 1062 updateUI(); 1063 } 1064 1065 1069 protected class DateEditor extends DefaultCellEditor { 1070 1071 public DateEditor(){ 1073 super(new SSTextField(SSTextField.MMDDYYYY)); 1074 getComponent().addKeyListener(new KeyAdapter(){ 1075 int keyPressed = 0; 1076 public void keyPressed(KeyEvent ke){ 1077 if(ke.getKeyCode() != KeyEvent.VK_TAB) 1078 keyPressed++; 1079 System.out.println("Key Pressed true"); 1080 } 1081 public void keyReleased(KeyEvent ke){ 1082 System.out.println("Key Released number editor"); 1083 JComponent editor = (JComponent)DateEditor.this.getComponent(); 1084 if(editor instanceof JTextField){ 1085 System.out.println("Instance of JTextField"); 1086 if(keyPressed == 0){ 1087 ((JTextField)editor).setText(String.valueOf(ke.getKeyChar())); 1088 } 1089 } 1090 System.out.println("Key Pressed is false"); 1091 keyPressed--; 1092 if(keyPressed < 0) 1093 keyPressed = 0; 1094 } 1095 }); 1096 } 1097 1098 public synchronized Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { 1101 1102 if (value instanceof Date ) { 1103 Date date = (Date )value; 1104 GregorianCalendar calendar = new GregorianCalendar (); 1105 calendar.setTime(date); 1106 String strDate = "" + (calendar.get(Calendar.MONTH) + 1) + "/" + 1107 calendar.get(Calendar.DAY_OF_MONTH) + "/" + calendar.get(Calendar.YEAR); 1108 return super.getTableCellEditorComponent(table, strDate, isSelected, row, column); 1109 } 1110 1111 return super.getTableCellEditorComponent(table, value, isSelected, row, column); 1112 1113 } 1114 1115 public Object getCellEditorValue(){ 1117 String strDate = ((JTextField)(DateEditor.this.getComponent())).getText(); 1118 StringTokenizer strtok = new StringTokenizer (strDate, "/", false); 1119 Calendar calendar = Calendar.getInstance(); 1120 calendar.set(Calendar.MONTH, Integer.parseInt(strtok.nextToken())-1); 1121 calendar.set(Calendar.DATE, Integer.parseInt(strtok.nextToken())); 1122 calendar.set(Calendar.YEAR, Integer.parseInt(strtok.nextToken())); 1123 return new Date (calendar.getTimeInMillis()); 1124 } 1125 1126 public boolean isCellEditable(EventObject event){ 1127 if (event instanceof MouseEvent) { 1130 return ((MouseEvent)event).getClickCount() >= getClickCountToStart(); 1131 } 1132 1133 return true; 1134 } 1135 } 1136 1137 1140 protected class CheckBoxRenderer extends JCheckBox implements TableCellRenderer { 1141 1142 public CheckBoxRenderer(){ 1143 super(); 1144 } 1145 1146 public Component getTableCellRendererComponent(JTable _table, Object _value, 1147 boolean _selected, boolean _hasFocus, int _row, int _column){ 1148 1149 if(_value instanceof Boolean ){ 1150 if(((Boolean )_value).booleanValue()){ 1151 this.setSelected(true); 1152 } 1153 else{ 1154 this.setSelected(false); 1155 } 1156 } 1157 else if(_value instanceof Integer ){ 1158 if( ((Integer )_value).intValue() != 0){ 1159 this.setSelected(true); 1160 } 1161 else{ 1162 this.setSelected(false); 1163 } 1164 } 1165 else{ 1166 System.out.println("Can't set check box value. Unknown data type."); 1167 System.out.println("Column type should be Boolean or Integer for check box columns."); 1168 } 1169 1170 return this; 1171 } 1172 1173 } 1174 1175 1178 protected class CheckBoxEditor extends DefaultCellEditor { 1179 protected int columnClass = 0; 1181 1182 public CheckBoxEditor(){ 1183 super(new JCheckBox()); 1184 } 1185 1186 public Component getTableCellEditorComponent(JTable _table, Object _value, 1187 boolean _selected, int _row, int _column) { 1188 1189 JCheckBox checkBox = (JCheckBox)getComponent(); 1191 1192 if(_value instanceof Boolean ){ 1194 columnClass = java.sql.Types.BOOLEAN; 1197 if(((Boolean )_value).booleanValue()){ 1199 checkBox.setSelected(true); 1200 } 1201 else{ 1202 checkBox.setSelected(false); 1203 } 1204 } 1205 else if(_value instanceof Integer ){ 1207 columnClass = java.sql.Types.INTEGER; 1209 if( ((Integer )_value).intValue() != 0){ 1213 checkBox.setSelected(true); 1214 } 1215 else{ 1216 checkBox.setSelected(false); 1217 } 1218 } 1219 else{ 1222 System.out.println("Can't set check box value. Unknown data type."); 1223 System.out.println("Column type should be Boolean or Integer for check box columns."); 1224 } 1225 return checkBox; 1227 } 1228 1229 public Object getCellEditorValue() { 1230 if(((JCheckBox)getComponent()).isSelected()){ 1232 if(columnClass == java.sql.Types.BOOLEAN){ 1235 return new Boolean (true); 1236 } 1237 else{ 1238 return new Integer (1); 1239 } 1240 } 1241 else{ 1242 if(columnClass == java.sql.Types.BOOLEAN){ 1243 return new Boolean (false); 1244 } 1245 else{ 1246 return new Integer (0); 1247 } 1248 } 1249 } 1250 } 1251 1252 1255 protected class DateRenderer extends DefaultTableCellRenderer { 1256 1257 public void setValue(Object value) { 1258 if (value instanceof java.sql.Date ) { 1259 Date date = (Date )value; 1260 GregorianCalendar calendar = new GregorianCalendar (); 1261 calendar.setTime(date); 1262 String strDate = "" + (calendar.get(Calendar.MONTH)+1) + "/" + 1263 calendar.get(Calendar.DAY_OF_MONTH) + "/" + calendar.get(Calendar.YEAR); 1264 setHorizontalAlignment(SwingConstants.CENTER); 1265 setText(strDate); 1266 } else { 1267 super.setValue(value); 1268 } 1269 } 1270 } 1271 1272 1275 protected class ComboRenderer extends DefaultTableCellRenderer.UIResource { 1277 Object [] underlyingValues = null; 1278 Object [] displayValues = null; 1280 1281 public ComboRenderer(Object [] _items, Object [] _underlyingValues) { 1282 underlyingValues = _underlyingValues; 1284 displayValues = _items; 1285 } 1286 1287 public Component getTableCellRendererComponent(JTable _table, Object _value, 1288 boolean _selected, boolean _hasFocus, int _row, int _column){ 1289 1290 JLabel label = (JLabel)super.getTableCellRendererComponent(_table, _value, _selected, _hasFocus, _row, _column); 1291 1292 int index = -1; 1293 if (displayValues.length > 0) { 1294 index = getIndexOf(_value); 1296 } else { 1297 System.out.println("Combo Renderer: No item in combo that corresponds to " + _value ); 1298 } 1299 1301 if (index == -1) { 1302 label.setText(""); 1303 } else { 1304 label.setText(displayValues[index].toString()); 1305 } 1306 return label; 1307 } 1308 1309 protected int getIndexOf(Object _value) { 1310 if (_value == null) { 1311 return -1; 1312 } 1313 if (underlyingValues == null) { 1314 return ((Integer )_value).intValue(); 1315 } 1316 for (int i=0;i<underlyingValues.length;i++) { 1317 if (underlyingValues[i].equals(_value)) { 1318 return i; 1319 } 1320 } 1321 return 0; 1322 } 1323 } 1324 1325 1328 protected class ComboEditor extends DefaultCellEditor { 1329 Object [] underlyingValues = null; 1330 int clickCountToStart = 2; 1332 1334 public ComboEditor(Object [] _items, Object [] _underlyingValues) { 1335 super(new JComboBox(_items)); 1336 underlyingValues = _underlyingValues; 1337 } 1338 1339 public boolean isCellEditable(EventObject event) { 1340 if (event instanceof MouseEvent) { 1341 return ((MouseEvent)event).getClickCount() >= clickCountToStart; 1342 } 1343 return true; 1344 } 1345 1346 public Component getTableCellEditorComponent(JTable _table, Object _value, 1347 boolean _selected, int _row, int _column) { 1348 1349 JComboBox comboBox = (JComboBox)getComponent(); 1350 comboBox.setSelectedIndex(getIndexOf(_value)); 1351 return comboBox; 1352 } 1353 1354 public Object getCellEditorValue() { 1355 if (underlyingValues == null) { 1356 return new Integer ( ((JComboBox)getComponent()).getSelectedIndex()); 1357 } 1358 1359 int index = ((JComboBox)getComponent()).getSelectedIndex(); 1360 if (index == -1) { 1362 return underlyingValues[0]; 1363 } 1364 1365 return underlyingValues[index]; 1366 } 1367 1368 protected int getIndexOf(Object _value) { 1369 if (underlyingValues == null) { 1370 return ((Integer )_value).intValue(); 1371 } 1372 for (int i=0;i<underlyingValues.length;i++) { 1373 if (underlyingValues[i].equals(_value)) { 1374 return i; 1375 } 1376 } 1377 1378 return -1; 1379 } 1380 } 1381 1382 1383 1384 1386 1394 public void setRowSet(SSRowSet _sSRowSet) { 1395 setSSRowSet(_sSRowSet); 1396 } 1397 1398} 1400 1401 1402 | Popular Tags |