Class RootView
All Packages Class Hierarchy This Package Previous Next Index
Class RootView
public class netscape.application.RootView
extends netscape.application.View
implements netscape.application.EventProcessor,
netscape.application.ExtendedTarget
{
/* Constructors
*/
public RootView();
public RootView(Rect);
public RootView(int, int, int, int);
/* Methods
*/
public boolean canBecomeSelectedView();
public boolean canPerformCommand(String);
public Color color();
public ColorChooser colorChooser();
public int cursor();
public View defaultSelectedView();
public void draw(Graphics, Rect);
public synchronized void drawDirtyViews();
public void drawView(Graphics);
public ExternalWindow externalWindow();
public View focusedView();
public FontChooser fontChooser();
public Image image();
public int imageDisplayStyle();
public Vector internalWindows();
public boolean isTransparent();
public boolean isVisible();
public InternalWindow mainWindow();
public boolean mouseDown(MouseEvent);
public Point mousePoint();
public View mouseView();
public FoundationPanel panel();
public void performCommand(String, Object);
public void processEvent(Event);
public void redraw(Rect);
public void removeOverrideCursor();
public synchronized void resetDirtyViews();
public RootView rootView();
public void selectView(View, boolean);
public void selectViewAfter(View);
public void selectViewBefore(View);
public void setColor(Color);
public void setDefaultSelectedView(View);
public void setFocusedView(View);
public void setImage(Image);
public void setImageDisplayStyle(int);
public void setMouseView(View);
public void setOverrideCursor(int);
public void showColorChooser();
public void showFontChooser();
public void updateCursor();
public void updateCursorLater();
public boolean viewExcludedFromModalSession(View);
public View viewForMouse(int, int);
}
View subclass that functions as the top level View of the Applet frame
or ExternalWindow. It displays a Color and/or an Image (tiled, centered,
or scaled). All other Applet Views and InternalWindows are descendants
of the RootView.You will rarely need to work with your
Applet's RootView. You will never instantiate a RootView
directly.
Constructors
.RootView
public RootView()
- Constructs a RootView with origin (0, 0) and zero
width and height.
.RootView
public RootView(Rect rect)
- Constructs a RootView with bounds rect.
.RootView
public RootView(int x,
int y,
int width,
int height)
- Constructs a RootView with
bounds (x, y, width, height)
Methods
public Vector internalWindows()
- Returns the Vector containing all InternalWindows currently displayed
in the RootView. Do not modify this Vector.
public InternalWindow mainWindow()
- Returns the Application's main InternalWindow. The main InternalWindow
represents the InternalWindow the user is currently working with, and
displays its title bar differently than all other InternalWindows. The
IFC passes key Events to the View in the main InternalWindow that has
requested to receive them.
- See Also:
- InternalWindow
public void setMouseView(View aView)
- If called after a MOUSE_DOWN or MOUSE_DRAGGED Event, forces all
subsequent MOUSE_DRAGGED Events and the MOUSE_UP Event to go to
aView.
public View mouseView()
- Returns the View currently receiving MOUSE_DRAGGED or MOUSE_UP Events.
- See Also:
- setMouseView
public View viewForMouse(int x,
int y)
- Returns the View under point (x, y).
- Overrides:
- viewForMouse in class View
public boolean isVisible()
- Returns true if the RootView is visible.
public int cursor()
- Returns the current cursor.
- See Also:
- cursorForPoint, setOverrideCursor
public void setOverrideCursor(int cursorIdent)
- Forces the RootView's currently displayed cursor to the cursor
identified by cursorIdent, regardless of the cursor requested by
the View currently under the mouse. To return the cursor to what it
should be, call removeOverrideCursor().
You will almost never call this method - instead, your View subclasses
will override their cursorForPoint() method to return the
correct cursor for that point within the View.
- See Also:
- cursorForPoint, removeOverrideCursor
public void removeOverrideCursor()
- Removes the override cursor, returning the cursor to the cursor
requested by the View currently under the mouse.
- See Also:
- setOverrideCursor
public void updateCursor()
- Forces the RootView to immediately compute and set the cursor
based on the View under the mouse.
public void updateCursorLater()
- Forces the RootView to recompute the current cursor upon
reaching the top of the EventLoop.
public void showColorChooser()
- Makes the ColorChooser visible.
- See Also:
- ColorChooser
public ColorChooser colorChooser()
- Returns a reference to the shared ColorChooser.
- See Also:
- ColorChooser
public void showFontChooser()
- Makes the FontChooser visible.
- See Also:
- FontChooser
public FontChooser fontChooser()
- Returns a reference to the shared FontChooser.
- See Also:
- FontChooser
public ExternalWindow externalWindow()
- Returns the RootView's ExternalWindow, if any.
public void processEvent(Event event)
- Processes the various Events directed at the RootView.
You should never call this method.
public void setFocusedView(View view)
- Directs all key Events to view.
- Overrides:
- setFocusedView in class View
public View focusedView()
- Returns the View set to receive all key Events.
- See Also:
- setFocusedView
public void performCommand(String command,
Object data)
- Implements the RootView's commands:
- ExtendedTarget.SHOW_FONT_CHOOSER - makes the FontChooser visible.
- ExtendedTarget.SHOW_COLOR_CHOOSER - makes the ColorChooser visible.
- ExtendedTarget.NEW_FONT_SELECTION - causes the FontChooser to
display the Font that is passed
as the object.
public boolean canPerformCommand(String command)
- Returns true for the commands that the RootView can perform.
- See Also:
- performCommand
public void setColor(Color aColor)
- Sets the RootView's Color.
public Color color()
- Returns the RootView's Color.
- See Also:
- setColor
public void setImage(Image anImage)
- Sets the RootView's Image.
- See Also:
- setImageDisplayStyle
public Image image()
- Returns the RootView's Image.
- See Also:
- setImage
public void setImageDisplayStyle(int aStyle)
- Sets the style the RootView uses to display its Image
(Image.CENTERED, Image.TILED, or Image.SCALED).
public int imageDisplayStyle()
- Returns the style the RootView uses to display its Image.
- See Also:
- setImageDisplayStyle
public boolean isTransparent()
- Returns false - RootViews are not transparent.
- Overrides:
- isTransparent in class View
public void drawView(Graphics g)
- Draws the RootView's contents.
- Overrides:
- drawView in class View
public void draw(Graphics g,
Rect aRect)
- Overridden to draw just the aRect portion of the RootView,
ignoring any Windows that may intersect the Rect. To draw everything
within a given Rect, call redraw().
- Overrides:
- draw in class View
- See Also:
- redraw
public void redraw(Rect aRect)
- Similar to draw(), except that it draws everything intersecting
the Rect aRect (RootView and InternalWindows).
public synchronized void resetDirtyViews()
- Marks all of the RootView's dirty subviews as clean, without
drawing them.
public synchronized void drawDirtyViews()
- Draws all of the RootView's dirty subviews. This method
is called automatically after the EventLoop processes an Event.
public boolean mouseDown(MouseEvent event)
- Overridden to prevent mouse Events from being sent to the
RootView. Returns false.
- Overrides:
- mouseDown in class View
public RootView rootView()
- Overridden to return this View.
- Overrides:
- rootView in class View
public FoundationPanel panel()
- Returns the FoundationPanel the RootView is being displayed in.
public Point mousePoint()
- Returns a newly-allocated Point containing the mouse's last known
location, in the RootView's coordinate system.
public boolean viewExcludedFromModalSession(View aView)
- This method determines if aView should not get events
while there is a modal session in progress. If this method returns
false, then aView is allowed to get events. The current
implementation confirms that aView is a subview of the current
modal view and returns true. You can override this method if you want
to extend the allowed views to include views
other than those in the modal view.
public void setDefaultSelectedView(View aView)
- Set the default selected view
public View defaultSelectedView()
- Returns the default selected view
public void selectView(View newSelectedView,
boolean abortCurrentEditing)
- Ask the receiving RootView to make newSelectedView
the selected view for keyboard UI. If changeFocus
is true, the rootview will abort any editing to select
the view. This method does nothing if keyboard UI is not
active.
public void selectViewAfter(View aView)
- Ask the receiving RootView to make the view following aView
to become selected.
public void selectViewBefore(View aView)
- Ask the receiving RootView to make the view before aView
to become selected.
public boolean canBecomeSelectedView()
- Return whether this view can become the selected view
when the user is moving from view to views with the keyboard
The default implementation returns false.
- Overrides:
- canBecomeSelectedView in class View
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