src/org/objectweb/cjdbc/console/gui/constants/GuiConstants.java

説明を見る。
00001 00025 package org.objectweb.cjdbc.console.gui.constants; 00026 00027 import java.awt.Color; 00028 import java.awt.Cursor; 00029 import java.awt.Font; 00030 import java.awt.Point; 00031 import java.awt.Toolkit; 00032 00033 import javax.swing.BorderFactory; 00034 import javax.swing.border.Border; 00035 00036 import org.objectweb.cjdbc.common.i18n.GuiTranslate; 00037 00044 public abstract class GuiConstants 00045 { 00047 public static final String BACKEND_STATE_ENABLED = GuiTranslate.get("gui.backend.enabled"); 00049 public static final String BACKEND_STATE_DISABLED = GuiTranslate.get("gui.backend.disabled"); 00051 public static final String BACKEND_STATE_DISABLING = GuiTranslate.get("gui.backend.disabling"); 00053 public static final String BACKEND_STATE_RESTORE = GuiTranslate.get("gui.backend.restore"); 00055 public static final String BACKEND_STATE_BACKUP =GuiTranslate.get("gui.backend.backup"); 00057 public static final String BACKEND_STATE_RECOVERY = GuiTranslate.get("gui.backend.recovery"); 00059 public static final String BACKEND_STATE_NEW = GuiTranslate.get("gui.backend.new"); 00060 00061 00062 00063 00065 public static final int DEBUG_ALL = 0; 00067 public static final int DEBUG_NO_EXCEPTION_WINDOW = 1; 00069 public static final int DEBUG_INFO = 2; 00071 public static final int DEBUG_NONE = 3; 00073 public static final int DEBUG_LEVEL = DEBUG_ALL; 00074 00076 public static final int MAIN_FRAME_WIDTH = 1024; 00078 public static final int MAIN_FRAME_HEIGHT = 600; 00079 00081 public static final String LIST_CONTROLLER = "ListController"; 00083 public static final String LIST_DATABASE = "ListDatabase"; 00085 public static final String LIST_FILES = "ListFiles"; 00086 00087 00089 public static final String CONTROLLER_STATE_UP = "Controller_UP"; 00091 public static final String CONTROLLER_STATE_DOWN = "Controller_DOWN"; 00093 public static final String CJDBC_URL_DOC = "http://c-jdbc.objectweb.org/current/doc/userGuide/html/userGuide.html"; 00095 public static final String CJDBC_DEFAULT_SESSION_NAME = "session"; 00097 public static final String CJDBC_DEFAULT_SESSION_FILE = CJDBC_DEFAULT_SESSION_NAME 00098 + ".properties"; 00099 00101 public static final Font CENTER_PANE_FONT = new Font("Verdana", 00102 Font.PLAIN, 9); 00103 00107 public static final Font DEFAULT_FONT = new Font("Verdana", 00108 Font.PLAIN, 9); 00109 00113 public static final Color BACKEND_STATE_ENABLED_COLOR = new Color(180, 238, 00114 180); 00118 public static final Color BACKEND_STATE_RECOVERY_COLOR = new Color(255, 211, 00119 155); 00120 00124 public static final Color BACKEND_STATE_DISABLED_COLOR = new Color(238, 180, 00125 180); 00126 00130 public static final Color NICE_COLOR = new Color(99, 184, 00131 255); 00132 00136 public static final Border LOWERED_BORDER = BorderFactory 00137 .createLoweredBevelBorder(); 00141 public static final Border TITLED_BORDER = BorderFactory 00142 .createTitledBorder( 00143 LOWERED_BORDER, 00144 GuiTranslate.get("gui.border.selected")); 00145 00149 public static Cursor customCursor; 00150 00151 private static final Color BACKEND_STATE_NEW_COLOR = new Color(185, 211, 00152 238); 00153 private static final Color BACKEND_STATE_BACKUP_COLOR = new Color(255, 193, 00154 193); 00155 private static final Color BACKEND_STATE_RESTORE_COLOR = new Color(255, 174, 00156 185); 00160 public static final String BACKEND_NO_CHECKPOINT = GuiTranslate.get("gui.backend.no.checkpoint"); 00161 00162 static 00163 { 00164 Toolkit tk = Toolkit.getDefaultToolkit(); 00165 Point p = new Point(0, 0); 00166 try 00167 { 00168 customCursor = tk.createCustomCursor(GuiIcons.CUSTOM_CURSOR_ICON 00169 .getImage(), p, "CustomCursor"); 00170 } 00171 catch (IndexOutOfBoundsException e) 00172 { 00173 // Ignore 00174 } 00175 } 00176 00183 public static final Color getBackendBgColor(String paneName) 00184 { 00185 if (paneName.equals(BACKEND_STATE_ENABLED)) 00186 return BACKEND_STATE_ENABLED_COLOR; 00187 else if (paneName.equals(BACKEND_STATE_DISABLED)) 00188 return BACKEND_STATE_DISABLED_COLOR; 00189 else if (paneName.equals(BACKEND_STATE_RECOVERY)) 00190 return BACKEND_STATE_RECOVERY_COLOR; 00191 else if (paneName.equals(BACKEND_STATE_NEW)) 00192 return BACKEND_STATE_NEW_COLOR; 00193 else if (paneName.equals(BACKEND_STATE_RESTORE)) 00194 return BACKEND_STATE_RESTORE_COLOR; 00195 else if (paneName.equals(BACKEND_STATE_BACKUP)) 00196 return BACKEND_STATE_BACKUP_COLOR; 00197 else 00198 return Color.white; 00199 } 00200 00208 public static final boolean isValidBackendState(String state) 00209 { 00210 if (state.equals(BACKEND_STATE_ENABLED)) 00211 return true; 00212 else if (state.equals(BACKEND_STATE_DISABLED)) 00213 return true; 00214 else if (state.equals(BACKEND_STATE_RESTORE)) 00215 return true; 00216 else if (state.equals(BACKEND_STATE_RECOVERY)) 00217 return true; 00218 else if (state.equals(BACKEND_STATE_BACKUP)) 00219 return true; 00220 else if (state.equals(BACKEND_STATE_NEW)) 00221 return true; 00222 else 00223 return false; 00224 } 00225 00226 }

CJDBCversion1.0.4に対してTue Oct 12 15:15:58 2004に生成されました。 doxygen 1.3.8