|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ccg.swing.OkCancelHandler
public class OkCancelHandler
Default implementation of the OkCancelModel interface.
This default implementation for the OkCancelModel
interface should work for most developers. It provides the
following features:
NOTE: It is possible that neither the OK or Cancel button will
indicate that they were pressed (if the user disposed of the window
via the window manaager). Most programmers will treat this as a
"Cancel" action and will use the wasOkPressed() method.
| Constructor Summary | |
|---|---|
OkCancelHandler()
|
|
| Method Summary | |
|---|---|
void |
cancelAction()
Method to invoke if the user chooses the "Cancel" path. |
void |
okAction()
Method to invoke if the user chooses the "OK" path. |
void |
setDisposeOnAction(Window val)
Set the component (typically a dialog box) to "dispose" of when one of the buttons is pressed. |
boolean |
wasCancelPressed()
Get Was the Cancel button pressed by the user? |
boolean |
wasOkPressed()
Get Was the OK button pressed by the user? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OkCancelHandler()
| Method Detail |
|---|
public void setDisposeOnAction(Window val)
val - New Window value to assign.public void okAction()
Once invoked in this fashion, the wasOkPressed method will return true, and any associated component will be disposed of.
okAction in interface OkCancelModelpublic boolean wasOkPressed()
public void cancelAction()
Once invoked in this fashion, the wasCancelPressed method will return true, and any associated component will be disposed of.
cancelAction in interface OkCancelModelpublic boolean wasCancelPressed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||