| java.lang.Object java.awt.Component java.awt.Container java.awt.Window
All known Subclasses: java.awt.Frame, java.awt.Dialog,
Window | public class Window extends Container (Code) | | A Window object is a top-level window with no borders and no
menubar. It could be used to implement a pop-up menu.
The default layout for a window is BorderLayout .
A Window object blocks input to other application
windows when it is shown.
Windows are capable of generating the following window events:
WindowOpened, WindowClosed.
Compatibility
The direct creation of Window objects is an optional feature
in PersonalJava and Personal Profile implementations. If the
implementation prohibits the direct creation of Window objects,
the constructor throws and UnsupportedOperationException .
System Properties
java.awt.SupportsWindow is set to "true"
or "false" indicating if the platform supports direct creation
of window objects.
version: 1.7, 08/19/02 author: Nicholas Allen See Also: WindowEvent See Also: Window.addWindowListener See Also: java.awt.BorderLayout since: JDK1.0 |
Constructor Summary | |
| Window() | public | Window(Frame parent) Constructs a new invisible window.
The window is not initially visible. |
OPENED | final static int OPENED(Code) | | |
addWindowListener | public synchronized void addWindowListener(WindowListener l)(Code) | | Adds the specified window listener to receive window events from
this window.
Parameters: l - the window listener |
constructComponentName | String constructComponentName()(Code) | | Construct a name for this component. Called by getName() when the
name is null.
|
dispose | public void dispose()(Code) | | Disposes of this window. This method must
be called to release the resources that
are used for the window.
since: JDK1.0 |
getFocusOwner | public Component getFocusOwner()(Code) | | Returns the child component of this Window which has focus if and
only if this Window is active.
the component with focus, or null if no children have focusassigned to them. |
getGraphics | public Graphics getGraphics()(Code) | | Creates a graphics context for this component. This method will
return null if this component is currently not on
the screen.
A graphics context for this component, or null if it has none. See Also: java.awt.Component.paint since: JDK1.0 |
getInputContext | synchronized InputContext getInputContext()(Code) | | Gets the input context for this window. A window always has an input context,
which is shared by subcomponents unless they create and set their own.
See Also: Component.getInputContext |
getLocale | public Locale getLocale()(Code) | | Gets the Locale object that is associated
with this window, if the locale has been set.
If no locale has been set, then the default locale
is returned.
the locale that is set for this window. See Also: java.util.Locale since: JDK1.1 |
getWarningString | final public String getWarningString()(Code) | | Gets the warning string that is displayed with this window.
If this window is insecure, the warning string is displayed
somewhere in the visible area of the window. A window is
insecure if there is a security manager, and the security
manager's checkTopLevelWindow method returns
false when this window is passed to it as an
argument.
If the window is secure, then getWarningString
returns null . If the window is insecure, this
method checks for the system property
awt.appletWarning
and returns the string value of that property.
the warning string for this window. See Also: java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object) since: JDK1.0 |
isActive | boolean isActive()(Code) | | |
isLightweightWhenDisplayable | boolean isLightweightWhenDisplayable()(Code) | | |
pack | public void pack()(Code) | | Causes subcomponents of this window to be laid out at their
preferred size.
since: JDK1.0 |
postWindowEvent | synchronized void postWindowEvent(int id)(Code) | | |
processEvent | protected void processEvent(AWTEvent e)(Code) | | Processes events on this window. If the event is an WindowEvent,
it invokes the processWindowEvent method, else it invokes its
superclass's processEvent.
Parameters: e - the event |
processWindowEvent | protected void processWindowEvent(WindowEvent e)(Code) | | Processes window events occurring on this window by
dispatching them to any registered WindowListener objects.
NOTE: This method will not be called unless window events
are enabled for this component; this happens when one of the
following occurs:
a) A WindowListener object is registered via addWindowListener()
b) Window events are enabled via enableEvents()
See Also: Component.enableEvents Parameters: e - the window event |
removeWindowListener | public synchronized void removeWindowListener(WindowListener l)(Code) | | Removes the specified window listener so that it no longer
receives window events from this window.
Parameters: l - the window listener |
repaint | public void repaint(long tm, int x, int y, int width, int height)(Code) | | |
setCursor | public synchronized void setCursor(Cursor cursor)(Code) | | Set the cursor image to a predefined cursor.
cursor One of the constants definedby the Cursor class. If this parameter is nullthen the cursor for this window will be set to the typeCursor.DEFAULT_CURSOR . See Also: java.awt.Component.getCursor See Also: java.awt.Cursor since: JDK1.1 |
show | public void show()(Code) | | Shows this window, and brings it to the front.
If this window is not yet visible, show
makes it visible. If this window is already visible,
then this method brings it to the front.
See Also: java.awt.Window.toFront See Also: java.awt.Component.setVisible since: JDK1.0 |
toBack | public void toBack()(Code) | | Sends this window to the back.
Places this window at the bottom of the stacking order and
makes the corresponding adjustment to other visible windows.
See Also: java.awt.Window.toFront since: JDK1.0 |
toFront | public void toFront()(Code) | | Brings this window to the front.
Places this window at the top of the stacking order and
shows it in front of any other windows.
See Also: java.awt.Window.toBack since: JDK1.0 |
validate | public void validate()(Code) | | |
Methods inherited from java.awt.Container | public Component add(Component comp)(Code)(Java Doc) public Component add(String name, Component comp)(Code)(Java Doc) public Component add(Component comp, int index)(Code)(Java Doc) public void add(Component comp, Object constraints)(Code)(Java Doc) public void add(Component comp, Object constraints, int index)(Code)(Java Doc) public synchronized void addContainerListener(ContainerListener l)(Code)(Java Doc) protected void addImpl(Component comp, Object constraints, int index)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public int countComponents()(Code)(Java Doc) public void deliverEvent(Event e)(Code)(Java Doc) public void doLayout()(Code)(Java Doc) boolean eventEnabled(AWTEvent e)(Code)(Java Doc) public float getAlignmentX()(Code)(Java Doc) public float getAlignmentY()(Code)(Java Doc) public Component getComponent(int n)(Code)(Java Doc) public Component getComponentAt(int x, int y)(Code)(Java Doc) public Component getComponentAt(Point p)(Code)(Java Doc) public int getComponentCount()(Code)(Java Doc) public Component[] getComponents()(Code)(Java Doc) public Insets getInsets()(Code)(Java Doc) public LayoutManager getLayout()(Code)(Java Doc) public Dimension getMaximumSize()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) Window getWindow()(Code)(Java Doc) public Insets insets()(Code)(Java Doc) public void invalidate()(Code)(Java Doc) public boolean isAncestorOf(Component c)(Code)(Java Doc) public void layout()(Code)(Java Doc) void lightweightPrint(Graphics g)(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public Component locate(int x, int y)(Code)(Java Doc) public Dimension minimumSize()(Code)(Java Doc) void nextFocus(Component base)(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintComponents(Graphics g)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) public Dimension preferredSize()(Code)(Java Doc) public void print(Graphics g)(Code)(Java Doc) public void printComponents(Graphics g)(Code)(Java Doc) protected void processContainerEvent(ContainerEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) public void remove(int index)(Code)(Java Doc) public void remove(Component comp)(Code)(Java Doc) public void removeAll()(Code)(Java Doc) public synchronized void removeContainerListener(ContainerListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void setLayout(LayoutManager mgr)(Code)(Java Doc) void transferFocus(Component base)(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) public void validate()(Code)(Java Doc) protected void validateTree()(Code)(Java Doc)
|
Methods inherited from java.awt.Component | public boolean action(Event evt, Object what)(Code)(Java Doc) public synchronized void add(PopupMenu popup)(Code)(Java Doc) public synchronized void addComponentListener(ComponentListener l)(Code)(Java Doc) public synchronized void addFocusListener(FocusListener l)(Code)(Java Doc) public synchronized void addKeyListener(KeyListener l)(Code)(Java Doc) public synchronized void addMouseListener(MouseListener l)(Code)(Java Doc) public synchronized void addMouseMotionListener(MouseMotionListener l)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) boolean areInputMethodsEnabled()(Code)(Java Doc) public Rectangle bounds()(Code)(Java Doc) final void checkEnableNewEventsOnly(Object listener)(Code)(Java Doc) public int checkImage(Image image, ImageObserver observer)(Code)(Java Doc) public int checkImage(Image image, int width, int height, ImageObserver observer)(Code)(Java Doc) protected AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent)(Code)(Java Doc) String constructComponentName()(Code)(Java Doc) public boolean contains(int x, int y)(Code)(Java Doc) public boolean contains(Point p)(Code)(Java Doc) public Image createImage(ImageProducer producer)(Code)(Java Doc) public Image createImage(int width, int height)(Code)(Java Doc) ComponentXWindow createXWindow()(Code)(Java Doc) public void deliverEvent(Event e)(Code)(Java Doc) public void disable()(Code)(Java Doc) final protected void disableEvents(long eventsToDisable)(Code)(Java Doc) final public void dispatchEvent(AWTEvent e)(Code)(Java Doc) void dispatchEventImpl(AWTEvent e)(Code)(Java Doc) public void doLayout()(Code)(Java Doc) public void enable()(Code)(Java Doc) public void enable(boolean b)(Code)(Java Doc) final protected synchronized void enableEvents(long eventsToEnable)(Code)(Java Doc) boolean eventEnabled(AWTEvent e)(Code)(Java Doc) Component findFocusDelegate(Container container)(Code)(Java Doc) public float getAlignmentX()(Code)(Java Doc) public float getAlignmentY()(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public Rectangle getBounds()(Code)(Java Doc) public ColorModel getColorModel()(Code)(Java Doc) public Component getComponentAt(int x, int y)(Code)(Java Doc) public Component getComponentAt(Point p)(Code)(Java Doc) public Cursor getCursor()(Code)(Java Doc) Component getFocusDelegate()(Code)(Java Doc) public Font getFont()(Code)(Java Doc) Component getFontAndColorDelegate()(Code)(Java Doc) public FontMetrics getFontMetrics(Font font)(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public Graphics getGraphics()(Code)(Java Doc) InputContext getInputContext()(Code)(Java Doc) public Locale getLocale()(Code)(Java Doc) public Point getLocation()(Code)(Java Doc) public Point getLocationOnScreen()(Code)(Java Doc) public Dimension getMaximumSize()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public String getName()(Code)(Java Doc) Container getNativeContainer()(Code)(Java Doc) public Container getParent()(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) public Dimension getSize()(Code)(Java Doc) public Toolkit getToolkit()(Code)(Java Doc) final public Object getTreeLock()(Code)(Java Doc) public boolean gotFocus(Event evt, Object what)(Code)(Java Doc) public boolean handleEvent(Event evt)(Code)(Java Doc) public void hide()(Code)(Java Doc) public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)(Code)(Java Doc) public boolean inside(int x, int y)(Code)(Java Doc) public void invalidate()(Code)(Java Doc) static void invokeAndWait(Runnable runnable)(Code)(Java Doc) public boolean isDisplayable()(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isFocusTraversable()(Code)(Java Doc) public boolean isLightweight()(Code)(Java Doc) boolean isLightweightWhenDisplayable()(Code)(Java Doc) public boolean isOpaque()(Code)(Java Doc) public boolean isShowing()(Code)(Java Doc) public boolean isValid()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) public boolean keyDown(Event evt, int key)(Code)(Java Doc) public boolean keyUp(Event evt, int key)(Code)(Java Doc) public void layout()(Code)(Java Doc) void lightweightPrint(Graphics g)(Code)(Java Doc) public void list()(Code)(Java Doc) public void list(PrintStream out)(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public Component locate(int x, int y)(Code)(Java Doc) public Point location()(Code)(Java Doc) public boolean lostFocus(Event evt, Object what)(Code)(Java Doc) public Dimension minimumSize()(Code)(Java Doc) public boolean mouseDown(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseDrag(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseEnter(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseExit(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseMove(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseUp(Event evt, int x, int y)(Code)(Java Doc) public void move(int x, int y)(Code)(Java Doc) public void nextFocus()(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintAll(Graphics g)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) public boolean postEvent(Event e)(Code)(Java Doc) public Dimension preferredSize()(Code)(Java Doc) public boolean prepareImage(Image image, ImageObserver observer)(Code)(Java Doc) public boolean prepareImage(Image image, int width, int height, ImageObserver observer)(Code)(Java Doc) public void print(Graphics g)(Code)(Java Doc) public void printAll(Graphics g)(Code)(Java Doc) protected void processComponentEvent(ComponentEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) protected void processFocusEvent(FocusEvent e)(Code)(Java Doc) protected void processKeyEvent(KeyEvent e)(Code)(Java Doc) protected void processMouseEvent(MouseEvent e)(Code)(Java Doc) protected void processMouseMotionEvent(MouseEvent e)(Code)(Java Doc) public synchronized void remove(MenuComponent popup)(Code)(Java Doc) public synchronized void removeComponentListener(ComponentListener l)(Code)(Java Doc) public synchronized void removeFocusListener(FocusListener l)(Code)(Java Doc) public synchronized void removeKeyListener(KeyListener l)(Code)(Java Doc) public synchronized void removeMouseListener(MouseListener l)(Code)(Java Doc) public synchronized void removeMouseMotionListener(MouseMotionListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void repaint()(Code)(Java Doc) public void repaint(long tm)(Code)(Java Doc) public void repaint(int x, int y, int width, int height)(Code)(Java Doc) public void repaint(long tm, int x, int y, int width, int height)(Code)(Java Doc) public void requestFocus()(Code)(Java Doc) public void reshape(int x, int y, int width, int height)(Code)(Java Doc) public void resize(int width, int height)(Code)(Java Doc) public void resize(Dimension d)(Code)(Java Doc) public void setBackground(Color c)(Code)(Java Doc) public void setBounds(int x, int y, int width, int height)(Code)(Java Doc) public void setBounds(Rectangle r)(Code)(Java Doc) public synchronized void setCursor(Cursor cursor)(Code)(Java Doc) public void setEnabled(boolean b)(Code)(Java Doc) public void setFont(Font f)(Code)(Java Doc) public void setForeground(Color c)(Code)(Java Doc) public void setLocale(Locale l)(Code)(Java Doc) public void setLocation(int x, int y)(Code)(Java Doc) public void setLocation(Point p)(Code)(Java Doc) public void setName(String name)(Code)(Java Doc) public void setSize(int width, int height)(Code)(Java Doc) public void setSize(Dimension d)(Code)(Java Doc) public void setVisible(boolean b)(Code)(Java Doc) public void show()(Code)(Java Doc) public void show(boolean b)(Code)(Java Doc) public Dimension size()(Code)(Java Doc) public String toString()(Code)(Java Doc) public void transferFocus()(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) public void validate()(Code)(Java Doc)
|
|
|