ch.randelshofer.quaqua.SheetEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Quaqua Show documentation
Show all versions of Quaqua Show documentation
A Mavenisation of the Quaqua Mac OSX Swing Look and Feel (Java library)
Quaqua Look and Feel (C) 2003-2010, Werner Randelshofer.
Mavenisation by Matt Gumbley, DevZendo.org - for problems with
Mavenisation, see Matt; for issues with Quaqua, see the Quaqua home page.
For full license details, see http://randelshofer.ch/quaqua/license.html
The newest version!
/*
* @(#)SheetEvent.java 1.0 26. September 2005
*
* Copyright (c) 2005-2010 Werner Randelshofer, Immensee, Switzerland.
* All rights reserved.
*
* You may not use, copy or modify this file, except in compliance with the
* license agreement you entered into with Werner Randelshofer.
* For details see accompanying license terms.
*/
package ch.randelshofer.quaqua;
import java.util.*;
import javax.swing.*;
/**
* SheetEvent.
*
* @author Werner Randelshofer
* @version 1.0 26. September 2005 Created.
*/
public class SheetEvent extends EventObject {
private JComponent pane;
private int option;
private Object value;
private Object inputValue;
/**
* Creates a new instance.
*/
public SheetEvent(JSheet source) {
super(source);
}
/**
* Creates a new instance.
*/
public SheetEvent(JSheet source, JFileChooser fileChooser, int option, Object value) {
super(source);
this.pane = fileChooser;
this.option = option;
this.value = value;
}
/**
* Creates a new instance.
*/
public SheetEvent(JSheet source, JOptionPane optionPane, int option, Object value, Object inputValue) {
super(source);
this.pane = optionPane;
this.option = option;
this.value = value;
this.inputValue = inputValue;
}
/**
* Returns the pane on the sheet. This is either a JFileChooser or a
* JOptionPane.
*/
public JComponent getPane() {
return pane;
}
/**
* Returns the JFileChooser pane on the sheet.
*/
public JFileChooser getFileChooser() {
return (JFileChooser) pane;
}
/**
* Returns the JOptionPane pane on the sheet.
*/
public JOptionPane getOptionPane() {
return (JOptionPane) pane;
}
/**
* Returns the option that the JFileChooser or JOptionPane returned.
*/
public int getOption() {
return option;
}
/**
* Returns the value that the JFileChooser or JOptionPane returned.
*/
public Object getValue() {
return value;
}
/**
* Returns the input value that the JOptionPane returned, if it wants input.
*/
public Object getInputValue() {
return inputValue;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy