/*
This file is part of the software framework JStatCom,
a library for building applications for data based analysis.
Copyright (C) 2000-2005 Markus Kraetzig
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
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.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
*/
package com.jstatcom.engine;
import javax.swing.JPanel;
/**
* This class should be subclassed by panels laying out
* an input mask to collect configuration information.
* It will appear embedded in a ConfigDialog.
*
* The types of engine specific information are stored in the respective
* ConfigKeys implementation. It is not necessary
* to provide options to change every setting, but only the ones
* that need to be adjusted for every specific machine, for example
* the location of engine executables.
*
* Changes made in this panel are validated and stored in
* an instance of ConfigHolder. Settings are saved
* permanently in an XML file.
*
* Every engine implementation should define a concrete
* implementation of this class. It can be accessed via
* the method getConfigPanel of EngineTypes.
*
* @author Markus Kraetzig
*
* @see com.jstatcom.engine.EngineTypes
* @see com.jstatcom.engine.ConfigDialog
* @see com.jstatcom.engine.ConfigKeys
* @see com.jstatcom.engine.ConfigHolder
*/
public abstract class AbstractConfigPanel extends JPanel {
/**
* Invokes superclass constructor.
*/
public AbstractConfigPanel() {
super();
}
/**
* Sets the input mask display to the settings already
* stored in configHolder. This method is
* called by ConfigDialog before this panel
* is shown.
*
* @param configHolder the configuration holder
*/
public abstract void setConfig(ConfigHolder configHolder);
/**
* Stores the information from the input mask to configHolder.
* This method is called by ConfigDialog when the
* OK button is pressed.
*
* @param configHolder the configuration holder
* @return null if ok, error string otherwise
*/
public abstract String storeConfig(ConfigHolder configHolder);
}
Ads help maintain this website.