Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.console.gui.constants.GuiConstants Class Reference

List of all members.

Static Public Member Functions

final Color getBackendBgColor (String paneName)
final boolean isValidBackendState (String state)
final void centerComponent (Window comp, int width, int height)
final Object convertType (String value, String type)
final String getParameterType (String tmp)

Static Public Attributes

final String BACKEND_STATE_ENABLED
final String BACKEND_STATE_DISABLED
final String BACKEND_STATE_DISABLING
final String BACKEND_STATE_RESTORE
final String BACKEND_STATE_BACKUP
final String BACKEND_STATE_RECOVERY
final String BACKEND_STATE_NEW
final int DEBUG_ALL = 0
final int DEBUG_NO_EXCEPTION_WINDOW = 1
final int DEBUG_INFO = 2
final int DEBUG_NONE = 3
final int DEBUG_LEVEL = DEBUG_ALL
final int MAIN_FRAME_WIDTH = 1024
final int MAIN_FRAME_HEIGHT = 600
final String LIST_CONTROLLER = "ListController"
final String LIST_DATABASE = "ListDatabase"
final String LIST_FILES = "ListFiles"
final String CONTROLLER_STATE_UP = "Controller_UP"
final String CONTROLLER_STATE_DOWN = "Controller_DOWN"
final String CJDBC_URL_DOC = "http://c-jdbc.objectweb.org/current/doc/userGuide/html/userGuide.html"
final String CJDBC_DEFAULT_SESSION_NAME = "session"
final String CJDBC_DEFAULT_SESSION_FILE
final Font CENTER_PANE_FONT
final Font DEFAULT_FONT
final Color BACKEND_STATE_ENABLED_COLOR
final Color BACKEND_STATE_RECOVERY_COLOR
final Color BACKEND_STATE_DISABLED_COLOR
final Color NICE_COLOR
final Border LOWERED_BORDER
final Border LINE_BORDER
final Border TITLED_BORDER
Cursor customCursor
final String BACKEND_NO_CHECKPOINT
final String TABLE_JMX_ATTRIBUTES
final String TABLE_JMX_OPERATIONS

Static Package Functions

 [static initializer]

Detailed Description

This class defines all the GuiConstants

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 46 of file GuiConstants.java.


Member Function Documentation

final void org.objectweb.cjdbc.console.gui.constants.GuiConstants.centerComponent Window  comp,
int  width,
int  height
[static]
 

Centers a new component on the screen

Parameters:
comp the window to center
width the width of the window
height the height of the window

Definition at line 255 of file GuiConstants.java.

00256   {
00257     Toolkit toolkit = Toolkit.getDefaultToolkit();
00258     Dimension dim = toolkit.getScreenSize();
00259     int screenHeight = dim.height;
00260     int screenWidth = dim.width;
00261     int frameWidth = width;
00262     int frameHeight = height;
00263     comp.setSize(width, height);
00264     comp.setBounds((screenWidth - frameWidth) / 2,
00265         (screenHeight - frameHeight) / 2, frameWidth, frameHeight);
00266     comp.validate();
00267   }

final Object org.objectweb.cjdbc.console.gui.constants.GuiConstants.convertType String  value,
String  type
[static]
 

Convert a parameter value depending on its type. Supported types are int and boolean.

Parameters:
value value to convert
type "int" or "boolean"
Returns:
value converted to an Integer or a Boolean object, or value as is for any other type

Definition at line 278 of file GuiConstants.java.

00279   {
00280     if (type.equals("int"))
00281       return new Integer(value);
00282     if (type.equals("boolean"))
00283       return new Boolean(value);
00284     else
00285       return value;
00286   }

final Color org.objectweb.cjdbc.console.gui.constants.GuiConstants.getBackendBgColor String  paneName  )  [static]
 

Get colors for backend panels

Parameters:
paneName name of the panel
Returns:
Color NEVER null

Definition at line 205 of file GuiConstants.java.

00206   {
00207     if (paneName.equals(BACKEND_STATE_ENABLED))
00208       return BACKEND_STATE_ENABLED_COLOR;
00209     else if (paneName.equals(BACKEND_STATE_DISABLED))
00210       return BACKEND_STATE_DISABLED_COLOR;
00211     else if (paneName.equals(BACKEND_STATE_RECOVERY))
00212       return BACKEND_STATE_RECOVERY_COLOR;
00213     else if (paneName.equals(BACKEND_STATE_NEW))
00214       return BACKEND_STATE_NEW_COLOR;
00215     else if (paneName.equals(BACKEND_STATE_RESTORE))
00216       return BACKEND_STATE_RESTORE_COLOR;
00217     else if (paneName.equals(BACKEND_STATE_BACKUP))
00218       return BACKEND_STATE_BACKUP_COLOR;
00219     else
00220       return Color.white;
00221   }

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.getParameterType String  tmp  )  [static]
 

Get the parameter type.

Parameters:
tmp paramter to extract type from
Returns:
the parameter type

Definition at line 294 of file GuiConstants.java.

00295   {
00296     int indexOf = tmp.indexOf(";");
00297     if (indexOf != -1)
00298       tmp = tmp.substring(0, indexOf);
00299     while (tmp.charAt(0) == '[')
00300       tmp = tmp.substring(1) + "[]";
00301     if (tmp.charAt(0) == 'L')
00302       tmp = tmp.substring(1);
00303     if (tmp.indexOf(".") != -1)
00304       tmp = tmp.substring(tmp.lastIndexOf(".") + 1);
00305     return tmp;
00306   }

final boolean org.objectweb.cjdbc.console.gui.constants.GuiConstants.isValidBackendState String  state  )  [static]
 

Test whether the given backend state is a valid state Since all the backend states are defined here, this test method should also be defined here.

Parameters:
state the test to validate
Returns:
true if valid state, false otherwise.

Definition at line 230 of file GuiConstants.java.

00231   {
00232     if (state.equals(BACKEND_STATE_ENABLED))
00233       return true;
00234     else if (state.equals(BACKEND_STATE_DISABLED))
00235       return true;
00236     else if (state.equals(BACKEND_STATE_RESTORE))
00237       return true;
00238     else if (state.equals(BACKEND_STATE_RECOVERY))
00239       return true;
00240     else if (state.equals(BACKEND_STATE_BACKUP))
00241       return true;
00242     else if (state.equals(BACKEND_STATE_NEW))
00243       return true;
00244     else
00245       return false;
00246   }


Member Data Documentation

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_NO_CHECKPOINT [static]
 

Initial value:

 GuiTranslate
                                                              .get("gui.backend.no.checkpoint")
Do not use any checkpoint for enable or disable of a backend

Definition at line 174 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_BACKUP [static]
 

Initial value:

 GuiTranslate
                                                              .get("gui.backend.backup")
Backend state backup

Definition at line 61 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_DISABLED [static]
 

Initial value:

 GuiTranslate
                                                              .get("gui.backend.disabled")
Backend state disabled

Definition at line 52 of file GuiConstants.java.

final Color org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_DISABLED_COLOR [static]
 

Initial value:

 new Color(238, 180,
                                                              180)
Final Color for backend state disabled

Definition at line 130 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_DISABLING [static]
 

Initial value:

 GuiTranslate
                                                              .get("gui.backend.disabling")
Backend state disabling

Definition at line 55 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_ENABLED [static]
 

Initial value:

 GuiTranslate
                                                              .get("gui.backend.enabled")
Backend state enabled

Definition at line 49 of file GuiConstants.java.

final Color org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_ENABLED_COLOR [static]
 

Initial value:

 new Color(180, 238,
                                                              180)
Final Color for backend state enabled

Definition at line 119 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_NEW [static]
 

Initial value:

 GuiTranslate
                                                              .get("gui.backend.new")
Backend state new

Definition at line 67 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_RECOVERY [static]
 

Initial value:

 GuiTranslate
                                                              .get("gui.backend.recovery")
Backend state recovery

Definition at line 64 of file GuiConstants.java.

final Color org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_RECOVERY_COLOR [static]
 

Initial value:

 new Color(255, 211,
                                                              155)
Final Color for backend state recovery

Definition at line 124 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.BACKEND_STATE_RESTORE [static]
 

Initial value:

 GuiTranslate
                                                              .get("gui.backend.restore")
Backend state restore

Definition at line 58 of file GuiConstants.java.

final Font org.objectweb.cjdbc.console.gui.constants.GuiConstants.CENTER_PANE_FONT [static]
 

Initial value:

 new Font("Verdana",
                                                              Font.PLAIN, 9)
Font used for the center panel

Definition at line 107 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.CJDBC_DEFAULT_SESSION_FILE [static]
 

Initial value:

 CJDBC_DEFAULT_SESSION_NAME
                                                              + ".properties"
Default save session file

