Package jimm.datavision.gui.parameter

Source Code of jimm.datavision.gui.parameter.SingleDateInq

package jimm.datavision.gui.parameter;
import jimm.datavision.Parameter;
import java.util.Date;
import java.util.Calendar;
import javax.swing.*;
import com.toedter.calendar.JCalendar;

* A single date inquisitor knows how to display and control the widgets
* needed to ask a user for a date parameter value.
* @author Jim Menard, <a href=""></a>
class SingleDateInq extends Inquisitor {

protected JCalendar cal;

SingleDateInq(Parameter param) {

    // Build GUI. Use current date as default value.
    JPanel innerPanel = new JPanel();
    innerPanel.add(cal = new JCalendar());

    // Copy default value into "real" value. Default value is the
    // current date and time.
    parameter.setValue(0, parameter.getDefaultValue(0));

void copyGUIIntoParam() {
    parameter.setValue(0, cal.getCalendar().getTime());

void copyParamIntoGUI() {
    Calendar calendar = Calendar.getInstance();


Related Classes of jimm.datavision.gui.parameter.SingleDateInq

Copyright © 2018 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