// file: Constants.java
//

// import java libraries
//
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import java.util.*;
import java.io.*;
import java.lang.*;
import javax.swing.plaf.*;

// class that retrieves the ISIP_TRANSFORM_BUILDER env variable path
//
class EnvSetter {
    public static String setGuiPath() {
	EnvProperties props = new EnvProperties();
	String path = props.run("ISIP_DEVEL");
	if (path.equals("null")) {
	    path = ".";
	}
	return path;
    }
}

// public interface that contains all constants
//
public interface Constants {

    // ---------------------------------------------------
    //
    // declare global constants
    //
    // ---------------------------------------------------

    // temporary.
    public static final String RESOURCES_FILE = new String("/isip/d107/duncan/experiments/isip_recognize_builder/text/resources.txt");

    public static final String GUI_PATH = EnvSetter.setGuiPath();
    public static final String DEFAULT_PATH = new String(GUI_PATH + "/lib/images/isip_transform_builder/icons/");
    public static final String ALGORITHM_DEFAULT = new String(GUI_PATH + "/lib/images/isip_transform_builder/icons/default.gif");
    public static final String ALGORITHM_SMALL_DEFAULT = new String(GUI_PATH + "/lib/images/isip_transform_builder/icons/default.gif");
    public static final String ALGORITHM_LARGE_DEFAULT = new String(GUI_PATH + "/lib/images/isip_transform_builder/icons/default.gif");
    
    public static final String ENTER_IMAGE = new String(GUI_PATH + "/lib/images/isip_transform_builder/special/container_input.gif");
    public static final String EXIT_IMAGE = new String(GUI_PATH + "/lib/images/isip_transform_builder/special/container_output.gif");
    public static final String CONTAINER_IMAGE = new String(GUI_PATH + "/lib/images/isip_transform_builder/special/container.gif");
    public static final String CUSTOM_IMAGE = new String(GUI_PATH + "/lib/images/isip_transform_builder/special/custom.gif");
    public static final String INPUT_IMAGE = new String(GUI_PATH + "/lib/images/isip_transform_builder/special/input.gif");
    public static final String GENERATOR_IMAGE = new String(GUI_PATH + "/lib/images/isip_transform_builder/icons/gen.gif");
    public static final String OUTPUT_IMAGE = new String(GUI_PATH + "/lib/images/isip_transform_builder/special/output.gif");
    public static final String OVERVIEW_FILE = new String(GUI_PATH + "/lib/text/isip_transform_builder/overview.txt");
    public static final String TUTORIAL_FILE = new String(GUI_PATH + "/lib/text/isip_transform_builder/tutorial.txt");

    public static final int WORKAREA_WIDTH = 500;
    public static final int WORKAREA_HEIGHT = 500;
    public static final int HIGHLIGHT_WIDTH = 1;
    public static final int MAX_RESERVED = 4;

    public static final int INIT_START_XLOC = 270;
    public static final int INIT_START_YLOC = 40;
    public static final int INIT_TERM_XLOC = 270;
    public static final int INIT_TERM_YLOC = 500;

    public static final int NONE = -1;
    public static final int SAMPLED_DATA = 0;
    public static final int FEATURE_DATA = 1;
    public static final int ALGORITHM = 2;
    public static final int CONTAINER = 3;

    public static final int INPUT = 4;
    public static final int OUTPUT = 5;
    public static final int CUSTOM = 6;
    
    public static final int GENERATOR_DATA = 7;

    public static final int HELP_WIDTH = 500;    
    public static final int HELP_HEIGHT = 500;
    public static final int VERTEX_WIDTH = 80;    
    public static final int VERTEX_HEIGHT = 35;
    public static final int ICON_WIDTH = 25;    
    public static final int ICON_HEIGHT = 25;
    public static final int CONT_WIDTH = 70;    
    public static final int CONT_HEIGHT = 52;
    public static final int ALGORITHM_WIDTH = 70;    
    public static final int ALGORITHM_HEIGHT = 40;
    public static final int DELTA_WIDTH = 15;
    public static final int MAX_WIDTH = 600;
    public static final int MAX_HEIGHT = 600;
    public static final int ARROW_SIZE = 40;
    public static final int VERTEX_MARGIN = 0;
    public static final int CONT_OFFSET = 100;

    public static final int MAX_FONT_SIZE = 12;
    public static final int COEFF_FONT_SIZE = 12;
         
    public static final Font newFont = new Font("Arial", Font.PLAIN, MAX_FONT_SIZE);

    public static final Font newCoeffFont = new Font("Arial", Font.PLAIN, COEFF_FONT_SIZE);
    /*
    public static final Font newFont = new Font("Helvetica", Font.PLAIN, MAX_FONT_SIZE);

    public static final Font newCoeffFont = new Font("Helvetica", Font.PLAIN, COEFF_FONT_SIZE);
    
    public static final Font newCoeffFont = new Font("Helvetica", Font.PLAIN, COEFF_FONT_SIZE);
    */
    public static final String TRANSFORM_TAG = new String("_transform");
    public static final String BUFFER_TAG = new String("CoefficientLabel");
    public static final String CONTAINER_TAG = new String("AlgorithmContainer");

    public static final String NAME_KEY = new String("name =");
    public static final String TYPE_KEY = new String("type =");
    public static final String VARIABLE_KEY = new String("variable =");
    public static final String WEIGHTED_KEY = new String("weighted = true;");
    public static final String GRAPH_KEY = new String("graph_tag =");

