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.


Field Summary
static int CANCEL
           
protected  HDialog 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  void _checkLocation(javax.swing.JFrame parent, java.awt.Point location, java.awt.Dimension size)
           
protected  void _checkLocation(javax.swing.JInternalFrame parent, java.awt.Point location, java.awt.Dimension size)
           
protected  void _checkSize(javax.swing.JFrame parent, java.awt.Dimension size)
           
protected  void _checkSize(javax.swing.JInternalFrame parent, java.awt.Dimension size)
           
protected static boolean checkForClass(java.lang.String cname)
           
protected abstract  javax.swing.JPanel createContentPane()
           
 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()
           
protected  javax.swing.JButton getDefaultButton()
           
 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.JComponent parent)
          Show the requester.
 int request(javax.swing.JDialog parent)
           
 int request(javax.swing.JFrame parent)
           
 void setBorder(javax.swing.border.Border border)
           
 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 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 setVisible(boolean b)
           
 void showError(java.lang.String text)
           
 void showException(java.lang.Throwable t)
           
 void showMessage(java.lang.String text)
           
 
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 HDialog 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 boolean checkForClass(java.lang.String cname)

createContentPane

protected abstract javax.swing.JPanel createContentPane()

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()

getDefaultButton

protected javax.swing.JButton getDefaultButton()

getLocation

public java.awt.Point getLocation()

getMessage

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

Returns:

getReturnValue

protected abstract int getReturnValue()

getSize

public java.awt.Dimension getSize()

getTitle

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

Returns:

prepareForRequest

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


request

public int request(javax.swing.JComponent parent)
Show the requester.

Parameters:
parent -
Returns:

request

public int request(javax.swing.JDialog parent)

request

public int request(javax.swing.JFrame parent)

setBorder

public void setBorder(javax.swing.border.Border border)

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.

Parameters:
arg -

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.

Parameters:
arg -

setVisible

public void setVisible(boolean b)

showError

public void showError(java.lang.String text)

showException

public void showException(java.lang.Throwable t)

showMessage

public void showMessage(java.lang.String text)

_checkSize

protected void _checkSize(javax.swing.JFrame parent,
                          java.awt.Dimension size)

_checkLocation

protected void _checkLocation(javax.swing.JFrame parent,
                              java.awt.Point location,
                              java.awt.Dimension size)

_checkSize

protected void _checkSize(javax.swing.JInternalFrame parent,
                          java.awt.Dimension size)

_checkLocation

protected void _checkLocation(javax.swing.JInternalFrame parent,
                              java.awt.Point location,
                              java.awt.Dimension size)