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();
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
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
public Rect interiorRect()
- Returns the area not used by the ContainerView to draw its bounds
and title.
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
public String title()
- Returns the ContainerView's title.
- See Also:
- setTitle
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
public Color titleColor()
- Returns the ContainerView's title string Color.
- See Also:
- setTitleColor
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
public Font titleFont()
- Returns the ContainerView's title string Font.
- See Also:
- setTitleFont
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
public Color backgroundColor()
- Returns the ContainerView's background Color.
- See Also:
- setBackgroundColor
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
public Border border()
- Returns the ContainerView's Border.
- See Also:
- setBorder
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
public Image image()
- Returns the ContainerView's Image.
- See Also:
- setImage
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
public int imageDisplayStyle()
- Returns the style the ContainerView uses to display its Image.
- See Also:
- setImageDisplayStyle
public void setTransparent(boolean flag)
- Sets the ContainerView to be transparent or opaque.
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
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.
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
public void drawView(Graphics g)
- Draws the ContainerView's background. Calls
drawViewBackground().
- Overrides:
- drawView in class View
- See Also:
- drawViewBackground
public void drawSubviews(Graphics g)
- Draws the ContainerView's border, after drawing its subviews. Calls
drawViewBorder().
- Overrides:
- drawSubviews in class View
- See Also:
- drawViewBorder
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
public void describeClassInfo(ClassInfo info)
- Describes the ContainerView class' information.
- Overrides:
- describeClassInfo in class View
- See Also:
- describeClassInfo
public void encode(Encoder encoder) throws CodingException
- Encodes the ContainerView instance.
- Overrides:
- encode in class View
- See Also:
- encode
public void decode(Decoder decoder) throws CodingException
- Decodes the ContainerView instance.
- Overrides:
- decode in class View
- See Also:
- decode
public void finishDecoding() throws CodingException
- Finishes the ContainerView instance decoding.
- Overrides:
- finishDecoding in class View
- See Also:
- finishDecoding
public String formElementText()
- 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 Oct 1997