Logo
Distributed Genetic Programming Framework
print print

File org.dgpf.gui.dialogs.AboutDialog.java

Here you can find all the information about the file org.dgpf.gui.dialogs.AboutDialog.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2006 Mirko Dietrich
 * 
 * E-Mail           : mirkodietrich@hrz.uni-kassel.de
 * Creation Date    : Jul 20, 2006 1:09:44 PM
 * Original Filename: org.dgpf.gui.DGPFAboutFrame.java
 * Version          : 1.0
 * Last modification: Jul 20, 2006
 * Last modified by : Mirko Dietrich
 * 
 * License          : GNU LESSER GENERAL PUBLIC LICENSE
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 *                    
 * Warranty         : This software is provided "as is" 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.
 */


package org.dgpf.gui.dialogs;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;

import javax.swing.ImageIcon;

import org.dgpf.gui.Frame;
import org.dgpf.gui.components.Button;
import org.dgpf.gui.utils.BrowserLaunch;
import org.dgpf.gui.utils.LanguageSwitcher;

/**
 * An about frame with a small project summary and a link to the project
 * homepage.
 * 
 * @author Mirko Dietrich
 */

public class AboutDialog extends DialogBase
  {

  /**
   * SerialVersionUID.
   */

  private static final long serialVersionUID = 4488628880416836181L;

  /**
   * DGPF homepage Button.
   */

  private Button            m_btn_dgpf_hp;

  /**
   * VS homepage Button.
   */

  private Button            m_btn_vs_hp;

  /**
   * DGPF logo.
   */

  private ImageIcon         m_dgpf_logo;

  /**
   * Verteilte Systeme logo.
   */

  private ImageIcon         m_vs_logo;

  /**
   * Default constructor.
   * 
   * @param p_parent
   *          is the parent frame.
   */

  public AboutDialog(Frame p_parent)
    {
    super(p_parent, LanguageSwitcher.getString("af_caption"),
        LanguageSwitcher.getString("af_text"), DialogBase.OK_BTN, true,
        new BorderLayout());

    this.m_dgpf_logo = new ImageIcon(ClassLoader
        .getSystemResource("org/dgpf/gui/resources/bitmaps/dgpf_logo.png"));

    this.m_btn_dgpf_hp = new Button("""open_dgpf_homepage"this, true);
    this.m_btn_dgpf_hp.setIcon(this.m_dgpf_logo);

    this.m_vs_logo = new ImageIcon(ClassLoader
        .getSystemResource("org/dgpf/gui/resources/bitmaps/vs_logo.png"));
    this.m_btn_vs_hp = new Button("""open_vs_homepage"this, true);
    this.m_btn_vs_hp.setIcon(this.m_vs_logo);

    this.m_center.setLayout(new FlowLayout());
    this.m_center.add(this.m_btn_dgpf_hp);
    this.m_center.add(this.m_btn_vs_hp);
    this.finish(DialogBase.DEFAULT_WIDTH + 100,
        DialogBase.DEFAULT_HEIGHT + 120);
    }

  /**
   * Reacts on button clicks.
   * 
   * @param p_event
   *          The incoing action event.
   */

  public void actionPerformed(ActionEvent p_event)
    {
    String l_cmd = p_event.getActionCommand();
    if(l_cmd.equals("ok"))
      {
      this.dispose();
      return;
      }
    if(l_cmd.equals("open_dgpf_homepage"))
      {
      BrowserLaunch.openURL("http://dgpf.sourceforge.net/");
      return;
      }
    if(l_cmd.equals("open_vs_homepage"))
      {
      BrowserLaunch.openURL("http://www.vs.eecs.uni-kassel.de/");
      return;
      }
    }

  }

File Information:

file name:AboutDialog.java
package:org.dgpf.gui.dialogs
qualified name:org.dgpf.gui.dialogs.AboutDialog.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/gui/dialogs/AboutDialog.java
size:3.527 KB (3612 B)
uploaded: 2015-07-22 04:10:58 GMT+0000
last update: 2006-09-24 23:47:04 GMT+0000
last access: 2017-11-22 09:16:32 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2015-07-22 04:10:53 GMT+0000 served at 2017-11-22 09:16:33 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo