com.ccg.swing
Class RStockDialogs

java.lang.Object
  extended by com.ccg.swing.RStockDialogs

public class RStockDialogs
extends Object

Not ready for prime time - please ignore for now.

 class Example {
   public void main(String[] args) {
     com.ccg.swing.RStockDialogs o = new com.ccg.swing.RStockDialogs();
          System.out.println(o);
   }
 }
 

Since:
1.0
Version:
$Revision: 1.3 $
Author:
$Author: pkb $ #see [class][#method]|Text

Constructor Summary
RStockDialogs(Component f)
          Initializes object to...
RStockDialogs(Component f, ResourceBundle rb)
           
 
Method Summary
 JDialog createOKCancel(JComponent parent, JComponent c, String tag)
          Create a OK/cancel Dialog component.
 ResourceBundle getResourceBundle()
          Get the resource bundle to retrieve strings from
 void setResourceBundle(ResourceBundle val)
          Set the resource bundle to retrieve strings from
 void showMessage(String tag, Object[] args)
          Display a simple message dialog based on the resource bundle properties.
 boolean showOKCancel(JComponent c, String tag)
          Create a OK/cancel Dialog component.
 boolean showOKCancel(String tag, Object[] args)
          Display a simple message dialog asking the user a OK/cancel question.
 boolean showYesNo(String tag, Object[] args)
          Display a simple message dialog asking the user a yes/no question.
 int showYesNoCancel(String tag, Object[] args)
          Display a simple message dialog asking the user a yes/no/cancel question.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RStockDialogs

public RStockDialogs(Component f)
Initializes object to... It performs the following tasks:

Since:
1.0 #see [class][#meth]|Text

RStockDialogs

public RStockDialogs(Component f,
                     ResourceBundle rb)
Method Detail

setResourceBundle

public void setResourceBundle(ResourceBundle val)
Set the resource bundle to retrieve strings from

Parameters:
val - New ResourceBundle value to assign.
See Also:
getResourceBundle()

getResourceBundle

public ResourceBundle getResourceBundle()
Get the resource bundle to retrieve strings from

Returns:
Current ResourceBundle value assigned.
See Also:
setResourceBundle(java.util.ResourceBundle)

showMessage

public void showMessage(String tag,
                        Object[] args)
Display a simple message dialog based on the resource bundle properties.

This is a very simple way in which to display a localized message. Using this method, you pass a "tag" value that will be used to look for certain properties in your resource bundle. For example, if you wanted to display a error message, you could use something like "err101" as your tag, then all message information would be retrieved from the associated getResourceBundle. The following properties are recognized:

TAG.text=TEXT
This is used to set the text of your message. If you are passing a non-null array of arguments, it can contain the subsitution values recognized by the MessageFormat class.
TAG.title=String
The title for the frame.
TAG.type=error|info|warn|plain
You can use this to specify the type of message that is being displayed. If omitted or unrecognized, it defaults to "plain". NOTE: This is only available if the "TAG.title" parameter has also been specified.

Note, invoking this method throws up a modal dialog that blocks you until the user press the "OK" button (or however its labeled).

Parameters:
tag - The leading "tag" which is used to look for attributes as described above (must not be null).
args - Pass null here unless you need to have variables subsituted in your "TAG.text" text.
Since:
1.0
See Also:
DialogTest.java, msgs/DialogTest.properties, JOptionPane

showYesNo

public boolean showYesNo(String tag,
                         Object[] args)
Display a simple message dialog asking the user a yes/no question.

This is a very simple way in which to display a localized yes/no question to the user. Using this method, you pass a "tag" value that will be used to look for certain properties in your resource bundle. For example, if you wanted to display a question that had a resource values like:

 q101.text=Are you happy?
 q101.title=Are you happy?
 q101.type=info
 

 

You would specify a "tag" of "q101". The following properties are recognized:

TAG.text=TEXT
This is used to set the text of your message. If you are passing a non-null array of arguments, it can contain the subsitution values recognized by the MessageFormat class.
TAG.title=String
The title for the frame.
TAG.type=error|info|warn|plain
You can use this to specify the type of message that is being displayed. If omitted or unrecognized, it defaults to "plain". NOTE: This is only available if the "TAG.title" parameter has also been specified.

Note, invoking this method throws up a modal dialog that blocks you until the user press responds.

Parameters:
tag - The leading "tag" which is used to look for attributes as described above (must not be null).
args - Pass null here unless you need to have variables subsituted in your "TAG.text" text.
Returns:
true if user selected "Yes" option, false for any other condition.
Since:
1.0
See Also:
DialogTest.java, msgs/DialogTest.properties, JOptionPane

showYesNoCancel

public int showYesNoCancel(String tag,
                           Object[] args)
Display a simple message dialog asking the user a yes/no/cancel question.

This is a very simple way in which to display a localized yes/no/cancel question to the user. Using this method, you pass a "tag" value that will be used to look for certain properties in your resource bundle. For example, if you wanted to display a question that had a resource values like:

 q101.text=Save changes before quitting?
 q101.title=About to Quit
 q101.type=warn
 

 

You would specify a "tag" of "q101". The following properties are recognized:

TAG.text=TEXT
This is used to set the text of your message. If you are passing a non-null array of arguments, it can contain the subsitution values recognized by the MessageFormat class.
TAG.title=String
The title for the frame.
TAG.type=error|info|warn|plain
You can use this to specify the type of message that is being displayed. If omitted or unrecognized, it defaults to "plain". NOTE: This is only available if the "TAG.title" parameter has also been specified.

Note, invoking this method throws up a modal dialog that blocks you until the user press responds.

Parameters:
tag - The leading "tag" which is used to look for attributes as described above (must not be null).
args - Pass null here unless you need to have variables subsituted in your "TAG.text" text.
Returns:
One of the following constants: JOptionPane.YES_OPTION, JOptionPane.NO_OPTION, JOptionPane.CANCEL_OPTION, JOptionPane.CLOSED_OPTION.
Since:
1.0
See Also:
DialogTest.java, msgs/DialogTest.properties, JOptionPane

showOKCancel

public boolean showOKCancel(String tag,
                            Object[] args)
Display a simple message dialog asking the user a OK/cancel question.

This is a very simple way in which to display a localized OK/cancel question to the user. Using this method, you pass a "tag" value that will be used to look for certain properties in your resource bundle. For example, if you wanted to display a question that had a resource values like:

 q101.text=I'd like to transfer all assets to Iceland.
 q101.title=Asset Transfer
 q101.type=warn
 

 

You would specify a "tag" of "q101". The following properties are recognized:

TAG.text=TEXT
This is used to set the text of your message. If you are passing a non-null array of arguments, it can contain the subsitution values recognized by the MessageFormat class.
TAG.title=String
The title for the frame.
TAG.type=error|info|warn|plain
You can use this to specify the type of message that is being displayed. If omitted or unrecognized, it defaults to "plain". NOTE: This is only available if the "TAG.title" parameter has also been specified.

Note, invoking this method throws up a modal dialog that blocks you until the user responds.

Parameters:
tag - The leading "tag" which is used to look for attributes as described above (must not be null).
args - Pass null here unless you need to have variables subsituted in your "TAG.text" text.
Returns:
true if user selected "OK" option, false for any other condition.
Since:
1.0
See Also:
DialogTest.java, msgs/DialogTest.properties, JOptionPane

createOKCancel

public JDialog createOKCancel(JComponent parent,
                              JComponent c,
                              String tag)
Create a OK/cancel Dialog component.

This is a very simple way in which to display a localized OK/cancel question to the user. Using this method, you pass a "tag" value that will be used to look for certain properties in your resource bundle. For example, if you wanted to display a question that had a resource values like:

 q101.text=I'd like to transfer all assets to Iceland.
 q101.title=Asset Transfer
 q101.type=warn
 

 

You would specify a "tag" of "q101". The following properties are recognized:

TAG.text=TEXT
This is used to set the text of your message. If you are passing a non-null array of arguments, it can contain the subsitution values recognized by the MessageFormat class.
TAG.title=String
The title for the frame.
TAG.type=error|info|warn|plain
You can use this to specify the type of message that is being displayed. If omitted or unrecognized, it defaults to "plain". NOTE: This is only available if the "TAG.title" parameter has also been specified.

Note, invoking this method throws up a modal dialog that blocks you until the user responds.

Parameters:
tag - The leading "tag" which is used to look for attributes as described above (must not be null).
args - Pass null here unless you need to have variables subsituted in your "TAG.text" text.
Returns:
true if user selected "OK" option, false for any other condition.
Since:
1.0
See Also:
DialogTest.java, msgs/DialogTest.properties, JOptionPane

showOKCancel

public boolean showOKCancel(JComponent c,
                            String tag)
Create a OK/cancel Dialog component.

This is a very simple way in which to display a localized OK/cancel question to the user. Using this method, you pass a "tag" value that will be used to look for certain properties in your resource bundle. For example, if you wanted to display a question that had a resource values like:

 q101.text=I'd like to transfer all assets to Iceland.
 q101.title=Asset Transfer
 q101.type=warn
 

 

You would specify a "tag" of "q101". The following properties are recognized:

TAG.text=TEXT
This is used to set the text of your message. If you are passing a non-null array of arguments, it can contain the subsitution values recognized by the MessageFormat class.
TAG.title=String
The title for the frame.
TAG.type=error|info|warn|plain
You can use this to specify the type of message that is being displayed. If omitted or unrecognized, it defaults to "plain". NOTE: This is only available if the "TAG.title" parameter has also been specified.

Note, invoking this method throws up a modal dialog that blocks you until the user responds.

Parameters:
tag - The leading "tag" which is used to look for attributes as described above (must not be null).
args - Pass null here unless you need to have variables subsituted in your "TAG.text" text.
Returns:
true if user selected "OK" option, false for any other condition.
Since:
1.0
See Also:
DialogTest.java, msgs/DialogTest.properties, JOptionPane


Copyright 1998-1998-2006 null. All Rights Reserved.