package jas2.swingstudio;
import javax.swing.event.*;
import java.awt.event.*;
/**
* On this panel add a bunch of widgets that allow the user to
* set or modify properties of your cut.
* Subclasses must take the name name + "Panel" where "name"
* is what shows in the combo box of choices for cut types, and must be in the
* jas.cuts package. The subclass
* constructor must take no arguments.
*/
public abstract class CutPropertiesPanel extends javax.swing.JPanel
implements KeyListener, ChangeListener, ActionListener
{
/**
* Return a properties object that refects the settings, or
* null of the settings are invalid.
*/
abstract public jas2.jds.interfaces.CutProperties getProperties();
/** Return a constructor for the properties on the panel. */
abstract public String getConstructor(String name);
/** Return a suitable description for a cut with the properties on the panel. */
abstract public String getDescription(String name);
/** Call to notify the parent dialog that the settings have changed. */
protected final void changeNotify(boolean reRunJob)
{
if (m_dialog != null) m_dialog.changeNotify(reRunJob);
}
/** Calls changeNotify(true) */
public void stateChanged(ChangeEvent e)
{
changeNotify(true);
}
/** Calls changeNotify(true) */
public void actionPerformed(ActionEvent e)
{
changeNotify(true);
}
/** Calls changeNotify(false) */
public void keyReleased(KeyEvent e)
{
changeNotify(false);
}
/** Does nothing */
public void keyPressed(KeyEvent e)
{
}
/** Does nothing */
public void keyTyped(KeyEvent e)
{
}
CutPropertiesDialog m_dialog;
}
Ads help maintain this website.