/// <summary> /// Searches through the worksheet for a value, starting at the given row. /// If the value is found, the row is selected. </summary> /// <param name="row"> the row to start searching from. </param> public virtual void searchWorksheet(int row) { string searchFor = null; int col = -1; if (__searchIDJRadioButton.isSelected()) { searchFor = __searchID.getText().Trim(); col = 1; } else { searchFor = __searchName.getText().Trim(); col = 2; } int index = __worksheet.find(searchFor, col, row, JWorksheet.FIND_EQUAL_TO | JWorksheet.FIND_CONTAINS | JWorksheet.FIND_CASE_INSENSITIVE | JWorksheet.FIND_WRAPAROUND); if (index != -1) { selectTableIndex(index); } }
/// <summary> /// Determines which JRadioButton is currently-selected and returns it. </summary> /// <returns> the JRadioButton that is currently selected. If none are selected, /// return null. </returns> private JRadioButton getSelectedJRadioButton() { // First figure out which panel is selected... JPanel panel = (JPanel)__main_JTabbedPane.getSelectedComponent(); // List in the order of the interface... if (panel == __general_JPanel) { if (__xstJRadioButton.isSelected()) { return(__xstJRadioButton); } else if (__xwbJRadioButton.isSelected()) { return(__xwbJRadioButton); } else if (__xwrJRadioButton.isSelected()) { return(__xwrJRadioButton); } else if (__xcuJRadioButton.isSelected()) { return(__xcuJRadioButton); } } else if (panel == __compare_JPanel) { if (__xdcJRadioButton.isSelected()) { return(__xdcJRadioButton); } else if (__xrcJRadioButton.isSelected()) { return(__xrcJRadioButton); } else if (__xwcJRadioButton.isSelected()) { return(__xwcJRadioButton); } else if (__xscJRadioButton.isSelected()) { return(__xscJRadioButton); } } else if (panel == __graph_JPanel) { if (__xdgJRadioButton.isSelected()) { return(__xdgJRadioButton); } else if (__xrgJRadioButton.isSelected()) { return(__xrgJRadioButton); } else if (__xwgJRadioButton.isSelected()) { return(__xwgJRadioButton); } } else if (panel == __daily_JPanel) { if (__xdyJRadioButton.isSelected()) { return(__xdyJRadioButton); } else if (__xryJRadioButton.isSelected()) { return(__xryJRadioButton); } else if (__xwyJRadioButton.isSelected()) { return(__xwyJRadioButton); } } else if (panel == __other_JPanel) { if (__xnmJRadioButton.isSelected()) { return(__xnmJRadioButton); } else if (__xrxJRadioButton.isSelected()) { return(__xrxJRadioButton); } else if (__xspJRadioButton.isSelected()) { return(__xspJRadioButton); } else if (__xbnJRadioButton.isSelected()) { return(__xbnJRadioButton); } } return(null); }