|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Window
Interfaces for windows created by WindowCreator. This interface is typically implemented
by JDialog, JFrame or JInternalFrame subclasses, but users can provide other
implementation. For example an application developed on top of the NetBeans platform
may need to provide their own implementation for better integration with their platform.
Instances of Window are created by
WindowCreator.Handler.createWindow(Component, Component, String).
| display/geotk-widgets-swing (download) | View source code for this class |
| Field Summary |
|---|
| Fields inherited from interface WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Method Summary | |
|---|---|
void |
addWindowListener(WindowListener listener)
Adds the specified window listener to receive window events from this window. |
void |
dispose()
Releases the resources used by this window. |
int |
getDefaultCloseOperation()
Returns the default operation that occurs when the user initiates a "close" on this window. |
String |
getTitle()
Returns the current title, or null if none. |
boolean |
isVisible()
Return true if this window is visible. |
void |
removeWindowListener(WindowListener listener)
Removes the specified window listener. |
void |
setDefaultCloseOperation(int operation)
Sets the default operation that occurs when the user initiates a "close" on this window. |
void |
setSize(int width,
int height)
Sets the window size. |
void |
setTitle(String title)
Sets the window title. |
void |
setVisible(boolean visible)
Sets whatever this window should be visible. |
| Method Detail |
|---|
boolean isVisible()
true if this window is visible. The default value on
window creation
is false.
true if this window is visible.Component.isVisible()void setVisible(boolean visible)
WindowCreator.Handler needs an explicit
call to this method in order to be visible.
visible - true for showing this window, or false for hiding it.Component.setVisible(boolean)
void setSize(int width,
int height)
width - The width in pixels.height - The height in pixels.Component.setSize(int, int)String getTitle()
null if none.
null if none.Frame.getTitle(),
JInternalFrame.getTitle()void setTitle(String title)
title - The new title, or null if none.Frame.setTitle(String),
JInternalFrame.setTitle(String)void addWindowListener(WindowListener listener)
listener is null, no exception is thrown and no action is performed.
The listener given to this method shall be tolerant to null WindowEvent
argument value, since it is not guaranteed that the events fired by the actual
window implementation can be converted to WindowEvent in every cases.
listener - the window listener to add.Window.addWindowListener(WindowListener)void removeWindowListener(WindowListener listener)
listener - the window listener to remove.Window.removeWindowListener(WindowListener)int getDefaultCloseOperation()
WindowConstants.DISPOSE_ON_CLOSE.
WindowConstants.JFrame.getDefaultCloseOperation(),
JInternalFrame.getDefaultCloseOperation()void setDefaultCloseOperation(int operation)
WindowConstants.HIDE_ON_CLOSE. In
such case, the caller is responsible for disposing this window
when it is no longer needed.
operation - The operation that will occur when the user closes the window,
as one of the WindowConstants.JFrame.setDefaultCloseOperation(int),
JInternalFrame.setDefaultCloseOperation(int)void dispose()
Window.dispose(),
JInternalFrame.dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||