Definition at line 103 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.CJDBC_DEFAULT_SESSION_NAME = "session" [static]
 

Default save session file

Definition at line 101 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.CJDBC_URL_DOC = "http://c-jdbc.objectweb.org/current/doc/userGuide/html/userGuide.html" [static]
 

URL to the help of CJDBC

Definition at line 99 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.CONTROLLER_STATE_DOWN = "Controller_DOWN" [static]
 

Controller state down

Definition at line 97 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.CONTROLLER_STATE_UP = "Controller_UP" [static]
 

Controller state up

Definition at line 95 of file GuiConstants.java.

Cursor org.objectweb.cjdbc.console.gui.constants.GuiConstants.customCursor [static]
 

Default Custom Cursor for drags

Definition at line 163 of file GuiConstants.java.

final int org.objectweb.cjdbc.console.gui.constants.GuiConstants.DEBUG_ALL = 0 [static]
 

Debug Level All

Definition at line 71 of file GuiConstants.java.

final int org.objectweb.cjdbc.console.gui.constants.GuiConstants.DEBUG_INFO = 2 [static]
 

Debug level info

Definition at line 75 of file GuiConstants.java.

final int org.objectweb.cjdbc.console.gui.constants.GuiConstants.DEBUG_LEVEL = DEBUG_ALL [static]
 

Level of output of the debug

Definition at line 79 of file GuiConstants.java.

final int org.objectweb.cjdbc.console.gui.constants.GuiConstants.DEBUG_NO_EXCEPTION_WINDOW = 1 [static]
 

Debug level all but do not show exception window

Definition at line 73 of file GuiConstants.java.

final int org.objectweb.cjdbc.console.gui.constants.GuiConstants.DEBUG_NONE = 3 [static]
 

No Debug

Definition at line 77 of file GuiConstants.java.

final Font org.objectweb.cjdbc.console.gui.constants.GuiConstants.DEFAULT_FONT [static]
 

Initial value:

 new Font("Verdana",
                                                              Font.PLAIN, 9)
Default Font

Definition at line 113 of file GuiConstants.java.

final Border org.objectweb.cjdbc.console.gui.constants.GuiConstants.LINE_BORDER [static]
 

Initial value:

 BorderFactory
                                                              .createLineBorder(Color.BLACK)
Line border

Definition at line 148 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.LIST_CONTROLLER = "ListController" [static]
 

Component Name for the list of controllers

Definition at line 87 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.LIST_DATABASE = "ListDatabase" [static]
 

Component Name for the list of databases

Definition at line 90 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.LIST_FILES = "ListFiles" [static]
 

Component Name for the files list

Definition at line 92 of file GuiConstants.java.

final Border org.objectweb.cjdbc.console.gui.constants.GuiConstants.LOWERED_BORDER [static]
 

Initial value:

 BorderFactory
                                                              .createLoweredBevelBorder()
Lowered border

Definition at line 142 of file GuiConstants.java.

final int org.objectweb.cjdbc.console.gui.constants.GuiConstants.MAIN_FRAME_HEIGHT = 600 [static]
 

Main gui frame height

Definition at line 84 of file GuiConstants.java.

final int org.objectweb.cjdbc.console.gui.constants.GuiConstants.MAIN_FRAME_WIDTH = 1024 [static]
 

Main frame width

Definition at line 82 of file GuiConstants.java.

final Color org.objectweb.cjdbc.console.gui.constants.GuiConstants.NICE_COLOR [static]
 

Initial value:

 new Color(99, 184,
                                                              255)
Nice color

Definition at line 136 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.TABLE_JMX_ATTRIBUTES [static]
 

Initial value:

 GuiTranslate
                                                              .get("table.jmx.attributes")
JMX attributes table

Definition at line 178 of file GuiConstants.java.

final String org.objectweb.cjdbc.console.gui.constants.GuiConstants.TABLE_JMX_OPERATIONS [static]
 

Initial value:

 GuiTranslate
                                                              .get("table.jmx.operations")
JMX operations table

Definition at line 181 of file GuiConstants.java.

final Border org.objectweb.cjdbc.console.gui.constants.GuiConstants.TITLED_BORDER [static]
 

Initial value:

 BorderFactory
                                                              .createTitledBorder(
                                                                  LOWERED_BORDER,
                                                                  GuiTranslate
                                                                      .get("gui.border.selected"))
Titled border

Definition at line 154 of file GuiConstants.java.


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:02:19 2005 for C-JDBC by  doxygen 1.3.9.1