|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.awt.Dialog
public class Dialog
The Dialog class encapsulates a window that contains components
that accept input from a user. Dialogs differ from other windows classes
in that they are dependent on a Frame object. Actions that affect a Frame
can affect any dialogs associated with the Frame (.ie if a Frame is destroyed,
so are its dialogs).
The dialog may have a title and can be resizable. A dialog can be modal
(blocks user input to other windows until it is closed) or modeless
(does not block user input to other windows). The default LayoutManager
for a dialog is BorderLayout.
Creation:
Field Summary | |
---|---|
protected static boolean |
_cantUseSASModal
|
protected static boolean |
_inApplet
|
protected boolean |
_modal
|
protected boolean |
autoDispose
|
static java.lang.String |
RB_KEY
|
protected java.lang.Object |
READY
|
protected int |
setVisibleCalled
|
protected ModalDispatchThread |
t
|
Constructor Summary | |
---|---|
Dialog(java.awt.Frame parent)
Default constructor |
|
Dialog(java.awt.Frame parent,
java.lang.String title)
Create a dialog with the specified parent and title |
|
Dialog(java.awt.Frame parent,
java.lang.String title,
boolean modal)
Create a dialog with the specified parent,title, and modality |
Method Summary | |
---|---|
void |
center()
Center the dialog on the screen. |
void |
centerOver(java.awt.Component component)
Center the dialog over a component on the screen. |
void |
centerOverWindow(java.awt.Component component)
Center the dialog over a Window on the screen. |
void |
dispose()
|
protected void |
fireReadySignal()
Internal method; only used for SASModal. |
boolean |
getAutoDispose()
Returns the value of the autoDispose property (default value is true). |
static int |
getDefaultHeight()
Returns the default height for instances of this class |
static int |
getDefaultWidth()
Returns the default width for instances of this class |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns the ExtendedBeanInfo for this class. |
java.lang.String |
getText()
Returns the Dialog title |
void |
hide()
Deprecated. |
static boolean |
isSASModalEnabled()
Returns whether modal dialogs use a non-AWT method of approximating modality. |
protected void |
newDispatchThread()
Internal method; only used for SASModal. |
protected void |
processWindowEvent(java.awt.event.WindowEvent e)
Internal method. |
void |
setAutoDispose(boolean autoDispose)
Sets the value of the autoDispose property |
static void |
setDefaultHeight(int newDefaultHeight)
Sets the default height of the component when it is dropped within the IDE |
static void |
setDefaultWidth(int newDefaultWidth)
Sets the default width of the component when it is dropped within the IDE |
void |
setModal(boolean b)
Sets the modal property to the specified boolean state |
void |
setResizable(boolean resizable)
Sets the resizable property to the specified boolean state |
static void |
setSASModalEnabled(boolean nonAWTModal)
Sets whether modal dialogs use a non-AWT method of approximating modality. |
void |
setText(java.lang.String text)
Sets the Dialog title |
void |
setTitle(java.lang.String text)
Sets the Dialog title |
void |
setVisible(boolean visible)
setVisible() is the set accessor method for the Visible attribute. |
void |
setVisible(boolean visible,
boolean doBlock)
This version of setVisible takes a boolean parameter that specifies whether the setVisible call should block until the dialog is no longer visible (standard modal behavior). |
void |
show()
Deprecated. |
protected void |
stopDispatchThread()
Internal method; only used for SASModal. |
void |
waitForReadySignal()
Internal method; only used for SASModal. |
protected void |
waitTilReady(boolean doBlock)
Internal method; only used for SASModal. |
void |
windowActivated(java.awt.event.WindowEvent e)
Part of the implementation of the WindowListener interface. |
void |
windowClosed(java.awt.event.WindowEvent e)
Part of the implementation of the WindowListener interface. |
void |
windowClosing(java.awt.event.WindowEvent e)
Part of the implementation of the WindowListener interface. |
void |
windowDeactivated(java.awt.event.WindowEvent e)
Part of the implementation of the WindowListener interface. |
void |
windowDeiconified(java.awt.event.WindowEvent e)
Part of the implementation of the WindowListener interface. |
void |
windowIconified(java.awt.event.WindowEvent e)
Part of the implementation of the WindowListener interface. |
void |
windowOpened(java.awt.event.WindowEvent e)
Part of the implementation of the WindowListener interface. |
Methods inherited from interface com.sas.awt.ContainerInterface |
---|
getComponents, getLayout, invalidate, setLayout, validate |
Field Detail |
---|
protected boolean autoDispose
protected boolean _modal
protected static boolean _inApplet
protected static boolean _cantUseSASModal
protected transient int setVisibleCalled
protected transient ModalDispatchThread t
protected final java.lang.Object READY
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public Dialog(java.awt.Frame parent)
parent
- the frame that the dialog is associated withpublic Dialog(java.awt.Frame parent, java.lang.String title, boolean modal)
parent
- the frame that the dialog is associated withtitle
- dialog titlemodal
- a boolean indicating whether the dialog is modal or notpublic Dialog(java.awt.Frame parent, java.lang.String title)
parent
- the frame that the dialog is associated withtitle
- dialog titleMethod Detail |
---|
public static boolean isSASModalEnabled()
setSASModalEnabled(boolean)
public static void setSASModalEnabled(boolean nonAWTModal)
nonAWTModal
- true to use the SAS method, false to use AWT modality.isSASModalEnabled()
public static int getDefaultWidth()
setDefaultWidth(int)
public static void setDefaultWidth(int newDefaultWidth)
newDefaultWidth
- the new value to assign to the defaultWidth propertygetDefaultWidth()
public static int getDefaultHeight()
setDefaultHeight(int)
public static void setDefaultHeight(int newDefaultHeight)
newDefaultHeight
- the new value to assign to the defaultHeight propertygetDefaultHeight()
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public void dispose()
dispose
in class java.awt.Window
public void setVisible(boolean visible)
VisualInterface
setVisible
in interface VisualInterface
setVisible
in class DialogVisualComponent
visible
- Whether the component should be visible.VisualInterface.setVisible(boolean)
public void setVisible(boolean visible, boolean doBlock)
public void show()
show
in class java.awt.Dialog
public void hide()
hide
in class java.awt.Dialog
protected void processWindowEvent(java.awt.event.WindowEvent e)
processWindowEvent
in class java.awt.Window
public void waitForReadySignal()
protected void fireReadySignal()
protected void stopDispatchThread()
protected void newDispatchThread()
protected void waitTilReady(boolean doBlock)
public java.lang.String getText()
getText
in interface com.sas.lang.StringDataInterface
public void setModal(boolean b)
setModal
in class java.awt.Dialog
b
- boolean statepublic void setResizable(boolean resizable)
setResizable
in class java.awt.Dialog
state
- boolean statepublic void setText(java.lang.String text)
setText
in interface com.sas.lang.StringDataInterface
title
- Dialog titlepublic void setTitle(java.lang.String text)
setTitle
in class java.awt.Dialog
title
- Dialog titlepublic void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
e
- windowEventpublic void windowClosing(java.awt.event.WindowEvent e)
When the window close button is clicked, the window is destroyed using dispose() and a MessageBoxEvent is sent with the button field as CANCEL.
windowClosing
in interface java.awt.event.WindowListener
e
- windowEventpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
e
- windowEventpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
e
- windowEventpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
e
- windowEventpublic void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
e
- windowEventpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
e
- windowEventpublic void center()
public void centerOver(java.awt.Component component)
component
- componentpublic void centerOverWindow(java.awt.Component component)
public boolean getAutoDispose()
public void setAutoDispose(boolean autoDispose)
autoDispose
- boolean value
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |