Class awt.Window
All Packages    This Package    Previous    Next

Class awt.Window

java.lang.Object
   |
   +----awt.Component
           |
           +----awt.Container
                   |
                   +----awt.Window

public class Window
extends Container
implements Scrollbarable
Window is a general purpose canvas that can contain other windows.
Version:
1.66 23 Feb 1995
Author:
Sami Shaio

background
Background color for this window
foreground
Foreground color for this window
graphics
Default graphics object for this window.
title

Window(Container, String, Color, int, int)
Create a window that is a child of another window.
Window(Window, String, Color, int, int)
Backward compatibility with alpha1.
Window(Frame, String, Color, int, int)
Backward compatibility with alpha1.

clearClip()
clearRect(int, int, int, int)
clipRect(int, int, int, int)
copyArea(int, int, int, int, int, int)
createImage(DIBitmap)
createImage(DIBitmap, int, int)
disablePointerMotionEvents()
Disables notification of mouse motion without any buttons presed.
dispose()
Disposes of this window and all the components it contains.
disposeImage(Image)
dragAbsolute(int)
drawBytes(byte[], int, int, int, int)
drawChars(char[], int, int, int, int)
drawImage(Image, int, int)
drawLine(int, int, int, int)
drawRect(int, int, int, int)
drawString(String, int, int)
enablePointerMotionEvents()
Enables notification of mouse motion without any buttons presed.
expose(int, int, int, int)
Override this method to repaint only a portion of the window.
fillRect(int, int, int, int)
getFrame()
Returns the top-level window that contains this window.
getMenuBar()
Returns the menubar object useable for this window.
gotFocus()
handleExpose(int, int, int, int)
Callback for exposing a region of a window.
handleKeyPress(int, int, int)
handleKeyPress(char, boolean, int)
handleMouseDown(int, int, int)
handleMouseDrag(int, int, int)
handleMouseEnter(int, int)
handleMouseLeave(int, int)
handleMouseMoved(int, int, int)
handleMouseUp(int, int, int)
handleResize()
Callback to override to take some action when the window is resized.
keyPressed(Event)
Override this method to take some action when a key is pressed in this window.
lineDown()
lineUp()
lostFocus()
map()
Shows this window.
mouseDown(Event)
Override this method to take some action when the mouse is pressed over this window.
mouseDrag(Event)
Override this method to take some action when the mouse is dragged with a button down over the window.
mouseEnter(Event)
Override this method to take some action when the mouse enters this window.
mouseLeave(Event)
Override this method to take some action when the mouse leaves this window.
mouseMoved(Event)
Override this method to take some action when the mouse is moved over the window without any buttons pressed.
mouseUp(Event)
Override this method to take some action when the mouse button is released.
move(int, int)
Moves this window.
pageDown()
pageUp()
paint()
Override this method to repaint the window when needed.
paint3DRect(int, int, int, int, boolean, boolean)
reshape(int, int, int, int)
Reshapes this window.
retrieveDIBitmap(Image)
scrollHorizontally(int)
scrollVertically(int)
scrollWindow(int, int)
setBackground(Color)
setFont(Font)
setForeground(Color)
Sets the foreground color of this component (if applicable).
setMargin(int)
Sets the thickness of the margin in this window.
unMap()
Hides this window.
update()

title
  public String title
background
  public Color background
Background color for this window
foreground
  public Color foreground
Foreground color for this window
graphics
  public Graphics graphics
Default graphics object for this window.

Window
  public Window(Container w,
                String name,
                Color bg,
                int wd,
                int ht)
Create a window that is a child of another window.

Window

  public Window(Window w,
                String name,
                Color bg,
                int wd,
                int ht)
Backward compatibility with alpha1. Takes a Window as a parent instead of a container.

Window

  public Window(Frame w,
                String name,
                Color bg,
                int wd,
                int ht)
Backward compatibility with alpha1. Takes a Frame as a parent instead of a container.

dispose
  public void dispose()
Disposes of this window and all the components it contains.
Overrides:
dispose in class Container

map

  public void map()
Shows this window.
Overrides:
map in class Container

unMap

  public void unMap()
Hides this window.
Overrides:
unMap in class Container

paint

  public void paint()
Override this method to repaint the window when needed.

expose

  public void expose(int x,
                     int y,
                     int w,
                     int h)
Override this method to repaint only a portion of the window.

gotFocus

  public void gotFocus()
lostFocus
  public void lostFocus()
handleExpose
  public synchronized void handleExpose(int x,
                                        int y,
                                        int w,
                                        int h)
Callback for exposing a region of a window. Unless, you don't want this callback to set the clipping region you should only override expose, not handleExpose.
See Also:
expose

