/* Research Project: Graphical Database for Category Theory J. Bradbury, Dr. R. Rosebrugh, I. Rutherford Mount Allison University 2001 Updated: May 8th, 2003 (J. Tweedle) File: InitialObjectFrame.java Description: This file is displayed when the user selects the "Initial Object" menu option in the main window. The user can select a category from a choice menu and then chose to check if one or all of the categories are intial. The information on each object tested will be displayed in the text area. The algorithm to perform the initial object test was removed and put into the file InitialObject.java. The obselete Borland libraries were removed. */ //import statements import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.beans.*; public class InitialObjectFrame extends JInternalFrame { private Category cat; private CategoryInternalFrame categoryInternalFrame_; private InitialObject initObj; //Objects in the Graphical User Interface(GUI) private DefaultListModel objectModel = new DefaultListModel(); private JList objectList = new JList(objectModel); private JPanel buttonPanel = new JPanel(); private JButton checkButton = new JButton(); private JButton selectAllButton = new JButton(); private JLabel objectLabel = new JLabel(); private JTextField currentCategory = new JTextField(10); public InitialObjectFrame(CategoryInternalFrame categoryInternalFrame) //Default Constructor with the list of categories and the ok //button as parameters { super(categoryInternalFrame.getTitle() + ": Initial Objects", true, true, false, false); categoryInternalFrame_ = categoryInternalFrame; cat = categoryInternalFrame_.getCategory(); initObj = new InitialObject(cat, "initial"); objectList.setBackground(Color.white); objectList.setBorder(BorderFactory.createEtchedBorder()); objectList.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); for (int i=0; i