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

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

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ControllerObject (String name)
String getIpAdress ()
String getPort ()
String getState ()
void setState (String state)

Detailed Description

This class defines a ControllerObject

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 38 of file ControllerObject.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.gui.objects.ControllerObject.ControllerObject String  name  ) 
 

Creates a new ControllerObject object

Parameters:
name the name of the controller

Definition at line 47 of file ControllerObject.java.

00048   {
00049     super();
00050     setText(name);
00051     setName(name);
00052     setBackground(Color.white);
00053   }


Member Function Documentation

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

Get ip address of this controller

Returns:
ipAddress

Definition at line 60 of file ControllerObject.java.

00061   {
00062     return getName().substring(0, getName().indexOf(':'));
00063   }

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

Get port of this controller

Returns:
port

Definition at line 70 of file ControllerObject.java.

00071   {
00072     return getName().substring(getName().indexOf(':') + 1);
00073   }

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

Get the state of the controller

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

Definition at line 80 of file ControllerObject.java.

00081   {
00082     return state;
00083   }

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

Set state of controller and change its icon

Parameters:
state string description of the state

Definition at line 90 of file ControllerObject.java.

00091   {
00092     if (state.equals(GuiConstants.CONTROLLER_STATE_UP))
00093     {
00094       setIcon(GuiIcons.CONTROLLER_READY);
00095       setEnabled(true);
00096     }
00097     else
00098     {
00099       setIcon(GuiIcons.CONTROLLER_DOWN);
00100       //setEnabled(false);
00101     }
00102     this.state = state;
00103   }


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