public abstract class ToolDialog
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ToolDialog.Restorer |
Modifier and Type | Field and Description |
---|---|
static int |
DIALOG
Mask used for ToolDialog initialization.
|
static int |
FRAME
Mask used for ToolDialog initialization.
|
static int |
FREE
Mask that allows free floating to dialog created with DIALOG mask.
|
static int |
MODAL
Mask that sets default modality (as JDialog.setModal(true)) to dialog created with DIALOG mask that blocks all AWT
frames.
|
static int |
MODAL_APPLICATION
Mask that enables blocking input to all top-level windows from the same Java application except those from its own child hierarchy..
|
static int |
MODAL_DOCUMENT
Mask that enables blocking input to all top-level windows (without any owner) from the same document except those from its own child hierarchy.
|
static int |
MODAL_TOOLKIT
Mask that enables blocking input to all top-level windows run from the same toolkit except those from its own child hierarchy.
|
protected java.awt.Component |
parent
Parent component of this dialog.
|
protected Tool |
tool
Parent tool of this dialog.
|
protected UIFactory |
uif
Factory associated with this dialog instance.
|
Modifier | Constructor and Description |
---|---|
protected |
ToolDialog(java.awt.Component parent,
UIFactory uif,
java.lang.String uiKey)
Create standard ToolDialog.
|
protected |
ToolDialog(java.awt.Component parent,
UIFactory uif,
java.lang.String uiKey,
int type)
Create a ToolDialog with specified type.
|
Modifier and Type | Method and Description |
---|---|
protected void |
disableDefaultDisposeHandler()
By default disposing tool leads closing tool's ToolDialogs.
|
void |
dispose()
Dispose of any window system resources used by the dialog.
|
protected java.awt.Container |
getBody()
Get the component for the main body of the dialog.
|
protected javax.swing.JButton[] |
getButtons()
Get the buttons from the button bar at the bottom of the dialog.
|
protected javax.swing.JButton |
getDefaultButton()
Get the default button from the button bar at the bottom of the dialog.
|
java.awt.Container |
getDialogParent()
Get a parent component for a dialog to use.
|
protected javax.swing.JMenuBar |
getJMenuBar()
Get the menu bar for the dialog.
|
protected java.awt.Point |
getLocation()
Get the location of the dialog.
|
protected ToolDialog.Restorer |
getRestorer() |
protected java.awt.Dimension |
getSize()
Get the size of the dialog.
|
protected java.lang.String |
getTitle()
Get the title for the dialog.
|
Tool |
getTool()
Get the tool for which this is a dialog.
|
protected abstract void |
initGUI()
Initialize the GUI, by calling the various setXXX methods.
|
boolean |
isShowing()
Check if the dialog is currently showing on the screen.
|
boolean |
isVisible()
Check if the dialog is currently showing on the screen.
|
void |
pack()
packs the dialog.
|
protected void |
setBody(java.awt.Container body)
Set the component for the main body of the dialog.
|
protected void |
setButtons(javax.swing.JButton[] buttons,
javax.swing.JButton defaultButton)
Set the buttons to appear in a button bar at the bottom of the dialog.
|
protected void |
setComponentListener(java.awt.event.ComponentListener l)
Set a ComponentListener to be registered on the dialog.
|
protected void |
setDefaultCloseOperation(int operation)
This method add to allow subclasses of ToolDialog to change default close operation.
|
protected void |
setHelp(java.lang.String helpID)
Set the help ID for the dialog.
|
protected void |
setI18NTitle(java.lang.String key)
Specify the title for the dialog.
|
protected void |
setI18NTitle(java.lang.String key,
java.lang.Object arg)
Specify the title for the dialog.
|
protected void |
setI18NTitle(java.lang.String key,
java.lang.Object[] args)
Specify the title for the dialog.
|
protected void |
setJMenuBar(javax.swing.JMenuBar menuBar)
Set the menu bar for the dialog.
|
protected void |
setLocation(int x,
int y)
Set the location of the dialog.
|
protected void |
setLocation(java.awt.Point p)
Set the location of the dialog.
|
protected void |
setRestorer(ToolDialog.Restorer restorer) |
protected void |
setSize(java.awt.Dimension d)
Set the size of the dialog.
|
protected void |
setSize(int width,
int height)
Set the size of the dialog.
|
void |
setTool(java.awt.Component parent) |
protected void |
setTool(Tool t) |
void |
setVisible(boolean b)
Specify whether the dialog should be made visible on the screen or not.
|
protected void |
windowClosingAction(java.awt.AWTEvent e)
this method invokes in Window/JInternalFrame listener (depends on dialog variable
instance).
|
protected final java.awt.Component parent
protected final UIFactory uif
protected Tool tool
public static final int DIALOG
public static final int FRAME
public static final int FREE
FRAME
mask.public static final int MODAL
FRAME
mask.public static final int MODAL_DOCUMENT
Dialog.ModalityType.DOCUMENT_MODAL
,
Constant Field Valuespublic static final int MODAL_APPLICATION
Dialog.ModalityType.APPLICATION_MODAL
,
Constant Field Valuespublic static final int MODAL_TOOLKIT
Dialog.ModalityType.TOOLKIT_MODAL
,
Constant Field Valuesprotected ToolDialog(java.awt.Component parent, UIFactory uif, java.lang.String uiKey)
parent
- The parent component of this dialog.uif
- Factory instance associated with this dialoguiKey
- Key to use to get strings and other properties for this
dialog.protected ToolDialog(java.awt.Component parent, UIFactory uif, java.lang.String uiKey, int type)
public void setTool(java.awt.Component parent)
protected void setTool(Tool t) throws java.lang.IllegalStateException
java.lang.IllegalStateException
public Tool getTool()
public boolean isShowing()
isVisible()
,
setVisible(boolean)
public boolean isVisible()
setVisible(boolean)
public void pack()
setVisible(boolean)
setVisible(boolean)
public void setVisible(boolean b)
b
- True if the dialog should be made visible, false if is should
be made invisible.isVisible()
public void dispose()
public java.awt.Container getDialogParent()
protected abstract void initGUI()
protected java.lang.String getTitle()
setI18NTitle(java.lang.String)
protected void setI18NTitle(java.lang.String key)
key
- key to use to retrieve the dialogs titlegetTitle()
protected void setI18NTitle(java.lang.String key, java.lang.Object arg)
key
- key to use to retrieve the dialogs titlearg
- item to substitute into the title from the resource bundlegetTitle()
protected void setI18NTitle(java.lang.String key, java.lang.Object[] args)
key
- key to use to retrieve the dialogs titleargs
- items to substitute into the title from the resource bundlegetTitle()
protected void setHelp(java.lang.String helpID)
helpID
- the help identifier for this dialogprotected javax.swing.JMenuBar getJMenuBar()
setJMenuBar(javax.swing.JMenuBar)
protected void setJMenuBar(javax.swing.JMenuBar menuBar)
menuBar
- The menu bar for this dialog; should not be null.getJMenuBar()
protected java.awt.Container getBody()
setBody(java.awt.Container)
protected void setBody(java.awt.Container body)
body
- the body container that should be used by this dialoggetBody()
protected javax.swing.JButton[] getButtons()
setButtons(javax.swing.JButton[], javax.swing.JButton)
protected javax.swing.JButton getDefaultButton()
setButtons(javax.swing.JButton[], javax.swing.JButton)
protected void setButtons(javax.swing.JButton[] buttons, javax.swing.JButton defaultButton)
buttons
- buttons to usedefaultButton
- button from the previous argument which should be
used as the defaultgetButtons()
,
getDefaultButton()
protected void setComponentListener(java.awt.event.ComponentListener l)
l
- listener to attach to this componentprotected java.awt.Dimension getSize()
setSize(java.awt.Dimension)
protected void setSize(java.awt.Dimension d)
d
- the new size of this dialoggetSize()
protected void setSize(int width, int height)
width
- the new width of this dialogheight
- the new height of this dialoggetSize()
protected java.awt.Point getLocation()
setLocation(java.awt.Point)
protected void setLocation(java.awt.Point p)
p
- the new location of this dialoggetLocation()
protected void setLocation(int x, int y)
x
- - the x-coordinate of the new location's top-left corner in the parent's coordinate spacey
- - the y-coordinate of the new location's top-left corner in the parent's coordinate spacegetLocation()
protected void setDefaultCloseOperation(int operation)
operation
- one of WindowConstants used by JDialog/JInternalFrame
setDefaultCloseOperation methodprotected void windowClosingAction(java.awt.AWTEvent e)
protected void disableDefaultDisposeHandler()
protected ToolDialog.Restorer getRestorer()
protected void setRestorer(ToolDialog.Restorer restorer)
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.