Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /openetl/src/org/tigris/openetl/ui/constants/, /openetl/src/org/tigris/openetl/ui/

openetl
Discussion topic

Back to topic list

CVS update: /openetl/src/org/tigris/openetl/ui/constants/, /openetl/src/org/tigris/openetl/ui/

Reply

Author ernani_joppert
Full name Ernani Joppert Pontes Martins
Date 2004-07-24 22:45:31 PDT
Message User: ernani_joppert
Date: 04/07/24 22:45:31

Added:
 /openetl/src/org/tig​ris/openetl/ui/
  MdiChildForm.java, MdiForm.java

Modified:
 /openetl/src/org/tig​ris/openetl/ui/const​ants/
  Application.java
 /openetl/src/org/tig​ris/openetl/ui/
  MenuBar.java, MainFrame.java

Log:
 changes done in javadoc and refactoring class names.

File Changes:

Directory: /openetl/src/org/tig​ris/openetl/ui/const​ants/
====================​====================​================

File [changed]: Application.java
Url: http://openetl.tigri​s.org/source/browse/​openetl/src/org/tigr​is/openetl/ui/consta​nts/Application.java​?r1=1.1&r2=1.2
Delta lines: +5 -3
-------------------
--- Application.java 23 Jul 2004 23:04:34 -0000 1.1
+++ Application.java 25 Jul 2004 05:45:30 -0000 1.2
@@ -4,17 +4,19 @@
 package org.tigris.openetl.u​i.constants;
 
 /**
+ * This is the interface for constant definitions.
+ *
  * @author Ernani Joppert Pontes Martins
  */
 public interface Application {
 
     /**
- * The blank space difference from screen sixe
+ * The amount in pixels for form spacing based on screen resolution.
      */
     static int borderSize = 50;
 
     /**
- * The main title constant string.
+ * The title of main mdi form.
      */
     static String MAIN_TITLE = "Application Main Title";
 }

Directory: /openetl/src/org/tig​ris/openetl/ui/
====================​====================​======

