Package PrologPlusCG

Source Code of PrologPlusCG.PrologPlusCG

/**********************************************************************
*
* Prolog+CG : Prolog with conceptual graphs
*
* Copyright (C) 2000-2004  Adil Kabbaj
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
*
* Website
* =======
*
* Prolog+CG has a website here:
*
* http://prologpluscg.sourceforge.net/
*
*
* Contact
* =======
*
* Please DO NOT send email to Prof. Kabbaj.  Instead, all
* correspondence regarding Prolog+CG should be sent to the current
* maintainter:
*
* Ulrik Petersen  <ulrikp{t-a}users{dot}sourceforge{|dot|}net
*
* (Email obfuscated to foil spammers).
*
*
* NO SUPPORT
* ==========
*
* Note that NEITHER Prof. KABBAJ NOR ULRIK PETERSEN WILL GIVE
* SUPPORT!  No support is available.
*
* If you need help in using Prolog+CG, please check out the resources
* available at:
*
* http://prologpluscg.sourceforge.net/docs.html
*
* That page points to ample resources for learning Prolog+CG.
*
*
* Bugreports
* ==========
*
* Notwithstanding the lack of support, the maintainer will gladly
* receive bugreports and bugfixes.  Please feel free to send such
* bulletins to the address given above.
*
*
*/


package PrologPlusCG;

import java.awt.*;
import javax.swing.UIManager;
import PrologPlusCG.gui.PrologPlusCGFrame;
import PrologPlusCG.gui.PPCGIO_GUI;
import PrologPlusCG.prolog.PPCGEnv;


public class PrologPlusCG {
  // Construct the application
  public PrologPlusCG() {
    PPCGEnv env = new PPCGEnv();
    PrologPlusCGFrame frame = new PrologPlusCGFrame(env, false);
    PPCGIO_GUI io = new PPCGIO_GUI(env, frame);
    env.io = io;
    frame.validate();
   
    //Center the window
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = frame.getSize();
   
    if (frameSize.height > screenSize.height) {
      frameSize.height = screenSize.height;
    }
   
    if (frameSize.width > screenSize.width) {
      frameSize.width = screenSize.width;
    }
   
    frame.setLocation((screenSize.width - frameSize.width) / 2,
        (screenSize.height - frameSize.height) / 2);
    frame.setVisible(true);
  }
 
  public static void main(String[] args) {
    try {
      UIManager.setLookAndFeel(
      "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
     
      //UIManager.setLookAndFeel(new javax.swing.plaf.motif.MotifLookAndFeel());
      //UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel());
    } catch (Exception e) {
      // Do nothing
    }
   
    new PrologPlusCG();
  }
}
TOP

Related Classes of PrologPlusCG.PrologPlusCG

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.