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

org.objectweb.cjdbc.console.gui.objects.DatabaseObject Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.gui.objects.DatabaseObject:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.console.gui.objects.DatabaseObject:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DatabaseObject (String databaseName, String controllerName, boolean isDistributed)
String getIpAdress ()
String getPort ()
String getState ()
void setState (String state)
String getControllerName ()
boolean isDistributed ()
void setDistributed (boolean isDistributed)

Detailed Description

This class defines a DatabaseObject

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 38 of file DatabaseObject.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.gui.objects.DatabaseObject.DatabaseObject String  databaseName,
String  controllerName,
boolean  isDistributed
 

Creates a new ControllerObject object

Parameters:
databaseName the name of the database
controllerName the name of the controller the database belongs to
isDistributed if the database is distributed set to true

Definition at line 52 of file DatabaseObject.java.

00054   {
00055     super();
00056     setText(databaseName);
00057     setName(databaseName);
00058     this.controllerName = controllerName;
00059     this.isDistributed = isDistributed;
00060     setBackground(Color.white);
00061     if (isDistributed)
00062       setIcon(GuiIcons.DATABASE_DISTRIBUTED_ICON);
00063     else
00064       setIcon(GuiIcons.DATABASE_SINGLE_ICON);
00065   }


Member Function Documentation

String org.objectweb.cjdbc.console.gui.objects.DatabaseObject.getControllerName  ) 
 

Returns the controllerName value.

Returns:
Returns the controllerName.

Definition at line 116 of file DatabaseObject.java.

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionShutdownDatabase().

00117   {
00118     return controllerName;
00119   }

String org.objectweb.cjdbc.console.gui.objects.DatabaseObject.getIpAdress  ) 
 

Get ip address of this controller

Returns:
ipAddress

Definition at line 72 of file DatabaseObject.java.

00073   {
00074     return controllerName.substring(0, controllerName.indexOf(':'));
00075   }

String org.objectweb.cjdbc.console.gui.objects.DatabaseObject.getPort  ) 
 

Get port of this controller

Returns:
port

Definition at line 82 of file DatabaseObject.java.

00083   {
00084     return controllerName.substring(controllerName.indexOf(':') + 1);
00085   }

String org.objectweb.cjdbc.console.gui.objects.DatabaseObject.getState  ) 
 

Get the state of the controller

Returns:
state of controller as defined in gui constants , null if unknown

Definition at line 92 of file DatabaseObject.java.

00093   {
00094     return state;
00095   }

boolean org.objectweb.cjdbc.console.gui.objects.DatabaseObject.isDistributed  ) 
 

Returns the isDistributed value.

Returns:
Returns the isDistributed.

Definition at line 126 of file DatabaseObject.java.

00127   {
00128     return isDistributed;
00129   }

void org.objectweb.cjdbc.console.gui.objects.DatabaseObject.setDistributed boolean  isDistributed  ) 
 

Sets the isDistributed value.

Parameters:
isDistributed The isDistributed to set.

Definition at line 136 of file DatabaseObject.java.

00137   {
00138     this.isDistributed = isDistributed;
00139   }

void org.objectweb.cjdbc.console.gui.objects.DatabaseObject.setState String  state  ) 
 

Set state of controller and change its icon

Parameters:
state string description of the state

Definition at line 102 of file DatabaseObject.java.

00103   {
00104     if (state.equals(GuiConstants.CONTROLLER_STATE_UP))
00105       setIcon(GuiIcons.CONTROLLER_READY);
00106     else
00107       setIcon(GuiIcons.CONTROLLER_DOWN);
00108     this.state = state;
00109   }


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