Package xal.smf.data
Class OpticsSwitcher
java.lang.Object
xal.smf.data.OpticsSwitcher
OpticsSwitcher is a provides a view that allows the user to select an optics
file as the default optics.
- Since:
- May 28, 2004
- Author:
- tap
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor which defaults to showing dispose buttonsprotected
OpticsSwitcher
(boolean includeDisposeButtons) Constructorprotected
OpticsSwitcher
(boolean includeDisposeButtons, Runnable disposalHandler) Primary Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet the path to the default optics filestatic OpticsSwitcher
Create an instance with an automatically configured hosting dialogstatic OpticsSwitcher
getInstanceForHostedDialog
(Runnable disposalHandler) Create an instance appropriate for a hosted custom dialogstatic OpticsSwitcher
Create an instance appropriate for a hosted custom framegetView()
Get the view which may optionally be hosted in a custom windowboolean
determine whether the dialog was canceledvoid
reset()
reset editor to the default settingsvoid
setDisposalHandler
(Runnable handler) Set the callback to capture the user cancel and close events.void
showDialogNearOwner
(Dialog owner) Show the dialog near the dialog's ownervoid
showDialogNearOwner
(Frame owner) Show the dialog near the dialog's ownervoid
showDialogWithOwnerNear
(Dialog owner, Component view) Show the dialog near the specified viewvoid
showDialogWithOwnerNear
(Frame owner, Component view) Show the dialog near the specified view
-
Constructor Details
-
OpticsSwitcher
Primary Constructor- Parameters:
includeDisposeButtons
- indicates whether to show cancel and close buttons which are appropriate for a hosting dialogdisposalHandler
- callback for cancel and close events
-
OpticsSwitcher
protected OpticsSwitcher(boolean includeDisposeButtons) Constructor- Parameters:
includeDisposeButtons
- indicates whether to show cancel and close buttons which are appropriate for a hosting dialog
-
OpticsSwitcher
protected OpticsSwitcher()Constructor which defaults to showing dispose buttons
-
-
Method Details
-
getInstance
Create an instance with an automatically configured hosting dialog -
getInstanceForHostedFrame
Create an instance appropriate for a hosted custom frame -
getInstanceForHostedDialog
Create an instance appropriate for a hosted custom dialog -
getView
Get the view which may optionally be hosted in a custom window -
setDisposalHandler
Set the callback to capture the user cancel and close events. Call this method if the view will be hosted in a custom dialog -
reset
public void reset()reset editor to the default settings -
showDialogNearOwner
Show the dialog near the dialog's owner- Parameters:
owner
- window which owns the dialog
-
showDialogWithOwnerNear
Show the dialog near the specified view- Parameters:
owner
- window which owns the dialogview
- the view near which to show this dialog
-
showDialogNearOwner
Show the dialog near the dialog's owner- Parameters:
owner
- window which owns the dialog
-
showDialogWithOwnerNear
Show the dialog near the specified view- Parameters:
owner
- window which owns the dialogview
- the view near which to show this dialog
-
getDefaultOpticsPath
Get the path to the default optics file- Returns:
- the path to the default optics file
-
isCanceled
public boolean isCanceled()determine whether the dialog was canceled
-