handleResize

  public void handleResize()
Callback to override to take some action when the window is resized.

getMenuBar

  public MenuBar getMenuBar()
Returns the menubar object useable for this window.

getFrame

  public Frame getFrame()
Returns the top-level window that contains this window.

handleMouseDown

  public void handleMouseDown(int x,
                              int y,
                              int modifiers)
handleMouseUp
  public void handleMouseUp(int x,
                            int y,
                            int modifiers)
handleMouseDrag
  public void handleMouseDrag(int x,
                              int y,
                              int modifiers)
handleMouseMoved
  public void handleMouseMoved(int x,
                               int y,
                               int modifiers)
handleMouseEnter
  public void handleMouseEnter(int x,
                               int y)
handleMouseLeave
  public void handleMouseLeave(int x,
                               int y)
handleKeyPress
  public void handleKeyPress(int k,
                             int isAscii,
                             int modifiers)
handleKeyPress
  public void handleKeyPress(char k,
                             boolean isAscii,
                             int modifiers)
mouseDrag
  public void mouseDrag(Event e)
Override this method to take some action when the mouse is dragged with a button down over the window.

mouseMoved

  public void mouseMoved(Event e)
Override this method to take some action when the mouse is moved over the window without any buttons pressed. This will only be activated if enablePointerMotionEvents has been called on this window.

mouseDown

  public void mouseDown(Event e)
Override this method to take some action when the mouse is pressed over this window.

mouseUp

  public void mouseUp(Event e)
Override this method to take some action when the mouse button is released.

mouseEnter

  public void mouseEnter(Event e)
Override this method to take some action when the mouse enters this window.

mouseLeave

  public void mouseLeave(Event e)
Override this method to take some action when the mouse leaves this window.

keyPressed

  public void keyPressed(Event e)
Override this method to take some action when a key is pressed in this window.

move

  public void move(int px,
                   int py)
Moves this window.
Overrides:
move in class Container

reshape

  public void reshape(int x,
                      int y,
                      int w,
                      int h)
Reshapes this window.
Overrides:
reshape in class Component

enablePointerMotionEvents

  public void enablePointerMotionEvents()
Enables notification of mouse motion without any buttons presed.

disablePointerMotionEvents

  public void disablePointerMotionEvents()
Disables notification of mouse motion without any buttons presed.

setMargin

  public void setMargin(int margin)
Sets the thickness of the margin in this window.

lineUp

  public void lineUp()
lineDown
  public void lineDown()
pageUp
  public void pageUp()
pageDown
  public void pageDown()
dragAbsolute
  public void dragAbsolute(int value)
scrollVertically
  public boolean scrollVertically(int dy)
scrollHorizontally
  public boolean scrollHorizontally(int dx)
scrollWindow
  public synchronized void scrollWindow(int dx,
                                        int dy)
copyArea
  public void copyArea(int X,
                       int Y,
                       int W,
                       int H,
                       int dx,
                       int dy)
drawImage
  public void drawImage(Image I,
                        int X,
                        int Y)
createImage
  public Image createImage(DIBitmap dib)
createImage
  public Image createImage(DIBitmap dib,
                           int w,
                           int h)
retrieveDIBitmap
  public DIBitmap retrieveDIBitmap(Image im)
disposeImage
  public void disposeImage(Image i)
setFont
  public void setFont(Font f)
setForeground
  public void setForeground(Color c)
Sets the foreground color of this component (if applicable).
Overrides:
setForeground in class Component

setBackground

  public void setBackground(Color c)
clipRect
  public void clipRect(int X,
                       int Y,
                       int W,
                       int H)
clearClip
  public void clearClip()
clearRect
  public void clearRect(int X,
                        int Y,
                        int W,
                        int H)
fillRect
  public void fillRect(int X,
                       int Y,
                       int W,
                       int H)
drawRect
  public void drawRect(int X,
                       int Y,
                       int W,
                       int H)
drawString
  public void drawString(String str,
                         int x,
                         int y)
drawChars
  public void drawChars(char buf[],
                        int offset,
                        int length,
                        int x,
                        int y)
drawBytes
  public void drawBytes(byte buf[],
                        int offset,
                        int length,
                        int x,
                        int y)
drawLine
  public void drawLine(int x1,
                       int y1,
                       int x2,
                       int y2)
See Also:
drawLine

paint3DRect

  public void paint3DRect(int x,
                          int y,
                          int w,
                          int h,
                          boolean fill,
                          boolean raised)
See Also:
paint3DRect

update

  public void update()

All Packages    This Package    Previous    Next