Class ContainerView
All Packages Class Hierarchy This Package Previous Next Index
Class ContainerView
public class netscape.application.ContainerView
extends netscape.application.View
implements netscape.application.FormElement
{
/* Constructors
*/
public ContainerView();
public ContainerView(Rect);
public ContainerView(int, int, int, int);
/* Methods
*/
public Color backgroundColor();
public Border border();
public void decode(Decoder);
public void describeClassInfo(ClassInfo);
public void drawSubviews(Graphics);
public void drawView(Graphics);
public void drawViewBackground(Graphics);
public void drawViewBorder(Graphics);
public void encode(Encoder);
public void finishDecoding();
public String formElementText(); *Beta API*
public Image image();
public int imageDisplayStyle();
public Rect interiorRect();
public boolean isTransparent();
public void layoutView(int, int);
public Size minSize();
public void setBackgroundColor(Color);
public void setBorder(Border);
public void setImage(Image);
public void setImageDisplayStyle(int);
public void setTitle(String);
public void setTitleColor(Color);
public void setTitleFont(Font);
public void setTransparent(boolean);
public String title();
public Color titleColor();
public Font titleFont();
}
View subclass that fills itself with a Color or an Image, and can draw a
Border around its perimeter. The Image can be centered, scaled, or
tiled.
Constructors
ContainerView
public ContainerView()
- Constructs a ContainerView with origin (0, 0) and zero width and
height.
ContainerView
public ContainerView(Rect rect)
- Constructs a ContainerView with bounds rect.
ContainerView
public ContainerView(int x,
int y,
int width,
int height)
- Constructs a ContainerView with
bounds (x, y, width, height).
Methods
minSize
public Size minSize()
- Returns the ContainterView's minimum size, which is governed by the
space needed to fully all it's subviews. Absolute minimum size is
(2, 2).
- Overrides:
- minSize in class View
interiorRect
public Rect interiorRect()
- Returns the area not used by the ContainerView to draw its bounds
and title.
setTitle
public void setTitle(String aString)
- Sets the ContainerView's title string and then calls its
draw() method to redraw it. If you do not want to immediately
redraw the ContainerView, you should first call its
disableDrawing() method.
- See Also:
- disableDrawing
title
public String title()
- Returns the ContainerView's title.
- See Also:
- setTitle
setTitleColor
public void setTitleColor(Color aColor)
- Sets the ContainerView's title string Color and then calls its
draw() method to redraw it. If you do not want to immediately
redraw the ContainerView, you should first call its
disableDrawing() method.
- See Also:
- setTitle, disableDrawing
titleColor
public Color titleColor()
- Returns the ContainerView's title string Color.
- See Also:
- setTitleColor
setTitleFont
public void setTitleFont(Font aFont)
- Sets the ContainerView's title string Font and then calls its
draw() method to redraw it. If you do not want to immediately
redraw the ContainerView, you should first call its
disableDrawing() method.
- See Also:
- setTitle, disableDrawing
titleFont
public Font titleFont()
- Returns the ContainerView's title string Font.
- See Also:
- setTitleFont
setBackgroundColor
public void setBackgroundColor(Color aColor)
- Sets the ContainerView's background Color and then calls its
draw() method to redraw it. If you do not want to immediately
redraw the ContainerView, you should first call its
disableDrawing() method.
- See Also:
- disableDrawing
backgroundColor
public Color backgroundColor()
- Returns the ContainerView's background Color.
- See Also:
- setBackgroundColor
setBorder
public void setBorder(Border newBorder)
- Sets the ContainerView's Border and then calls its
draw() method to redraw it. If you do not want to immediately
redraw the ContainerView, you should first call its
disableDrawing() method.
- See Also:
- disableDrawing
border
public Border border()
- Returns the ContainerView's Border.
- See Also:
- setBorder
setImage
public void setImage(Image anImage)
- Sets the ContainerView's Image and then calls its
draw() method to redraw it. If you do not want to immediately
redraw the ContainerView, you should first call its
disableDrawing() method.
- See Also:
- setImageDisplayStyle, disableDrawing
image
public Image image()
- Returns the ContainerView's Image.
- See Also:
- setImage
setImageDisplayStyle
public void setImageDisplayStyle(int aStyle)
- Sets the style the ContainerView uses to display its Image
(Image.CENTERED, Image.TILED, or Image.SCALED).
- See Also:
- setImage
imageDisplayStyle
public int imageDisplayStyle()
- Returns the style the ContainerView uses to display its Image.
- See Also:
- setImageDisplayStyle
setTransparent
public void setTransparent(boolean flag)
- Sets the ContainerView to be transparent or opaque.
isTransparent
public boolean isTransparent()
- Overridden to return true if the ContainerView is transparent.
This will also return true if we have a title.
- Overrides:
- isTransparent in class View
- See Also:
- setTransparent
drawViewBackground
public void drawViewBackground(Graphics g)
- Draws the ContainerView's background, using its Image and
background Color. If the ContainerView is transparent, or its
background Color is null, it only draws the Image.
You never call this method directly, but
should override it to produce custom background drawing.
drawViewBorder
public void drawViewBorder(Graphics g)
- Draws the ContainerView's Border, including its title. You never call
this method directly, but should override it to produce custom
border drawing.
- See Also:
- setBorder, setTitle
drawView
public void drawView(Graphics g)
- Draws the ContainerView's background. Calls
drawViewBackground().
- Overrides:
- drawView in class View
- See Also:
- drawViewBackground
drawSubviews
public void drawSubviews(Graphics g)
- Draws the ContainerView's border, after drawing its subviews. Calls
drawViewBorder().
- Overrides:
- drawSubviews in class View
- See Also:
- drawViewBorder
layoutView
public void layoutView(int deltaX,
int deltaY)
- Overridden to get the titleField out of the way, before
a LayoutManager can get a hold of it and mangle it's location.
It is put back afterwards if necessary.
- Overrides:
- layoutView in class View
describeClassInfo
public void describeClassInfo(ClassInfo info)
- Describes the ContainerView class' information.
- Overrides:
- describeClassInfo in class View
- See Also:
- describeClassInfo
encode
public void encode(Encoder encoder) throws CodingException
- Encodes the ContainerView instance.
- Overrides:
- encode in class View
- See Also:
- encode
decode
public void decode(Decoder decoder) throws CodingException
- Decodes the ContainerView instance.
- Overrides:
- decode in class View
- See Also:
- decode
finishDecoding
public void finishDecoding() throws CodingException
- Finishes the ContainerView instance decoding.
- Overrides:
- finishDecoding in class View
- See Also:
- finishDecoding
formElementText
public String formElementText() *Beta API*
- Implementation of the FormElement interface
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