de.hillenbrand.jreqtools
Class AbstractRequester

java.lang.Object
  extended by de.hillenbrand.jreqtools.AbstractRequester
Direct Known Subclasses:
OkCancelRequester, ProgressTracker

public abstract class AbstractRequester
extends java.lang.Object

This is the abstract base class for all requesters.

Author:
Markus Hillenbrand

Field Summary
static int CANCEL
           
protected  javax.swing.JDialog dialog
           
protected  java.awt.event.ActionListener listener
           
protected  java.lang.String message
           
static int OK
           
protected  java.lang.String title
           
 
Constructor Summary
AbstractRequester(java.lang.String title, java.lang.String message)
           
 
Method Summary
protected static boolean checkForClass(java.lang.String cname)
           
protected abstract  javax.swing.JDialog createJDialog(java.awt.Window parent)
           
 void enableHelpKey4JavaHelp(javax.help.HelpBroker br, java.lang.String id, javax.help.HelpSet set)
          Enables the help key for Java help on the root panel of the dialog.
 java.awt.Rectangle getBounds()
           
 java.awt.Point getLocation()
           
 java.lang.String getMessage()
          Returns the value of the message property.
protected abstract  int getReturnValue()
           
 java.awt.Dimension getSize()
           
 java.lang.String getTitle()
          Returns the value of the title property.
protected abstract  void prepareForRequest()
          This method is being called directly before the dialog will be shown.
 int request(javax.swing.JDialog parent)
           
 int request(javax.swing.JFrame parent)
           
 void setBounds(int x, int y, int width, int height)
           
 void setBounds(java.awt.Rectangle newBounds)
           
 void setLocation(int x, int y)
           
 void setLocation(java.awt.Point newlocation)
           
 void setMessage(java.lang.String arg)
          Assigns the value of the message property.
 void setParentComponent(javax.swing.JComponent c)
           
 void setSize(java.awt.Dimension newsize)
           
 void setSize(int width, int height)
           
 void setTitle(java.lang.String arg)
          Assigns the value of the title property.
 void showError(java.lang.String s)
          Shows an error to the user.
 void showMessage(java.lang.String s)
          Shows a message to the user.
 void showNotYetImplemented()
          Shows an "Not yet implemented" message to the user.
protected abstract  void windowCloseButtonPressed()
          Will be called if the window's close button has been pressed by the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CANCEL

public static final int CANCEL
See Also:
Constant Field Values

OK

public static final int OK
See Also:
Constant Field Values

listener

protected java.awt.event.ActionListener listener

dialog

protected javax.swing.JDialog dialog

title

protected java.lang.String title

message

protected java.lang.String message
Constructor Detail

AbstractRequester

public AbstractRequester(java.lang.String title,
                         java.lang.String message)
Method Detail

checkForClass

protected static final boolean checkForClass(java.lang.String cname)

createJDialog

protected abstract javax.swing.JDialog createJDialog(java.awt.Window parent)

enableHelpKey4JavaHelp

public void enableHelpKey4JavaHelp(javax.help.HelpBroker br,
                                   java.lang.String id,
                                   javax.help.HelpSet set)
Enables the help key for Java help on the root panel of the dialog. This makes a help set pop up when the user presses F1 (or similar) to get help. Please refer to the JavaHelp documentation for further information.

Parameters:
br - the help broker to use
id - the id to use when opening the help frame
set - the help set to use (null is the default help set)

getBounds

public java.awt.Rectangle getBounds()

getLocation

public java.awt.Point getLocation()

getMessage

public java.lang.String getMessage()
Returns the value of the message property.


getReturnValue

protected abstract int getReturnValue()

getSize

public java.awt.Dimension getSize()

getTitle

public java.lang.String getTitle()
Returns the value of the title property.


prepareForRequest

protected abstract void prepareForRequest()
This method is being called directly before the dialog will be shown.


request

public int request(javax.swing.JDialog parent)

request

public int request(javax.swing.JFrame parent)

setBounds

public void setBounds(java.awt.Rectangle newBounds)

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)

setLocation

public void setLocation(java.awt.Point newlocation)

setLocation

public void setLocation(int x,
                        int y)

setMessage

public void setMessage(java.lang.String arg)
Assigns the value of the message property.


setParentComponent

public void setParentComponent(javax.swing.JComponent c)

setSize

public void setSize(java.awt.Dimension newsize)

setSize

public void setSize(int width,
                    int height)

setTitle

public void setTitle(java.lang.String arg)
Assigns the value of the title property.


showError

public void showError(java.lang.String s)
Shows an error to the user.


showMessage

public void showMessage(java.lang.String s)
Shows a message to the user.


showNotYetImplemented

public void showNotYetImplemented()
Shows an "Not yet implemented" message to the user.


windowCloseButtonPressed

protected abstract void windowCloseButtonPressed()
Will be called if the window's close button has been pressed by the user.