@Todo(compatibility=COMPATIBLE, target=VERSION_1_1_2, priority=MINOR, description="This class is almost identical with \'DialogWindow\' from Common, maybe these two classes can be merged?") public class DefaultCustomizationMenu extends AbstractCustomizationMenu
CustomizationMenu
makes use of a JDialog
to show its contents.Constructor and Description |
---|
DefaultCustomizationMenu() |
Modifier and Type | Method and Description |
---|---|
protected javax.swing.JDialog |
createDialog(java.awt.Component owner)
Creates a new dialog with the ancestor window of
owner
as owner. |
protected void |
doClose()
Closes this menu.
|
protected void |
doOpen(int x,
int y,
java.awt.Component content)
Shows this menu.
|
boolean |
isCloseOnFocusLost()
Whether the menu automatically is closed if it loses focus.
|
boolean |
isUndecorated()
Tells whether the
JDialog of this menu is undecorated. |
void |
setCloseOnFocusLost(boolean closeOnFocusLost)
Automatically closes this menu if the dialog loses focus.
|
void |
setUndecorated(boolean undecorated)
Makes the dialog that is used by this menu undecorated.
|
protected java.awt.Rectangle |
validateBounds(java.awt.Rectangle bounds,
java.awt.GraphicsConfiguration configuration)
Should be called before this window is made visible, ensure that the boundaries are valid.
|
close, closed, getCallback, getContent, getController, isOpen, open, setContent, setController
public void setUndecorated(boolean undecorated)
undecorated
- whether to undecorate
the dialogpublic boolean isUndecorated()
JDialog
of this menu is undecorated.Dialog.isUndecorated()
public void setCloseOnFocusLost(boolean closeOnFocusLost)
closeOnFocusLost
- whether to automatically close the menupublic boolean isCloseOnFocusLost()
protected void doOpen(int x, int y, java.awt.Component content)
AbstractCustomizationMenu
Component
content
will never be replaced while the menu is open.doOpen
in class AbstractCustomizationMenu
x
- the preferred x coordinate of the menuy
- the preferred y coordinate of the menucontent
- the content of the menu, not null
protected void doClose()
AbstractCustomizationMenu
CustomizationMenuCallback
required. Subclasses should
not call this method directly, instead they should always call AbstractCustomizationMenu.close()
doClose
in class AbstractCustomizationMenu
protected java.awt.Rectangle validateBounds(java.awt.Rectangle bounds, java.awt.GraphicsConfiguration configuration)
bounds
- the proposed boundariesconfiguration
- the screen on which this window is going to be visible, might be null
null
to indicate that bounds
is validprotected javax.swing.JDialog createDialog(java.awt.Component owner)
owner
as owner.owner
- some component