All Packages Class Hierarchy This Package Previous Next Index
public class netscape.application.InternalWindow
extends netscape.application.View
implements netscape.application.Window,
{
/* Fields
*/
public final static int DEFAULT_LAYER;
public final static int DRAG_LAYER;
public final static int MODAL_LAYER;
public final static int PALETTE_LAYER;
public final static int POPUP_LAYER;
/* Constructors
*/
public InternalWindow();
public InternalWindow(Rect);
public InternalWindow(int, int, int, int);
public InternalWindow(int, int, int, int, int);
/* Methods
*/
public void addSubview(View);
public void addSubviewToWindow(View);
public Border border();
public boolean canBecomeMain();
public void center();
public Size contentSize();
public WindowContentView contentView();
protected Button createCloseButton();
public void decode(Decoder);
public void describeClassInfo(ClassInfo);
public void didBecomeMain();
public void didResignMain();
public void draw(Graphics, Rect);
public void drawBottomBorder();
public void drawTitleBar();
public void drawView(Graphics);
public void encode(Encoder);
public View focusedView();
public void hide();
public boolean isCloseable();
public boolean isMain();
public boolean isPointInBorder(int, int);
public boolean isResizable();
public boolean isTransparent();
public boolean isVisible();
public int layer();
public void layoutParts();
public Size minSize();
public boolean mouseDown(MouseEvent);
public void mouseDragged(MouseEvent);
public void mouseUp(MouseEvent);
public WindowOwner owner();
public void performCommand(String, Object);
public void setBorder(Border);
public void setBounds(int, int, int, int);
public void setCanBecomeMain(boolean);
public void setCloseable(boolean);
public void setFocusedView(View);
public void setLayer(int);
public void setOwner(WindowOwner);
public void setResizable(boolean);
public void setRootView(RootView);
public void setTitle(String);
public void setTransparent(boolean);
public void setType(int);
public void show();
public void showBehind(InternalWindow);
public void showInFrontOf(InternalWindow);
public void showModally();
public void subviewDidResize();
public String title();
public String toString();
public int type();
public View viewForMouse(int, int);
public InternalWindow window();
public Size windowSizeForContentSize(int, int);
}
View subclass implementing "window-like" behavior
found in traditional windowing systems. An InternalWindow can have a
title bar (displaying a text string) by which a user can drag the
InternalWindow around the screen; a close button that the user can click
to make a InternalWindow invisible (remove it from the View hierarchy); and
a resize bar, allowing a user to resize the InternalWindow and its
contents.An InternalWindow has a "contentView," which is the ancestor of all Views added to InternalWindow programmatically. Calling InternalWindow's addSubvew() adds the View to the InternalWindow's contentView rather than directly to the InternalWindow.
You make an InternalWindow visible (add it to the View hierarchy) by calling the show() method, and remove it by calling hide(). Each RootView can contain zero or more InternalWindows, but only one visible InternalWindow can be the Application's "main InternalWindow." The main InternalWindow displays its title bar differently than all other InternalWindows, and represents the InternalWindow in which the user is currently working. The IFC passes key events to the focused View in the current main InternalWindow. InternalWindows containing tool palettes or other sets of controls might never become the main Window because they do not need to receive key events. Sending the message setCanBecomeMain(false) will prevent this.
In general, InternalWindows overlap each other. To ensure that certain InternalWindows never obscure certain others, you can assign InternalWindows to "layers." For example, if you want a tool palette to never be obscured by a document InternalWindow, you can set the tool palette InternalWindow's layer to PALETTE_LAYER, a layer higher than the default InternalWindow layer. Other InternalWindows in the tool palette's layer can obscure each other, but they can never be obscured by InternalWindows in lower layers. The InternalWindow class defines several layers; if needed, you can define your own, but the predefined layers should be enough.
InternalWindow are rectangular regions. If you need to use a View with InternalWindow-like properties (clipping, primarily) but also have it appear non-rectangular, you can make the InternalWindow transparent. A transparent InternalWindow allocates an offscreen buffer to perform its drawing. Unless the InternalWindow's contentView contains Views that draw, the InternalWindow remains completely transparent or invisible (except for the InternalWindow's Border, if set). Clicking and dragging anywhere within the InternalWindow's bounds moves the InternalWindow. You can regulate this movement by overriding the InternalWindow's isPointInBorder() method.
Objects interested in events such as the InternalWindow closing, resizing, and so on, can implement the WindowOwner or InternalWindowOwner interfaces and set themselves as an InternalWindow's owner.
public final static int DEFAULT_LAYER
public final static int PALETTE_LAYER
public final static int MODAL_LAYER
public final static int POPUP_LAYER
public final static int DRAG_LAYER
public InternalWindow()
public InternalWindow(Rect rect)
public InternalWindow(int x,
int y,
int width,
int height)
public InternalWindow(int type,
int x,
int y,
int width,
int height)
public WindowContentView contentView()
public Size contentSize()
public void layoutParts()
public void addSubview(View aView)
public void addSubviewToWindow(View aView)
public void setRootView(RootView rView)
public void show()
public void showModally()
public void showInFrontOf(InternalWindow aWindow)
public void showBehind(InternalWindow aWindow)
public void hide()
public void setCanBecomeMain(boolean flag)
public boolean canBecomeMain()
public boolean isVisible()
public boolean isMain()
protected Button createCloseButton()
public void setCloseable(boolean flag)
public boolean isCloseable()
public void setResizable(boolean flag)
public boolean isResizable()
public Size windowSizeForContentSize(int width,
int height)
public void setTitle(String aString)
public String title()
public void setBorder(Border border)
public Border border()
public void setLayer(int windowLayer)
public int layer()
public Size minSize()
public void setOwner(WindowOwner anObject)
public WindowOwner owner()
public boolean isPointInBorder(int x,
int y)
public View viewForMouse(int x,
int y)
public void setTransparent(boolean flag)
public boolean isTransparent()
public void setType(int windowType)
public int type()
public boolean mouseDown(MouseEvent event)
public void setBounds(int x,
int y,
int width,
int height)
public void subviewDidResize()
public void center()
public void mouseDragged(MouseEvent event)
public void mouseUp(MouseEvent event)
public void drawView(Graphics g)
public void drawTitleBar()
public void drawBottomBorder()
public void draw(Graphics g,
Rect clipRect)
public void didBecomeMain()
public void didResignMain()
public void setFocusedView(View view)
public View focusedView()
public void describeClassInfo(ClassInfo info)
public void encode(Encoder encoder) throws CodingException
public void decode(Decoder decoder) throws CodingException
public String toString()
public InternalWindow window()
public void performCommand(String command,
Object data)
All Packages Class Hierarchy This Package Previous Next Index