Logo
Distributed Genetic Programming Framework
print print

File org.dgpf.gui.wizards.chartchooser.CCWzrdSecCardXYLC.java

Here you can find all the information about the file org.dgpf.gui.wizards.chartchooser.CCWzrdSecCardXYLC.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2006 Alexander Podlich
 * 
 * E-Mail           : podlich@student.uni-kassel.de
 * Creation Date    : 01.08.2006 22:30:55
 * Original Filename: org.dgpf.gui.wizards.chartchooser.DGPFCCWzrdSecCardXYLC.java
 * Version          : 1.0
 * Last modification: 01.08.2006
 * Last modified by : Alexander Podlich
 * 
 * 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.wizards.chartchooser;

import java.awt.event.ActionEvent;
import java.util.Vector;

import javax.swing.event.ListSelectionEvent;

import org.dgpf.gui.charts.descriptors.PortDescriptorBase;
import org.dgpf.gui.components.DGPFList;
import org.sfc.meta.TimeProperty;

/**
 * This class represents the second card of the chart chooser wizard for a
 * xy line chart. In this card it is possible to select special options for
 * this xy line chart.
 * 
 * @author Alexander Podlich
 */

public class CCWzrdSecCardXYLC extends CCWzrdSecCard
  {

  /**
   * The serial version UID.
   */

  private static final long serialVersionUID = 1L;

  /**
   * The status, whether the actual chart is a time chart.
   */

  private boolean           m_isTimeChart      = false;

  /**
   * Constructor
   * 
   * @param p_values
   *          The vector of DGPFPortDescriptos as y-values in a chart.
   * @param p_chartName
   *          The name of the chart.
   */

  public CCWzrdSecCardXYLC(Vector<PortDescriptorBase> p_values,
      String p_chartName)
    {

    super(p_values, p_chartName);

    createXYLists();
    createNameField();
    ceateTimeFormat();
    createBoundaryCheckBox();
    createChartLineCheckBox();
    createShapeCheckBox();
    createLegendCheckbox();

    finalizeCCWzrdSecCard();

    }

  /**
   * Returns the boolean status if values the xList and the yList are
   * selected.
   * 
   * @return The status.
   */

  public boolean canStart()
    {
    if(!(getYList().isSelectionEmpty())
        && !(getXList().isSelectionEmpty())
        && !(getNameTextField().getText().equals("")))
      {
      return true;
      }
    return false;
    }

  /**
   * @param p_event
   *          The event
   */

  public void valueChanged(ListSelectionEvent p_event)
    {
    if(((PortDescriptorBase) ((DGPFList) p_event.getSource()).getSelectedValue())
        .getPropertyPort().get_property() instanceof TimeProperty)
      {
      this.m_isTimeChart = true;
      getTimeComboBox().setEnabled(true);
      getTimeFormatLabel().setEnabled(true);
      }
    else
      {
      this.m_isTimeChart = false;
      getTimeComboBox().setEnabled(false);
      getTimeFormatLabel().setEnabled(false);
      }
    }

  /**
   * @return The status, whether the actual chart is a time chart.
   */

  public boolean isTimeChart()
    {
    if ((this.m_isTimeChart) && !(this.getTimePattern().equals("java")))
      {
      return true;
      }
    return false;
    }

  /**
   * @param p_event
   *          The action event
   */

  public void actionPerformed(ActionEvent p_event)
    {
    String l_cmd = p_event.getActionCommand();
    if(l_cmd.equals("bCheckBox"))
      {
      getSpinner().setEnabled(getBCheckBox().isSelected());
      }
    }

  }

File Information:

file name:CCWzrdSecCardXYLC.java
package:org.dgpf.gui.wizards.chartchooser
qualified name:org.dgpf.gui.wizards.chartchooser.CCWzrdSecCardXYLC.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/gui/wizards/chartchooser/CCWzrdSecCardXYLC.java
size:3.822 KB (3914 B)
uploaded: 2015-07-22 04:10:59 GMT+0000
last update: 2006-09-24 23:47:04 GMT+0000
last access: 2017-11-22 09:28:39 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:28:39 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo