// Path: src/net/sourceforge/arbaro/export/Console.java
// final public class Console {
// 	static final public int REALLY_QUIET=0;
// 	static final public int QUIET=1;
// 	static final public int VERBOSE=2;
// 	static final public int DEBUG=3;
// 
// 	static public char progrChr=' '; // show progress on Console
// 	
// 	static public int outputLevel;
// 
// 	static public void setOutputLevel(int level) {
// 		outputLevel = level;
// 		if (outputLevel>= VERBOSE)
// 			progrChr = '.';
// 		else
// 			progrChr = ' ';
// 	}
// 	
// 	static synchronized public boolean debug() {
// 		return outputLevel>=DEBUG;
// 	}
// 	
// 	static synchronized public void progressChar() {
// 		if (outputLevel>=VERBOSE) {
// 			System.err.print(progrChr);
// 		}
// 	}
// 	
// 	static synchronized public void verboseOutput(String msg) {
// 		if (outputLevel>=VERBOSE) {
// 			System.err.println(msg);
// 		}
// 	}
// 	
// 	static synchronized public void debugOutput(String msg) {
// 		if (outputLevel>=DEBUG) {
// 			System.err.println(msg);
// 		}
// 	}
// 
// 	static synchronized public void errorOutput(String msg) {
// 		if (outputLevel>REALLY_QUIET) {
// 			System.err.println(msg);
// 		}
// 	}
// 	
// 	static synchronized public void printException(Exception e) {
// 		if (outputLevel>REALLY_QUIET) {
// 			System.err.println(e);
// 			e.printStackTrace(System.err);
// 		}
// 	}
// 
// 	static synchronized public void progressChar(char c) {
// 		if (outputLevel>=VERBOSE) {
// 			System.err.print(c);
// 		}
// 	}
// 
// 	static public void setProgressChar(char consoleChar) {
// 		Console.progrChr= consoleChar;
// 	}
// 
// }


import javax.swing.event.*;
import net.sourceforge.arbaro.export.Console;

//  #**************************************************************************
//  #
//  #    Copyright (C) 2003-2006  Wolfram Diestel
//  #
//  #    This program is free software; you can redistribute it and/or modify
//  #    it under the terms of the GNU General Public License as published by
//  #    the Free Software Foundation; either version 2 of the License, or
//  #    (at your option) any later version.
//  #
//  #    This program 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 General Public License for more details.
//  #
//  #    You should have received a copy of the GNU General Public License
//  #    along with this program; if not, write to the Free Software
//  #    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//  #
//  #    Send comments and bug fixes to diestel@steloj.de
//  #
//  #**************************************************************************/

package net.sourceforge.arbaro.params;


public abstract class AbstractParam {
	public static final int GENERAL = -999; // no level - general params
	String name;
	String group;
	int level;
	int order;
	String shortDesc;
	String longDesc;
	boolean enabled;

	protected ChangeEvent changeEvent = null;
	protected EventListenerList listenerList = new EventListenerList();

	public AbstractParam(String nam, String grp, int lev, int ord,
			String sh, String lng) {
		name = nam;
		group = grp;
		level = lev;
		order = ord;
		shortDesc = sh;
		longDesc = lng;
		enabled=true;
	}

	public abstract void setValue(String val) throws ParamException;
	public abstract String getValue();
	public abstract String getDefaultValue();
	public abstract void clear();
	public abstract boolean empty();

	public static boolean loading=false;

	protected void warn(String warning) {

// Path: src/net/sourceforge/arbaro/export/Console.java
// final public class Console {
// 	static final public int REALLY_QUIET=0;
// 	static final public int QUIET=1;
// 	static final public int VERBOSE=2;
// 	static final public int DEBUG=3;
// 
// 	static public char progrChr=' '; // show progress on Console
// 	
// 	static public int outputLevel;
// 
// 	static public void setOutputLevel(int level) {
// 		outputLevel = level;
// 		if (outputLevel>= VERBOSE)
// 			progrChr = '.';
// 		else
// 			progrChr = ' ';
// 	}
// 	
// 	static synchronized public boolean debug() {
// 		return outputLevel>=DEBUG;
// 	}
// 	
// 	static synchronized public void progressChar() {
// 		if (outputLevel>=VERBOSE) {
// 			System.err.print(progrChr);
// 		}
// 	}
// 	
// 	static synchronized public void verboseOutput(String msg) {
// 		if (outputLevel>=VERBOSE) {
// 			System.err.println(msg);
// 		}
// 	}
// 	
// 	static synchronized public void debugOutput(String msg) {
// 		if (outputLevel>=DEBUG) {
// 			System.err.println(msg);
// 		}
// 	}
// 
// 	static synchronized public void errorOutput(String msg) {
// 		if (outputLevel>REALLY_QUIET) {
// 			System.err.println(msg);
// 		}
// 	}
// 	
// 	static synchronized public void printException(Exception e) {
// 		if (outputLevel>REALLY_QUIET) {
// 			System.err.println(e);
// 			e.printStackTrace(System.err);
// 		}
// 	}
// 
// 	static synchronized public void progressChar(char c) {
// 		if (outputLevel>=VERBOSE) {
// 			System.err.print(c);
// 		}
// 	}
// 
// 	static public void setProgressChar(char consoleChar) {
// 		Console.progrChr= consoleChar;
// 	}
// 
// }


// Path: src/net/sourceforge/arbaro/params/AbstractParam.java
import javax.swing.event.*;
import net.sourceforge.arbaro.export.Console;

//  #**************************************************************************
//  #
//  #    Copyright (C) 2003-2006  Wolfram Diestel
//  #
//  #    This program is free software; you can redistribute it and/or modify
//  #    it under the terms of the GNU General Public License as published by
//  #    the Free Software Foundation; either version 2 of the License, or
//  #    (at your option) any later version.
//  #
//  #    This program 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 General Public License for more details.
//  #
//  #    You should have received a copy of the GNU General Public License
//  #    along with this program; if not, write to the Free Software
//  #    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//  #
//  #    Send comments and bug fixes to diestel@steloj.de
//  #
//  #**************************************************************************/

package net.sourceforge.arbaro.params;


public abstract class AbstractParam {
	public static final int GENERAL = -999; // no level - general params
	String name;
	String group;
	int level;
	int order;
	String shortDesc;
	String longDesc;
	boolean enabled;

	protected ChangeEvent changeEvent = null;
	protected EventListenerList listenerList = new EventListenerList();

	public AbstractParam(String nam, String grp, int lev, int ord,
			String sh, String lng) {
		name = nam;
		group = grp;
		level = lev;
		order = ord;
		shortDesc = sh;
		longDesc = lng;
		enabled=true;
	}

	public abstract void setValue(String val) throws ParamException;
	public abstract String getValue();
	public abstract String getDefaultValue();
	public abstract void clear();
	public abstract boolean empty();

	public static boolean loading=false;

	protected void warn(String warning) {

		if (! loading) Console.errorOutput("WARNING: "+warning);
