org.qriterium.dogma.gui
Class QueryDialog

java.lang.Object
  extended by org.eclipse.swt.widgets.Dialog
      extended by org.qriterium.dogma.gui.QueryDialog

public class QueryDialog
extends org.eclipse.swt.widgets.Dialog

A Class for creating a dialog that asks for text - input with or without SWT.MULTI - mode. Usage: QueryDialog d = new QueryDialog(new Shell()); String query = d.open("This is the querytext we ask user to input.", boolean foo) where foo is true if you want multiline dialog and false if normal. If user chooses cancel in the process, window returns a "" - string.


Constructor Summary
QueryDialog(org.eclipse.swt.widgets.Shell shell)
           
QueryDialog(org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.graphics.Point location)
           
 
Method Summary
 void addListeners()
           
static void main(java.lang.String[] args)
           
 java.lang.String open(java.lang.String queryText, boolean multiMode)
          Opens the querydialog with given parameters.
 
Methods inherited from class org.eclipse.swt.widgets.Dialog
getParent, getStyle, getText, setText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryDialog

public QueryDialog(org.eclipse.swt.widgets.Shell shell)

QueryDialog

public QueryDialog(org.eclipse.swt.widgets.Shell shell,
                   org.eclipse.swt.graphics.Point location)
Method Detail

main

public static void main(java.lang.String[] args)

open

public java.lang.String open(java.lang.String queryText,
                             boolean multiMode)
Opens the querydialog with given parameters.

Parameters:
queryText - The text asked on the dialog
multiMode - if true, SWT.MULTI is on, otherwise SWT.SINGLE
Returns:
String - object, in which are the contents of the textarea of the dialog.

addListeners

public void addListeners()