package edu.calpoly.cpe205.fetter; import javax.swing.*; import java.util.*; import java.io.*; import java.lang.reflect.*; import java.lang.*; import java.awt.*; import javax.swing.event.*; import java.awt.event.*; /** * This class stores all the GUI components used to display information * in the rows of the Field panel and Method panel, and Object Inspector * dialog and provides methods to access these GUI components. */ // Author: Brian Laird // Version History // Nov 18, 2000 - added algorithm pseudocode // Nov 29, 2000 - (Mike P) correct getComboBoxes javadocs // Nov 29, 2000 - (Mike P) correct return of getComboBoxes // Nov 29, 2000 - (Mike H) took out 'extends JButton', implemented // setEnabled // Nov 30, 2000 - (Mike H) changed class description // Jan 17, 2001 - (Phillip Hansen) looked at file to stub methods but this class // is already fully coded // Jan 31, 2001 - (Phil H) Checked code for setEnabled method because it has already // been implemented abstract public class RowAbstract { /** * Returns type label of test data item. *
* Pre-conditions: none * Post-conditions: returns type * @return JLabel type */ public JLabel getType() { // returns JLabel type return type; } /** * Returns the name button of the test data item *
* Pre-conditions: none * Post-conditions: returns modifierPanel * @return JButton name */ public JButton getNameButton() { // RETURN name return name; } /** * Returns the modifier of the test data item *
* Pre-conditions: none * Post-conditions: returns modifierPanel * @return JPanel modifierPanel */ public JPanel getModifierPanel() { // RETURN modifierPanel return modifierPanel; } /** * Returns an array of ParameterObjectComboBox. *
* Pre-conditions: none * Post-conditions: returns modifierPanel * @return ComboBoxes the user uses to select Test Items */ public ParameterObjectComboBox[] getComboBoxes() { // RETURN ParameterObjectComboBox[] return selectors; } /** * Enables all components of the Row. *
* Pre-conditions: none * Post-conditions: all components within row are enabled */ public void setEnabled(boolean bool) { // CALL setEnabled on name // CALL getLength of selectors returns length // FOR index = 1 to length // CALL setEnabled on selectors[index] // ENDFOR name.setEnabled(bool); int length = selectors.length; for (int i = 0; i < length; i++) { selectors[i].setEnabled(bool); } } /** * The JLabel of the test data item. */ protected JLabel type; /** * The JButton of the test data item. */ protected JButton name; /** * The JPanel of the test data item. */ protected JPanel modifierPanel; /** * The array of ParameterObjectComboBox of the test data item. */ protected ParameterObjectComboBox[] selectors; /** * @clientCardinality 0..* */ }