    public static final String COMMENT_TAG = new String("#");
    public static final String LOCATION_KEY = new String("#%");

    public static final String SAMPLED_DATA_STR = new String("SAMPLED_DATA");
    public static final String FEATURE_DATA_STR = new String("FEATURES");
    public static final String GENERATOR_DATA_STR = new String("GENERATOR");    
    public static final String CUSTOM_STR = new String("A");
    public static final String CONTAINER_STR = new String("C");
    public static final String INPUT_STR = new String("INPUT");
    public static final String INPUTGEN_STR = new String("INPUTGEN");
    public static final String OUTPUT_STR = new String("OUTPUT");
    public static final String INTERNAL_STR = new String("INTERNAL");
    public static final String ALGORITHM_STR = new String("ALGORITHM");
    public static final String NONE_STR = new String("NONE");

    public static final String DATA_TAG = new String("@ Data");
    public static final String ALGO_TAG = new String("@ Algorithm");
    public static final String GENERATOR_TAG = new String("@ Generator");
    public static final String ARCS_TAG = new String("arcs =");
    public static final String VERTICES_TAG = new String("vertices =");
    public static final String DIGRAPH_TAG = new String("@ DiGraph<Long> ");

    public static final String SYSTEM = new String("_system");
    public static final String SYSTEM_TARGET = new String("target");
    public static final String SYSTEM_OUTPUT = new String("output_mode");
    public static final String AUDIO_FILE_STR = new String("AUDIO_FILE");
    public static final String SOF_FEATURES_BINARY_STR = new String("SOF_FEATURES_BINARY");

    public static final String ALGORITHM_ICON_BIG = new String("iconBig");
    public static final String ALGORITHM_IMAGE = new String("image");
    public static final String ALGORITHM_TEXT = new String("text");
    public static final String ALGORITHM_BUFF_MODE = new String("buffer_mode");
    public static final String ALGORITHM_CLASS = new String("class");
    public static final String ALGORITHM_PARAM = new String("param");
    public static final String ALGORITHM_NAME = new String("name");
    public static final String ALGORITHM_TAG = new String("algorithm");
    public static final String ALGORITHM_INPUT_BUFF = new String("input_buffer");
    public static final String ALGORITHM_BREAK_00 = new String("};");
    public static final String ALGORITHM_BREAK_01 = new String("}, {");
    public static final String ALGORITHM_BREAK_02 = new String("{");
    public static final String ALGORITHM_STRING = new String("string");
    public static final String ALGORITHM_TRUE = new String("true");
    public static final String ALGORITHM_ENUM = new String("enum");
    public static final String ALGORITHM_ICON_SMALL = new String("iconSmall");

    public static final String HEADER_TAG_00 = new String("@ Sof v1.0 @");
    public static final String HEADER_TAG_01 = new String("@ HiddenMarkovModel 0 @");

    public static final String HEADER_TAG_02 = new String("@ Sdb @");
    public static final String HEADER_TAG_03 = new String("@ FrontEnd @");
    public static final String HEADER_TAG_04 = new String("@ Algorithm @");

    public static final String cutStr = new String("Cut");
    public static final String copyStr = new String("Copy");
    public static final String pasteStr = new String("Paste");

    public static final String fileStr = new String("File");
    public static final String editStr = new String("Edit");
    public static final String coeffStr = new String("Data");
    public static final String algoStr = new String("Algorithms");
    public static final String compStr = new String("Components");
    public static final String helpStr = new String("Help");
    
    public static final String dataStr = new String("Data");
    public static final String openStr = new String("Open");
    public static final String saveStr = new String("Save");
    public static final String saveAsStr = new String("Save As");
    public static final String systemStr = new String("System");
    public static final String sysconfigStr = new String("Configuration");
    public static final String in_Config_Str = new String("input_config");
    public static final String out_Config_Str = new String("output_config");
    public static final String clearStr = new String("New");
    public static final String quitStr = new String("Quit");
    public static final String closeStr = new String("Close");

    public static final String groupStr = new String("Group");
    public static final String labelStr = new String("Label");
    public static final String configStr = new String("Configure");
    public static final String delBlkStr = new String("Delete Component");
    
    public static final String inputStr = new String("Input");
    public static final String outputStr = new String("Output");

    public static final String sampledStr = new String("Sampled Data");
    public static final String featureStr = new String("Features");
    public static final String generatorStr = new String("Generator");
    public static final String sampledInStr = new String("Sampled In");
    public static final String featureInStr = new String("Feature In");
    public static final String generatorInStr = new String("Generator In");
    public static final String sampledOutStr = new String("Sampled Out");
    public static final String featureOutStr = new String("Feature Out");

    public static final String specialStr = new String("Special");
    public static final String customStr = new String("Custom");
    public static final String contStr = new String("Container");
    public static final String insArcStr = new String("Insert Arc");
    public static final String delArcStr = new String("Delete Arc");
    
    public static final String cancelStr = new String("Cancel");
    public static final String updateStr = new String("Update");
    public static final String tutorialStr = new String("Tutorial");
    public static final String overviewStr = new String("Overview");
    public static final String dismissStr = new String("Dismiss");
    public static final String newline = new String("\n");
}

//
// end of file














