Interface Window
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface Window

public interface netscape.application.Window
    implements netscape.application.Target
{
    /* Fields
     */
    public final static int BLANK_TYPE;
    public final static String HIDE;
    public final static String SHOW;
    public final static int TITLE_TYPE;

    /* Methods
     */
    public abstract void addSubview(View);
    public abstract Rect bounds();
    public abstract void center();
    public abstract boolean containsDocument(); *Beta API*
    public abstract Size contentSize();
    public abstract void didBecomeCurrentDocument(); *Beta API*
    public abstract void didResignCurrentDocument(); *Beta API*
    public abstract void hide();
    public abstract boolean isCurrentDocument(); *Beta API*
    public abstract boolean isResizable();
    public abstract boolean isVisible();
    public abstract MenuView menuView();
    public abstract Size minSize();
    public abstract void moveBy(int, int);
    public abstract void moveTo(int, int);
    public abstract void moveToBack(); *Beta API*
    public abstract void moveToFront(); *Beta API*
    public abstract WindowOwner owner();
    public abstract void setBounds(int, int, int, int);
    public abstract void setBounds(Rect);
    public abstract void setContainsDocument(boolean); *Beta API*
    public abstract void setMenuView(MenuView);
    public abstract void setMinSize(int, int);
    public abstract void setOwner(WindowOwner);
    public abstract void setResizable(boolean);
    public abstract void setTitle(String);
    public abstract void show();
    public abstract void showModally();
    public abstract void sizeBy(int, int);
    public abstract void sizeTo(int, int);
    public abstract String title();
    public abstract View viewForMouse(int, int);
    public abstract Size windowSizeForContentSize(int, int);
}
Interface implemented by both the InternalWindow and ExternalWindow classes, defining functionality common to the two Window types.
See Also:
InternalWindow, ExternalWindow

Fields

BLANK_TYPE

  public final static int BLANK_TYPE
A Window type that has no title bar or border.

TITLE_TYPE

  public final static int TITLE_TYPE
A Window type that has a title bar and border.

SHOW

  public final static String SHOW
Command that makes the Window visible.

HIDE

  public final static String HIDE
Command that hides the Window.

Methods

contentSize

  public abstract Size contentSize()
Returns the Size defining the Window's content area. Use this Size to properly position and size any View that you plan to add to the Window.

addSubview

  public abstract void addSubview(View aView)
Adds aView to the Window.

show

  public abstract void show()
Displays the Window.

showModally

  public abstract void showModally()
Displays the Window until dismissed by the user. This method will not return until the user closes the Window. While the Window remains visible, no View outside the Window will receive Events.

hide

  public abstract void hide()
Hides the Window.

moveToFront

  public abstract void moveToFront() *Beta API* 
Move the window to the front.

moveToBack

  public abstract void moveToBack() *Beta API* 
Move the window to the back.

isVisible

  public abstract boolean isVisible()
Returns true if the Window is currently visible.

setTitle

  public abstract void setTitle(String aString)
Sets the Window's title, the string displayed in its title bar.

title

  public abstract String title()
Returns the Window's title.
See Also:
setTitle

setOwner

  public abstract void setOwner(WindowOwner anObject)
Sets the Window's owner, the object interested in learning about special events, such as the user closing the Window.

owner

  public abstract WindowOwner owner()
Returns the Window's owner.
See Also:
setOwner

setMenuView

  public abstract void setMenuView(MenuView aMenuView)
Sets the MenuView that will appear along the top edge of the Window.

menuView

  public abstract MenuView menuView()
Returns the MenuView that appears along the top edge of the Window.

viewForMouse

  public abstract View viewForMouse(int x,
                                    int y)
Returns the View containing the point (x, y).

setBounds

  public abstract void setBounds(int x,
                                 int y,
                                 int width,
                                 int height)
Sets the Window's bounds to the rectangle (x, y, width, height).

setBounds

  public abstract void setBounds(Rect newBounds)
Sets the Window's bounds to newBounds.

sizeTo

  public abstract void sizeTo(int width,
                              int height)
Sets the Window's size to (width, height).

sizeBy

  public abstract void sizeBy(int deltaWidth,
                              int deltaHeight)
Changes the Window's size by (deltaWidth, deltaHeight).

moveBy

  public abstract void moveBy(int deltaX,
                              int deltaY)
Changes the Window's location by (deltaX, deltaY).

moveTo

  public abstract void moveTo(int x,
                              int y)
Sets the Window's location to (x, y).

center

  public abstract void center()
Centers the Window.

windowSizeForContentSize

  public abstract Size windowSizeForContentSize(int width,
                                                int height)
Returns the size the Window must be to support a content size of (width, height).

bounds

  public abstract Rect bounds()
Returns a newly-allocated copy of the Window's bounding rectangle, which defines the Window's size and position.

setMinSize

  public abstract void setMinSize(int width,
                                  int height)
Sets the Window's minimum size to (width, height).

minSize

  public abstract Size minSize()
Returns the Window's minimum size. Returns null if not set.

setResizable

  public abstract void setResizable(boolean flag)
Sets whether the user can resize the Window.

isResizable

  public abstract boolean isResizable()
Returns true if the user can resize the Window.
See Also:
setResizable

setContainsDocument

  public abstract void setContainsDocument(boolean containsDocument) *Beta API* 
Sets whether the window contains a document. Windows containing document are treated in a different manner by the target chain.

containsDocument

  public abstract boolean containsDocument() *Beta API* 
Return whether the window contains a document.

didBecomeCurrentDocument

  public abstract void didBecomeCurrentDocument() *Beta API* 
If the window contains a document, this method is called when the window just became the current document.

didResignCurrentDocument

  public abstract void didResignCurrentDocument() *Beta API* 
If the window contains a document, this method is called when the window is no longer the current document.

isCurrentDocument

  public abstract boolean isCurrentDocument() *Beta API* 
Return whether this window is the current document.

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Apr 1997