2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2008 - INRIA
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 package org.scilab.modules.gui.events;
16 * Class use for dialogs that wait for a user input
18 * @author Bruno JOFRET
20 public final class BlockingResult {
22 private static BlockingResult me;
24 private String theResult;
29 private BlockingResult() {
34 * Get the current instance of BlockingResult
35 * @return this instance
37 public static BlockingResult getInstance() {
39 me = new BlockingResult();
45 * Get the user input (wait until it)
46 * @return the user input
48 public String getResult() {
52 } catch (InterruptedException e) {
60 * Set the result for this BlockingResult and notify
61 * @param theResult the user input to set
63 public void setResult(String theResult) {
64 this.theResult = theResult;