Package PrologPlusCG.gui

Source Code of PrologPlusCG.gui.PrimitiveGoalsFrame

/**********************************************************************
*
* 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.gui;

import java.awt.Dimension;

import javax.swing.ImageIcon;
import javax.swing.JDesktopPane;
import javax.swing.JInternalFrame;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.ScrollPaneConstants;
import javax.swing.event.InternalFrameEvent;
import javax.swing.event.InternalFrameListener;


public class PrimitiveGoalsFrame extends JInternalFrame {
  private static final long serialVersionUID = 4048792355723162674L;
  ImageIcon imageIcoPrlg = null;
  InternalFrameListener ifListener;
 
  PrimitiveGoalsFrame(JDesktopPane aDeskTop, JTree jtreePrimHier) {
    super("Primitive goals", true, true, true, true);
    imageIcoPrlg = new ImageIcon(PrologPlusCGFrame.ppcgLogoPath);
    setFrameIcon(imageIcoPrlg);
   
    JScrollPane jsp = new JScrollPane(jtreePrimHier);
    jsp.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
    jsp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jsp.setPreferredSize(new Dimension(300, 200));
    getContentPane().add(jsp);
    setLocation(60, 60);
    setSize(300, 200);
    aDeskTop.add(this);
   
    ifListener = new InternalFrameListener() {
      public void internalFrameActivated(InternalFrameEvent zevt) {
        moveToFront();
      }
     
      public void internalFrameOpened(InternalFrameEvent zevt) {
        // We don't need to do anything...
      }
     
      public void internalFrameClosed(InternalFrameEvent zevt) {
        // We don't need to do anything...
      }
     
      public void internalFrameClosing(InternalFrameEvent zevt) {
        // We don't need to do anything...
      }
     
      public void internalFrameDeactivated(InternalFrameEvent zevt) {
        moveToBack();
      }
     
      public void internalFrameDeiconified(InternalFrameEvent zevt) {
        // We don't need to do anything...
      }
     
      public void internalFrameIconified(InternalFrameEvent zevt) {
        // We don't need to do anything...
      }
    };
    addInternalFrameListener(ifListener);
  }
}
TOP

Related Classes of PrologPlusCG.gui.PrimitiveGoalsFrame

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.