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();
public Size contentSize();
protected FoundationDialog createDialog();
protected FoundationFrame createFrame();
protected FoundationPanel createPanel();
public void currentDocumentDidChange(Application, Window);
public void didBecomeCurrentDocument();
public void didResignCurrentDocument();
public void dispose();
public void focusDidChange(Application, View);
public void hide();
public boolean hidesWhenPaused();
public boolean isCurrentDocument();
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();
public void moveToFront();
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);
public void setHidesWhenPaused(boolean);
public void setMenu(Menu);
public void setMenuView(MenuView);
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
public void setTitle(String aTitle)
- Sets the ExternalWindow's title (the string displayed in its title
bar).
public String title()
- Returns the ExternalWindow's title.
- See Also:
- setTitle
public void show()
- Displays the ExternalWindow.
- See Also:
- hide
public void showModally()
- Displays the ExternalWindow until dismissed by the user. This method
will not return until the user closes the Window.
public void hide()
- Hides the ExternalWindow.
- See Also:
- show
public boolean isVisible()
- Returns true if the ExternalWindow is currently visible
(is onscreen).
public void dispose()
- Closes the ExternalWindow and destroys the native window.
public void setMenu(Menu aMenu)
- Sets the ExternalWindow's Menu. This is rendered as a native
menu that is created through the AWT Menu API.
- See Also:
- setMenuView
public Menu menu()
- Returns the ExternalWindow's Menu.
- See Also:
- setMenu
public void setMenuView(MenuView aMenuView)
- Sets the MenuView that will appear along the top edge of the Window.
This will be an IFC View-based Menu.
- See Also:
- setMenu
public MenuView menuView()
- Returns the MenuView that appears along the top edge of the Window.
- See Also:
- setMenuView
public RootView rootView()
- Returns the RootView that occupies the ExternalWindow.
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.
public WindowOwner owner()
- Returns the ExternalWindow's owner.
- See Also:
- setOwner
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.
public void addSubview(View aView)
- Adds aView to the ExternalWindow.
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.
public void setBounds(Rect newBounds)
- Sets the ExternalWindow's bounds to newBounds.
public void sizeTo(int width,
int height)
- Sets the ExternalWindow's size to (width, height).
public void sizeBy(int deltaWidth,
int deltaHeight)
- Changes the ExternalWindow's size by deltaWidth and
deltaHeight.
public void moveBy(int deltaX,
int deltaY)
- Changes the ExternalWindow's location by deltaX and
deltaY.
public void center()
- Centers the ExternalWindow (as well as possible for a native window).
public void moveTo(int x,
int y)
- Sets the ExternalWindow's origin to (x, y).
public Size windowSizeForContentSize(int width,
int height)
- Returns the size the ExternalWindow must be to support a content
size of (width, height).
public View viewForMouse(int x,
int y)
- Returns the View containing the point (x, y).
public void setMinSize(int width,
int height)
- Sets a minimum size for the ExternalWindow.
Note: The AWT does not appear to support this feature.
public Size minSize()
- Returns the ExternalWindow's minimum size, if set. Otherwise,
returns null.
public Rect bounds()
- Returns a newly-allocated copy of the ExternalWindow's bounding
rectangle, which defines the ExternalWindow's size and position.
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.
public boolean isResizable()
- Returns true if the user can resize the ExternalWindow.
- See Also:
- setResizable
public FoundationPanel panel()
- Returns the FoundationPanel the ExternalWindow uses to display its
RootView.
public void setContainsDocument(boolean containsDocument)
- Sets whether the window contains a document. Windows containing document
are treated in a different manner by the target chain.
public boolean containsDocument()
- Return whether the window contains a document.
public void didBecomeCurrentDocument()
- If the window contains a document, this method is called
when the window just became the current document.
public void didResignCurrentDocument()
- If the window contains a document, this method is called
when the window is no longer the current document.
public boolean isCurrentDocument()
- Return whether this window is the current document
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
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
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
public void applicationDidStart(Application application)
- ApplicationObserver method.
public void applicationDidStop(Application application)
- ApplicationObserver method.
public void focusDidChange(Application application,
View focusedView)
- ApplicationObserver method.
public void currentDocumentDidChange(Application application,
Window document)
- ApplicationObserver method.
public void applicationDidPause(Application application)
- ApplicationObserver method. If hidesWhenPaused() is true
and the ExternalWindow is visible, hides the ExternalWindow.
- See Also:
- setHidesWhenPaused, 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
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
public boolean hidesWhenPaused()
- Returns true if the ExternalWindow hides when the Application
pauses.
- See Also:
- setHidesWhenPaused
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
public void moveToFront()
- Move the window to the front.
public void moveToBack()
- 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 Oct 1997