/* Research Project: Graphical Database for Category Theory J. Bradbury, Dr. R. Rosebrugh, I. Rutherford Mount Allison University 2001 File: AboutFrame.java Description: This file is displayed when the user selects the "About GDCT" menu option in the main window. It displays basic information about the project */ //import statements import java.applet.Applet; import java.awt.*; class AboutFrame extends Frame { int check_enter = 0; Button exit = new Button(); Panel button_panel = new Panel(); BorderLayout borderLayout1 = new BorderLayout(); public AboutFrame() { setTitle("About GDCT"); exit.setLabel("OK"); this.setLayout(borderLayout1); button_panel.add(exit); this.setBackground(new Color(192,192,192)); this.add("South",button_panel); } public void paint(Graphics g) { g.drawImage(getToolkit().getImage("images/small.gif"), 10, 30, this); Font font1 = new Font("TimesRoman", Font.BOLD, 12); g.setFont(font1); g.drawString("Graphical Database for Category Theory", 200, 50); g.drawString("Version 1.0, Developed 1998-2001", 200, 70); g.drawString("R. Rosebrugh, J. Bradbury, I. Rutherford", 200, 90); g.drawString("Dept. of Mathematics & Computer Science", 200, 110); g.drawString("Mount Allison University", 200, 130); g.drawString("Sackville, New Brunswick, Canada", 200, 150); g.drawLine(10, 175, 425, 175); Font font2 = new Font("TimesRoman", Font.PLAIN, 14); g.setFont(font2); /* //Category Information g.drawString("This application allows for the creation, editing, and storage of finitely", 10,200); g.drawString("presented categories. Categories can be opened and saved from local files", 10,215); g.drawString("as well as loaded from a specified server. Once a category file is in", 10,230); g.drawString("memory it can be printed or tools for testing properties of objects and", 10,245); g.drawString("arrows can be applied to it. The tools available in this version of GDCT", 10,260); g.drawString("are Make Confluent, Equality of Composities, Make Dual, Initial Object,", 10,275); g.drawString("Sum, Teminal Object, and Product.", 10,290); //Functor Information g.drawString("Finitely presented functors can also be created and stored. Once in memory", 10,320); g.drawString("functors can be displayed and animated to better demonstrating mappings", 10,335); g.drawString("between the two categories in the functor.", 10,350); //Graphical Information g.drawString("This program also allows the display of categories through the use of graph", 10, 380); g.drawString("classes that were developed at Auburn University for Visualizing Graphs with", 10, 395); g.drawString("Java (VGJ), a tool for graph drawing and graph layout. The original program", 10, 410); g.drawString("was heavily modified for displaying categories. It can be found at", 10, 425); g.setColor(Color.blue); g.drawString("http://www.eng.auburn.edu/department/cse/research/graph_drawing/",10, 440); g.drawLine(10, 442, 400, 442); */ } public boolean handleEvent(Event e) { if ((e.id == Event.WINDOW_DESTROY) || (e.id == Event.ACTION_EVENT)) { setVisible(false); //hide frame dispose(); //free resources return true; } if (e.key == Event.ENTER) { if (check_enter == 0) check_enter++; else { setVisible(false); //hide frame dispose(); //free resources } return true; } return super.handleEvent(e); } public boolean action(Event e, Object o) { if ((e.target == exit) || (e.key == Event.ENTER)) { setVisible(false); //hide frame dispose(); //free resources return true; } return false; } }