File [changed]: MenuBar.java
Url: http://openetl.tigri​s.org/source/browse/​openetl/src/org/tigr​is/openetl/ui/MenuBa​r.java?r1=1.1&r2​=1.2
Delta lines: +10 -1
--------------------
--- MenuBar.java 23 Jul 2004 23:04:34 -0000 1.1
+++ MenuBar.java 25 Jul 2004 05:45:30 -0000 1.2
@@ -12,14 +12,23 @@
 import javax.swing.KeyStroke;
 
 /**
+ * This is the applications main menu bar. It defines all object items from the
+ * main menu.
+ *
  * @author Ernani Joppert Pontes Martins
  */
 public class MenuBar extends JMenuBar {
 
+ /**
+ * Default Constructor.
+ *
+ * @param frame
+ * The frame to add the menu items action listener.
+ */
     public MenuBar(MainFrame frame) {
 
         // Set up the lone menu.
- JMenu menu = new JMenu("Document");
+ JMenu menu = new JMenu("File");
         menu.setMnemonic(Key​Event.VK_D);
         this.add(menu);
 

File [added]: MdiChildForm.java
Url: http://openetl.tigri​s.org/source/browse/​openetl/src/org/tigr​is/openetl/ui/MdiChi​ldForm.java?rev=1.1​&content-type=tex​t/vnd.viewcvs-markup​
Added lines: 37
---------------
/*
 * Created on 23/07/2004
 */
package org.tigris.openetl.ui;

import javax.swing.JInternalFrame;

/**
 * This class represents the Internal frame form definitions.
 *
 * @author Ernani Joppert Pontes Martins
 */
public class MdiChildForm extends JInternalFrame {

    /**
     * Default constructor
     *
     * @param title
     * The internal window title to set.
     */
    public MdiChildForm(String title) {

        super(title, true, //resizable
                true, //closable
                true, //maximizable
                true);//iconifiable

        // Set the window's size.
        setSize(300, 300);

        // Set the window's location.
        setLocation(10, 10);

        // Change the window's visible state.
        this.setVisible(true);
    }
}

File [changed]: MainFrame.java
Url: http://openetl.tigri​s.org/source/browse/​openetl/src/org/tigr​is/openetl/ui/MainFr​ame.java?r1=1.1&​r2=1.2
Delta lines: +25 -15
---------------------
--- MainFrame.java 23 Jul 2004 23:04:34 -0000 1.1
+++ MainFrame.java 25 Jul 2004 05:45:30 -0000 1.2
@@ -14,6 +14,9 @@
 import org.tigris.openetl.u​i.constants.Applicat​ion;
 
 /**
+ * This is the main class from the User Interface. It creates a JFrame object
+ * instance and calls up all form objects and provide ActionListeners for them.
+ *
  * @author Ernani Joppert Pontes Martins
  */
 public class MainFrame extends JFrame implements ActionListener {
@@ -21,37 +24,41 @@
     /**
      * The mdiForm desktop pane instance.
      */
- private OpenETLMdi mdiForm = new OpenETLMdi();
-
- /**
- * The border gap definition.
- */
- private int inSet = 50;
+ private MdiForm mdiForm = new MdiForm();
 
     /**
      * The screen dimension instance.
      */
     Dimension screenSize = Toolkit.getDefaultTo​olkit().getScreenSiz​e();
 
+ /**
+ * Default Constructor.
+ */
     public MainFrame() {
 
         super(Application.MAIN_TITLE);
 
- this.setBounds(inSet, inSet, screenSize.width - inSet * 2,
- screenSize.height - inSet * 2);
+ this.setBounds(Appli​cation.borderSize, Application.borderSize,
+ screenSize.width - Application.borderSize * 2,
+ screenSize.height - Application.borderSize * 2);
         this.createInternalFrame();
         this.setContentPane(mdiForm);
         this.setJMenuBar(new MenuBar(this));
 
     }
 
- /*
- * (non-Javadoc)
+ /**
+ * This method checks all action performed within the application Menu.
+ *
+ * @param e
+ * The ActionEvent to check for.
      *
      * @see java.awt.event.Actio​nListener#actionPerf​ormed(java.awt.event​.ActionEvent)
      */
     public void actionPerformed(ActionEvent e) {
- if ("new".equals(e.getA​ctionCommand())) { //new
+
+ if ("new".equals(e.getA​ctionCommand())) {
+ // clicked on new.
             createInternalFrame();
         } else {
             quit();
@@ -59,15 +66,16 @@
     }
 
     /**
- * Create a new internal frame on the mdi form.
+ * Creates a new internal frame for the the mdi form.
      */
     protected void createInternalFrame() {
- InternalFrame childForm = new InternalFrame();
+
+ MdiChildForm childForm = new MdiChildForm("window title to set");
         mdiForm.add(childForm);
     }
 
     /**
- * Quit the application
+ * Quits the application.
      */
     protected void quit() {
         System.exit(0);
@@ -93,9 +101,11 @@
     }
 
     /**
- * Main method.
+ * This is the application's main method. It creates the mdi form instance
+ * with all objects loaded.
      *
      * @param args
+ * The array of String to check for optional parameters.
      */
     public static void main(String[] args) {
 

File [added]: MdiForm.java
Url: http://openetl.tigri​s.org/source/browse/​openetl/src/org/tigr​is/openetl/ui/MdiFor​m.java?rev=1.1&c​ontent-type=text/vnd​.viewcvs-markup
Added lines: 21
---------------
/*
 * Created on 23/07/2004
 */
package org.tigris.openetl.ui;

import javax.swing.JDesktopPane;

/**
 * This class defines the MDI application form object.
 *
 * @author Ernani Joppert Pontes Martins
 */
public class MdiForm extends JDesktopPane {

    /**
     * Default Constructor.
     */
    public MdiForm() {
        this.setDragMode(Mdi​Form.OUTLINE_DRAG_MO​DE);
    }
}




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@open​etl.tigris.org
For additional commands, e-mail: cvs-help at openetl dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /openetl/src/org/tigris/openetl/ui/constants/, /openetl/src/org/tigris/openetl/ui/ ernani_joppert Ernani Joppert Pontes Martins 2004-07-24 22:45:31 PDT
Messages per page: