net.sourceforge.squirrel_sql.plugins.sqlparam.gui
Class AskParamValueDialog

java.lang.Object
  extended by net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DialogWidget
      extended by net.sourceforge.squirrel_sql.plugins.sqlparam.gui.AskParamValueDialog
All Implemented Interfaces:
IWidget

public class AskParamValueDialog
extends DialogWidget

The dialog to ask the user for a value.

Author:
Thorsten Mürell

Constructor Summary
AskParamValueDialog(String parameter, String oldValue, IApplication application)
          Creates the dialog.
 
Method Summary
 void cancel()
          Cancels the dialog.
 String getValue()
          Gets the value of the input field in this dialog.
 boolean isCancelled()
          If the user doesn't want to input a value, he hits the close button.
 boolean isDone()
           
 boolean isQuotingNeeded()
          Returns if quotes around the value are needed.
 void ok()
          Confirms the dialog.
 void setValue(String defaultValue)
          Sets the value of the dialog.
 
Methods inherited from class net.sourceforge.squirrel_sql.client.gui.desktopcontainer.DialogWidget
addNotify, addWidgetListener, centerWithinDesktop, dispose, fireWidgetClosed, fireWidgetClosing, getAwtContainer, getBounds, getClientProperty, getContentPane, getDelegate, getHeight, getInternalFrame, getRootPane, getSize, getTitle, getWidth, isClosed, isIcon, isToolWindow, isVisible, makeToolWindow, moveToFront, pack, putClientProperty, removeWidgetListener, requestFocus, setBorder, setBounds, setContentPane, setDefaultCloseOperation, setFrameIcon, setLayer, setMaximum, setPreferredSize, setSelected, setSize, setTitle, setVisible, showOk, toFront, updateUI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AskParamValueDialog

public AskParamValueDialog(String parameter,
                           String oldValue,
                           IApplication application)
Creates the dialog.

Parameters:
parameter - The name of the parameter to replace.
oldValue - The old value of the parameter to provide as a default.
application -
Method Detail

isDone

public boolean isDone()
Returns:
true if the dialog is done

isCancelled

public boolean isCancelled()
If the user doesn't want to input a value, he hits the close button. The this method returns true.

Returns:
true if the dialog was cancelled by the user.

setValue

public void setValue(String defaultValue)
Sets the value of the dialog.

Parameters:
defaultValue - the value to set as a default in this dialog.

getValue

public String getValue()
Gets the value of the input field in this dialog.

Returns:
The value for the parameter.

isQuotingNeeded

public boolean isQuotingNeeded()
Returns if quotes around the value are needed.

Returns:
true if quoting is needed.

cancel

public void cancel()
Cancels the dialog.


ok

public void ok()
Confirms the dialog.



Copyright © 2001-2010. All Rights Reserved.