public class OpticsSwitcher
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
OpticsSwitcher()
Constructor which defaults to showing dispose buttons
|
protected |
OpticsSwitcher(boolean includeDisposeButtons)
Constructor
|
protected |
OpticsSwitcher(boolean includeDisposeButtons,
java.lang.Runnable disposalHandler)
Primary Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultOpticsPath()
Get the path to the default optics file
|
static OpticsSwitcher |
getInstance()
Create an instance with an automatically configured hosting dialog
|
static OpticsSwitcher |
getInstanceForHostedDialog(java.lang.Runnable disposalHandler)
Create an instance appropriate for a hosted custom dialog
|
static OpticsSwitcher |
getInstanceForHostedFrame()
Create an instance appropriate for a hosted custom frame
|
java.awt.Component |
getView()
Get the view which may optionally be hosted in a custom window
|
boolean |
isCanceled()
determine whether the dialog was canceled
|
void |
reset()
reset editor to the default settings
|
void |
setDisposalHandler(java.lang.Runnable handler)
Set the callback to capture the user cancel and close events.
|
void |
showDialogNearOwner(java.awt.Dialog owner)
Show the dialog near the dialog's owner
|
void |
showDialogNearOwner(java.awt.Frame owner)
Show the dialog near the dialog's owner
|
void |
showDialogWithOwnerNear(java.awt.Dialog owner,
java.awt.Component view)
Show the dialog near the specified view
|
void |
showDialogWithOwnerNear(java.awt.Frame owner,
java.awt.Component view)
Show the dialog near the specified view
|
protected OpticsSwitcher(boolean includeDisposeButtons, java.lang.Runnable disposalHandler)
includeDisposeButtons
- indicates whether to show cancel and close buttons which are appropriate for a hosting dialogdisposalHandler
- callback for cancel and close eventsprotected OpticsSwitcher(boolean includeDisposeButtons)
includeDisposeButtons
- indicates whether to show cancel and close buttons which are appropriate for a hosting dialogprotected OpticsSwitcher()
public static OpticsSwitcher getInstance()
public static OpticsSwitcher getInstanceForHostedFrame()
public static OpticsSwitcher getInstanceForHostedDialog(java.lang.Runnable disposalHandler)
public java.awt.Component getView()
public void setDisposalHandler(java.lang.Runnable handler)
public void reset()
public void showDialogNearOwner(java.awt.Frame owner)
owner
- window which owns the dialogpublic void showDialogWithOwnerNear(java.awt.Frame owner, java.awt.Component view)
owner
- window which owns the dialogview
- the view near which to show this dialogpublic void showDialogNearOwner(java.awt.Dialog owner)
owner
- window which owns the dialogpublic void showDialogWithOwnerNear(java.awt.Dialog owner, java.awt.Component view)
owner
- window which owns the dialogview
- the view near which to show this dialogpublic java.lang.String getDefaultOpticsPath()
public boolean isCanceled()