Class ExternalWindow
All Packages Class Hierarchy This Package Previous Next Index
Class ExternalWindow
public class netscape.application.ExternalWindow
extends java.lang.Object
implements netscape.application.Window,
netscape.application.ApplicationObserver
{
/* Constructors
*/
public ExternalWindow();
public ExternalWindow(int);
/* Methods
*/
public void addSubview(View);
public void applicationDidPause(Application);
public void applicationDidResume(Application);
public void applicationDidStart(Application);
public void applicationDidStop(Application);
public Rect bounds();
public void center();
public boolean containsDocument(); *Beta API*
public Size contentSize();
protected FoundationDialog createDialog();
protected FoundationFrame createFrame();
protected FoundationPanel createPanel();
public void currentDocumentDidChange(Application, Window); *Beta API*
public void didBecomeCurrentDocument(); *Beta API*
public void didResignCurrentDocument(); *Beta API*
public void dispose();
public void focusDidChange(Application, View); *Beta API*
public void hide();
public boolean hidesWhenPaused();
public boolean isCurrentDocument(); *Beta API*
public boolean isResizable();
public boolean isVisible();
public Menu menu();
public MenuView menuView();
public Size minSize();
public void moveBy(int, int);
public void moveTo(int, int);
public void moveToBack(); *Beta API*
public void moveToFront(); *Beta API*
public WindowOwner owner();
public FoundationPanel panel();
public void performCommand(String, Object);
public RootView rootView();
public void setBounds(int, int, int, int);
public void setBounds(Rect);
public void setContainsDocument(boolean); *Beta API*
public void setHidesWhenPaused(boolean);
public void setMenu(Menu); *Beta API*
public void setMenuView(MenuView); *Beta API*
public void setMinSize(int, int);
public void setOwner(WindowOwner);
public void setResizable(boolean);
public void setTitle(String);
public void show();
public void showModally();
public void sizeBy(int, int);
public void sizeTo(int, int);
public String title();
public View viewForMouse(int, int);
public Size windowSizeForContentSize(int, int);
}
Object subclass providing a platform-dependent window containing IFC
components. Like InternalWindow, it implements the
Window interface. The following code demonstrates the normal sequence for
creating an ExternalWindow:
window = new ExternalWindow();
windowSize = window.windowSizeForContentSize(contentWidth, contentHeight);
window.sizeTo(windowSize.width, windowSize.height);
window.moveTo(x, y);
window.show();
Constructors
ExternalWindow
public ExternalWindow()
- Constructs an ExternalWindow with a style of Window.TITLE_TYPE.
ExternalWindow
public ExternalWindow(int windowType)
- Constructs an ExternalWindow of type windowType. Creates
the platform-dependent (native) window that will hold the
ExternalWindow's contents, as well as the window's RootView
and AWT Panel. The ExternalWindow does not appear onscreen
until it receives a show() message.
Methods
setTitle
public void setTitle(String aTitle)
- Sets the ExternalWindow's title (the string displayed in its title
bar).
title
public String title()
- Returns the ExternalWindow's title.
- See Also:
- setTitle
show
public void show()
- Displays the ExternalWindow.
- See Also:
- hide
showModally
public void showModally()
- Displays the ExternalWindow until dismissed by the user. This method
will not return until the user closes the Window.
hide
public void hide()
- Hides the ExternalWindow.
- See Also:
- show
isVisible
public boolean isVisible()
- Returns true if the ExternalWindow is currently visible
(is onscreen).
dispose
public void dispose()
- Closes the ExternalWindow and destroys the native window.
setMenu
public void setMenu(Menu aMenu) *Beta API*
- Sets the ExternalWindow's Menu. This is rendered as a native
menu that is created through the AWT Menu API.
- See Also:
- setMenuView
menu
public Menu menu()
- Returns the ExternalWindow's Menu.
- See Also:
- setMenu
setMenuView
public void setMenuView(MenuView aMenuView) *Beta API*
- Sets the MenuView that will appear along the top edge of the Window.
This will be an IFC View-based Menu.
- See Also:
- setMenu
menuView
public MenuView menuView()
- Returns the MenuView that appears along the top edge of the Window.
- See Also:
- setMenuView
rootView
public RootView rootView()
- Returns the RootView that occupies the ExternalWindow.
setOwner
public void setOwner(WindowOwner wOwner)
- Sets the ExternalWindow's owner, the object interested in learning
about special events such as the user closing the ExternalWindow.
owner
public WindowOwner owner()
- Returns the ExternalWindow's owner.
- See Also:
- setOwner
contentSize
public Size contentSize()
- Returns the Size defining the ExternalWindow's content area. Use this
Size to properly position and size any View that you plan to add to the
ExternalWindow.
addSubview
public void addSubview(View aView)
- Adds aView to the ExternalWindow.
setBounds
public void setBounds(int x,
int y,
int width,
int height)
- Sets the Window's bounds to the rectangle (x, y,
width, height). This is the primitive method for
resizing or moving. All the other related methods ultimately call
this one.
setBounds
public void setBounds(Rect newBounds)
- Sets the ExternalWindow's bounds to newBounds.
sizeTo
public void sizeTo(int width,
int height)
- Sets the ExternalWindow's size to (width, height).
sizeBy
public void sizeBy(int deltaWidth,
int deltaHeight)
- Changes the ExternalWindow's size by deltaWidth and
deltaHeight.
moveBy
public void moveBy(int deltaX,
int deltaY)
- Changes the ExternalWindow's location by deltaX and
deltaY.
center
public void center()
- Centers the ExternalWindow (as well as possible for a native window).
moveTo
public void moveTo(int x,
int y)
- Sets the ExternalWindow's origin to (x, y).
windowSizeForContentSize
public Size windowSizeForContentSize(int width,
int height)
- Returns the size the ExternalWindow must be to support a content
size of (width, height).
viewForMouse
public View viewForMouse(int x,
int y)
- Returns the View containing the point (x, y).
setMinSize
public void setMinSize(int width,
int height)
- Sets a minimum size for the ExternalWindow.
Note: The AWT does not appear to support this feature.
minSize
public Size minSize()
- Returns the ExternalWindow's minimum size, if set. Otherwise,
returns null.
bounds
public Rect bounds()
- Returns a newly-allocated copy of the ExternalWindow's bounding
rectangle, which defines the ExternalWindow's size and position.
setResizable
public void setResizable(boolean flag)
- Sets whether the ExternalWindow can be resized by the user.
Throws an error if called when the ExternalWindow is visible.
isResizable
public boolean isResizable()
- Returns true if the user can resize the ExternalWindow.
- See Also:
- setResizable
panel
public FoundationPanel panel()
- Returns the FoundationPanel the ExternalWindow uses to display its
RootView.
setContainsDocument
public 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 boolean containsDocument() *Beta API*
- Return whether the window contains a document.
didBecomeCurrentDocument
public void didBecomeCurrentDocument() *Beta API*
- If the window contains a document, this method is called
when the window just became the current document.
didResignCurrentDocument
public 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 boolean isCurrentDocument() *Beta API*
- Return whether this window is the current document
createDialog
protected FoundationDialog createDialog()
- Creates and returns the ExternalWindow's FoundationDialog.
This method will be called if the ExternalWindow has a title bar
and is being displayed modally.
ExternalWindow subclasses can override this method to provide a
custom FoundationDialog subclass.
- See Also:
- FoundationFrame
createFrame
protected FoundationFrame createFrame()
- Creates and returns the ExternalWindow's FoundationFrame.
This method will be called if the ExternalWindow has a title bar.
ExternalWindow subclasses can override this method to provide a
custom FoundationFrame subclass.
- See Also:
- FoundationFrame
createPanel
protected FoundationPanel createPanel()
- Creates and returns the ExternalWindow's FoundationPanel.
ExternalWindow subclasses can override this method to provide a
custom FoundationPanel subclass.
- See Also:
- FoundationPanel
applicationDidStart
public void applicationDidStart(Application application)
- ApplicationObserver method.
applicationDidStop
public void applicationDidStop(Application application)
- ApplicationObserver method.
focusDidChange
public void focusDidChange(Application application,
View focusedView) *Beta API*
- ApplicationObserver method.
currentDocumentDidChange
public void currentDocumentDidChange(Application application,
Window document) *Beta API*
- ApplicationObserver method.
applicationDidPause
public void applicationDidPause(Application application)
- ApplicationObserver method. If hidesWhenPaused() is true
and the ExternalWindow is visible, hides the ExternalWindow.
- See Also:
- setHidesWhenPaused, applicationDidResume
applicationDidResume
public void applicationDidResume(Application application)
- ApplicationObserver method. If hidesWhenPaused() is true
and the ExternalWindow was visible when the Application paused,
makes the ExternalWindow visible.
- See Also:
- setHidesWhenPaused, applicationDidPause
setHidesWhenPaused
public void setHidesWhenPaused(boolean flag)
- Sets whether the ExternalWindow hides when the Application pauses.
If flag is true, the ExternalWindow's
applicationDidPause() method hides the Window if the Window
is visible. The applicationDidResume() brings the Window
back onscreen.
- See Also:
- applicationDidPause, applicationDidResume
hidesWhenPaused
public boolean hidesWhenPaused()
- Returns true if the ExternalWindow hides when the Application
pauses.
- See Also:
- setHidesWhenPaused
performCommand
public void performCommand(String command,
Object data)
- Implements the ExternalWindow's commands:
- SHOW - calls the ExternalWindow's show() method, causing
the ExternalWindow to appear onscreen.
- HIDE - calls the ExternalWindow's hide() method,
removing the ExternalWindow from the screen.
- See Also:
- show, hide
moveToFront
public void moveToFront() *Beta API*
- Move the window to the front.
moveToBack
public void moveToBack() *Beta API*
- Move the window to the back.
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