org::scilab::modules::gui::events::BlockingResult Class Reference

Collaboration diagram for org::scilab::modules::gui::events::BlockingResult:

Collaboration graph
[legend]

Public Member Functions

String getResult ()
void setResult (String theResult)

Static Public Member Functions

static BlockingResult getInstance ()

Private Member Functions

 BlockingResult ()

Private Attributes

String theResult

Static Private Attributes

static BlockingResult me

Detailed Description

Class use for dialogs that wait for a user input

Author:
Bruno JOFRET

Definition at line 20 of file BlockingResult.java.


Constructor & Destructor Documentation

org::scilab::modules::gui::events::BlockingResult::BlockingResult (  )  [inline, private]

Constructor

Definition at line 29 of file BlockingResult.java.

References theResult.

Referenced by getInstance().

00029                                  {
00030                 theResult = null;
00031         }

Here is the caller graph for this function:


Member Function Documentation

static BlockingResult org::scilab::modules::gui::events::BlockingResult::getInstance (  )  [inline, static]

Get the current instance of BlockingResult

Returns:
this instance

Definition at line 37 of file BlockingResult.java.

References BlockingResult(), and me.

00037                                                    {
00038                 if (me == null) {
00039                         me = new BlockingResult();      
00040                 }
00041                 return me;
00042         }

Here is the call graph for this function:

String org::scilab::modules::gui::events::BlockingResult::getResult (  )  [inline]

Get the user input (wait until it)

Returns:
the user input

Definition at line 48 of file BlockingResult.java.

References me, and theResult.

00048                                   {
00049                 synchronized (me) {
00050                         try {
00051                                 me.wait();
00052                         } catch (InterruptedException e) {
00053                                 // TODO Auto-generated catch block
00054                                 e.printStackTrace();
00055                         }
00056                 }
00057                 return me.theResult;
00058         }

void org::scilab::modules::gui::events::BlockingResult::setResult ( String  theResult  )  [inline]

Set the result for this BlockingResult and notify

Parameters:
theResult the user input to set

Definition at line 64 of file BlockingResult.java.

References me.

00064                                                 {
00065                 this.theResult = theResult;
00066                 synchronized (me) {
00067                         me.notify();
00068                 }
00069         }


Field Documentation

Definition at line 22 of file BlockingResult.java.

Referenced by getInstance(), getResult(), and setResult().

Definition at line 24 of file BlockingResult.java.

Referenced by BlockingResult(), and getResult().


The documentation for this class was generated from the following file:

Generated on Tue Sep 9 18:25:30 2008 for Scilab [trunk] by  doxygen 1.5.5