Logo
Distributed Genetic Programming Framework
print print

File org.dgpf.gui.TabbedPane.java

Here you can find all the information about the file org.dgpf.gui.TabbedPane.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2006 Universitaet Kassel
 *
 * E-Mail           : mirko.dietrich@hrz.uni-kassel.de
 * Original Filename: org.dgpf.gui.DGPFTabbedPane.java
 *
 * 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;

import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextPane;

import org.dgpf.gui.tabs.ChartTab;
import org.dgpf.gui.tabs.PropertyTab;
import org.sfc.gui.text.DocumentWriter;
import org.sfc.io.MultiplexingWriter;

/**
 * DGPF TabbedPane
 */

public class TabbedPane extends JTabbedPane
  {

  /**
   * serial version UID.
   */

  private static final long serialVersionUID = 1L;


  /**
   * @param p_tab The property tab.
   */

  public void addPropertySetTab(PropertyTab p_tab)
    {
    addTab(p_tab.getTabName(), p_tab);
    }
  
  /**
   *@param p_tab The chart tab.
   */

  public void addAndShowTab(ChartTab p_tab)
    {
    addTab(p_tab.getTabName(), p_tab);
    setSelectedIndex(getTabCount() - 1);
    }

  /**
   * Addes a textpane
   * 
   * @return text pane.
   */

  public JTextPane addTextTab()
    {

    JTextPane l_logPane = new JTextPane();
    JScrollPane l_logAreaPane = new JScrollPane(l_logPane);
    l_logPane.setEditable(false);

    add("PropertySet", l_logAreaPane);

    return l_logPane;
    }

  /**
   * Starts the logging.
   * 
   * @param p_mDefaultWriter
   *          writer.
   * @param p_mCSVWriter
   *          writer.
   */

  public void startLogging(MultiplexingWriter p_mDefaultWriter,
      MultiplexingWriter p_mCSVWriter)
    {
    JTextPane defaultLogPane = addTextTab();
    p_mDefaultWriter.add(new DocumentWriter(defaultLogPane, 20000));
    }

  }

File Information:

file name:TabbedPane.java
package:org.dgpf.gui
qualified name:org.dgpf.gui.TabbedPane.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/gui/TabbedPane.java
size:2.350 KB (2407 B)
uploaded: 2012-05-02 03:10:54 GMT+0000
last update: 2006-09-24 23:47:04 GMT+0000
last access: 2012-11-26 23:46:34 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 2012-05-02 03:10:45 GMT+0000 served at 2014-11-29 08:19:03 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo