001: /*
002: * Constants.java
003: *
004: * Copyright (C) 2002, 2003, 2004, 2005, 2006 Takis Diakoumis
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
019: *
020: */
021:
022: package org.executequery;
023:
024: import java.awt.Color;
025: import java.awt.Dimension;
026: import java.awt.Insets;
027: import javax.swing.UIManager;
028: import org.underworldlabs.swing.plaf.UIUtils;
029:
030: /**
031: *
032: * @author Takis Diakoumis
033: * @version $Revision: 1.6 $
034: * @date $Date: 2006/10/01 00:14:53 $
035: */
036: public interface Constants {
037:
038: public static final String ACTION_CONF_PATH = "org/executequery/actions.xml";
039:
040: //----------------------------
041: // look and feel names
042: //----------------------------
043:
044: public static final String[] LOOK_AND_FEELS = {
045: "Execute Query Default", "Smooth Gradient",
046: "Bumpy Gradient", "Execute Query Theme", "Metal - Classic",
047: "Metal - Ocean (JDK1.5+)", "CDE/Motif", "Windows", "GTK+",
048: "Plugin" };
049:
050: public static final int EQ_DEFAULT_LAF = 0;
051: public static final int SMOOTH_GRADIENT_LAF = 1;
052: public static final int BUMPY_GRADIENT_LAF = 2;
053: public static final int EQ_THM = 3;
054: public static final int METAL_LAF = 4;
055: public static final int OCEAN_LAF = 5;
056: public static final int MOTIF_LAF = 6;
057: public static final int WIN_LAF = 7;
058: public static final int GTK_LAF = 8;
059: public static final int PLUGIN_LAF = 9;
060:
061: //----------------------------
062: // syntax colours and styles
063: //----------------------------
064:
065: /** Recognised syntax types */
066: public static final String[] SYNTAX_TYPES = { "normal", "keyword",
067: "quote", "singlecomment", "multicomment", "number",
068: "operator", "braces", "literal", "braces.match1",
069: "braces.error" };
070:
071: /** The properties file style name prefix */
072: public static final String STYLE_NAME_PREFIX = "sqlsyntax.style.";
073:
074: /** The properties file style colour prefix */
075: public static final String STYLE_COLOUR_PREFIX = "sqlsyntax.colour.";
076:
077: /** The literal 'Plain' */
078: public static final String PLAIN = "Plain";
079: /** The literal 'Italic' */
080: public static final String ITALIC = "Italic";
081: /** The literal 'Bold' */
082: public static final String BOLD = "Bold";
083:
084: /** An empty string */
085: public static final String EMPTY = "";
086:
087: public static final String NEW_LINE_STRING = "\n";
088: public static final String QUOTE_STRING = "'";
089: public static final char QUOTE_CHAR = '\'';
090: public static final char NEW_LINE_CHAR = '\n';
091: public static final char TAB_CHAR = '\t';
092: public static final char COMMA_CHAR = ',';
093:
094: //-------------------------
095: // literal SQL keywords
096: //-------------------------
097: public static final String NULL_LITERAL = "NULL";
098: public static final String TRUE_LITERAL = "TRUE";
099: public static final String FALSE_LITERAL = "FALSE";
100:
101: public static final char[] BRACES = { '(', ')', '{', '}', '[', ']' };
102:
103: public static final String COLOUR_PREFERENCE = "colourPreference";
104:
105: public static final int DEFAULT_FONT_SIZE = 11;
106: public static final Dimension BUTTON_SIZE = new Dimension(75, 26);
107:
108: public static final String[] TRANSACTION_LEVELS = {
109: "TRANSACTION_NONE", "TRANSACTION_READ_UNCOMMITTED",
110: "TRANSACTION_READ_COMMITTED",
111: "TRANSACTION_REPEATABLE_READ", "TRANSACTION_SERIALIZABLE" };
112:
113: // tool tip html tags
114: public static final String TABLE_TAG_START = "<table border='0' cellspacing='0' cellpadding='2'>";
115:
116: public static final String TABLE_TAG_END = "</table>";
117:
118: public static final Insets EMPTY_INSETS = new Insets(0, 0, 0, 0);
119:
120: public static final Dimension FORM_BUTTON_SIZE = new Dimension(100,
121: 25);
122:
123: // Log4J logging levels
124: public static final String[] LOG_LEVELS = { "INFO", "WARN",
125: "DEBUG", "ERROR", "FATAL", "ALL" };
126:
127: /** worker success result */
128: public static final String WORKER_SUCCESS = "success";
129:
130: /** worker fail result */
131: public static final String WORKER_FAIL = "fail";
132:
133: /** worker fail result */
134: public static final String WORKER_CANCEL = "cancel";
135:
136: /** docked tab property keys
137: public static final String[] DOCKED_TAB_KEYS = {
138: ConnectionsTreePanel.PROPERTY_KEY,
139: DriversTreePanel.PROPERTY_KEY,
140: KeywordsDockedPanel.PROPERTY_KEY,
141: SystemOutputPanel.PROPERTY_KEY};
142: */
143:
144: }
|