Package ca.cgjennings.platform
Interface QueriedAgnosticDialog
-
- All Superinterfaces:
AgnosticDialog
public interface QueriedAgnosticDialog extends AgnosticDialog
A dialog may implement this instead ofAgnosticDialog
to have more control over how the OK and Cancel buttons are modified.- Author:
- Chris Jennings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
performAgnosticButtonSwap(boolean swapped, javax.swing.JButton newOKButton, javax.swing.JButton newCancelButton)
Called to swap the buttons of this agnostic dialog.-
Methods inherited from interface ca.cgjennings.platform.AgnosticDialog
handleCancelAction, handleOKAction
-
-
-
-
Method Detail
-
performAgnosticButtonSwap
void performAgnosticButtonSwap(boolean swapped, javax.swing.JButton newOKButton, javax.swing.JButton newCancelButton)
Called to swap the buttons of this agnostic dialog. When this interface is used,PlatformSupport.makeAgnosticDialog(ca.cgjennings.platform.AgnosticDialog, javax.swing.JButton, javax.swing.JButton)
will not swap any of the properties of the buttons itself. Instead, it will call this method to allow this to perform the swap itself.PlatformSupport
will still register listeners forAgnosticDialog.handleOKAction(java.awt.event.ActionEvent)
andAgnosticDialog.handleCancelAction(java.awt.event.ActionEvent)
.This method will always be called, even if the buttons are not being swapped from their reported order. This allows the implementer to simply place all initialization code for the buttons in this method, if desired.
- Parameters:
swapped
-true
if the buttons should be swapped based on the order reported toPlatformSupport
newOKButton
- the button that should be made the "OK" buttonnewCancelButton
- the button that should be made the "Cancel" button
-
-