001/** A tab pane to display properties of a server workflow. 002 * 003 * Copyright (c) 2010 The Regents of the University of California. 004 * All rights reserved. 005 * 006 * '$Author: crawl $' 007 * '$Date: 2010-06-03 16:45:10 -0700 (Thu, 03 Jun 2010) $' 008 * '$Revision: 24730 $' 009 * 010 * Permission is hereby granted, without written agreement and without 011 * license or royalty fees, to use, copy, modify, and distribute this 012 * software and its documentation for any purpose, provided that the above 013 * copyright notice and the following two paragraphs appear in all copies 014 * of this software. 015 * 016 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 017 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 018 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 019 * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 020 * SUCH DAMAGE. 021 * 022 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 023 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 025 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 026 * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 027 * ENHANCEMENTS, OR MODIFICATIONS. 028 * 029 */ 030package org.kepler.workflowscheduler.gui; 031 032import java.awt.event.ActionEvent; 033import java.awt.event.ActionListener; 034 035import javax.swing.JComboBox; 036 037public class IntervalUnitComboBoxAction implements ActionListener 038{ 039 private String intervalUnit = WorkflowSchedulerPanel.INTERVALUNITVALUE[0]; 040 /** 041 * Constructor 042 * @param intervalUnit 043 */ 044 public IntervalUnitComboBoxAction() 045 { 046 047 } 048 049 /** 050 * The action will generate the new interval unit 051 * @param e 052 */ 053 public void actionPerformed(ActionEvent e) 054 { 055 JComboBox cb = (JComboBox)e.getSource(); 056 int index = cb.getSelectedIndex(); 057 intervalUnit = WorkflowSchedulerPanel.INTERVALUNITVALUE[index]; 058 //System.out.println("interval unit is in action performed "+intervalUnit); 059 060 } 061 062 /** 063 * Get the interval unit after doing a selection 064 * @return the intervalUnit 065 */ 066 public String getIntervalUnit() 067 { 068 return intervalUnit; 069 } 070}