Class PackConstraints
All Packages Class Hierarchy This Package Previous Next Index
Class PackConstraints
public class netscape.application.PackConstraints
extends java.lang.Object
implements netscape.util.Codable,
java.lang.Cloneable
{
/* Fields
*/
public final static int ANCHOR_CENTER;
public final static int ANCHOR_EAST;
public final static int ANCHOR_NORTH;
public final static int ANCHOR_NORTHEAST;
public final static int ANCHOR_NORTHWEST;
public final static int ANCHOR_SOUTH;
public final static int ANCHOR_SOUTHEAST;
public final static int ANCHOR_SOUTHWEST;
public final static int ANCHOR_WEST;
public final static int SIDE_BOTTOM;
public final static int SIDE_LEFT;
public final static int SIDE_RIGHT;
public final static int SIDE_TOP;
/* Constructors
*/
public PackConstraints();
public PackConstraints(int, boolean, boolean, boolean, int, int, int, int, int);
/* Methods
*/
public int anchor();
public Object clone();
public void decode(Decoder);
public void describeClassInfo(ClassInfo);
public void encode(Encoder);
public boolean expand();
public boolean fillX();
public boolean fillY();
public void finishDecoding();
public int internalPadX();
public int internalPadY();
public int padX();
public int padY();
public void setAnchor(int);
public void setExpand(boolean);
public void setFillX(boolean);
public void setFillY(boolean);
public void setInternalPadX(int);
public void setInternalPadY(int);
public void setPadX(int);
public void setPadY(int);
public void setSide(int);
public int side();
}
Object subclass describing constraints associated with a View managed by
a PackLayout LayoutManager. You will usually configure a PackConstraints
instance appropriately and then associate this instance with a View using
the PackLayout's setConstraints() method.
The default constraints are:
- anchor = ANCHOR_CENTER
- expand = false
- fillx = false
- filly = false
- ipadx = 0
- ipady = 0
- padx = 0
- side = SIDE_TOP
Fields
ANCHOR_NORTH
public final static int ANCHOR_NORTH
- Position View north of the allocated area.
ANCHOR_NORTHEAST
public final static int ANCHOR_NORTHEAST
- Position View northeast of the allocated area.
ANCHOR_EAST
public final static int ANCHOR_EAST
- Position View east of the allocated area.
ANCHOR_SOUTHEAST
public final static int ANCHOR_SOUTHEAST
- Position View southeast of the allocated area.
ANCHOR_SOUTH
public final static int ANCHOR_SOUTH
- Position View south of the allocated area.
ANCHOR_SOUTHWEST
public final static int ANCHOR_SOUTHWEST
- Position View southwest of the allocated area.
ANCHOR_WEST
public final static int ANCHOR_WEST
- Position View west of the allocated area.
ANCHOR_NORTHWEST
public final static int ANCHOR_NORTHWEST
- Position View northwest of the allocated area.
ANCHOR_CENTER
public final static int ANCHOR_CENTER
- Position View centered within the allocated area.
SIDE_TOP
public final static int SIDE_TOP
- Position View above the allocated area.
SIDE_BOTTOM
public final static int SIDE_BOTTOM
- Position View below the allocated area.
SIDE_LEFT
public final static int SIDE_LEFT
- Position View to the left of the allocated area.
SIDE_RIGHT
public final static int SIDE_RIGHT
- Position View to the right of the allocated area.
Constructors
PackConstraints
public PackConstraints()
- Constructs a PackConstraints with default constraints.
PackConstraints
public PackConstraints(int anchor,
boolean expand,
boolean fillX,
boolean fillY,
int iPadX,
int iPadY,
int padX,
int padY,
int side)
- Constructs a PackConstraints with the specified constraints.
Methods
setAnchor
public void setAnchor(int value)
- Sets the location in which the View should be placed within its area.
Used when the View is smaller than its allocated area.
anchor
public int anchor()
- Returns the anchor value.
- See Also:
- setAnchor
setExpand
public void setExpand(boolean value)
- Specifies whether the PackLayout should enlarge the View to fill any
extra space within the View's allocated area.
expand
public boolean expand()
- Returns true if the PackLayout should enlarge the View to fill
any extra space within the View's allocated area.
- See Also:
- setExpand
setFillX
public void setFillX(boolean value)
- Specifies whether the PackLayout should enlarge the View to fill any
extra space along the X-axis of the View's allocated area.
fillX
public boolean fillX()
- Returns true if the PackLayout should enlarge the View to fill
any extra space along the X-axis of the View's allocated area.
- See Also:
- setFillX
setFillY
public void setFillY(boolean value)
- Specifies whether the PackLayout should enlarge the View to fill any
extra space along the Y-axis of the View's allocated area.
fillY
public boolean fillY()
- Returns true if the PackLayout should enlarge the View to fill
any extra space along the Y-axis of the View's allocated area.
- See Also:
- setFillY
setInternalPadX
public void setInternalPadX(int value)
- Sets the padding the PackLayout adds to the View's minimum
width. The PackLayout forces the View's minimum width to its
original minimum width plus twice its "internalPadX."
internalPadX
public int internalPadX()
- Returns the View's "internalPadX."
- See Also:
- setInternalPadX
setInternalPadY
public void setInternalPadY(int value)
- Sets the padding the PackLayout adds to the View's minimum
height. The PackLayout forces the View's minimum height to its
original minimum height plus twice its "internalPadY."
internalPadY
public int internalPadY()
- Returns the View's "internalPadY."
- See Also:
- setInternalPadY
setPadX
public void setPadX(int value)
- Sets the padding the PackLayout adds to the View's width. The
PackLayout does not change the View's width, but it does create
empty space "padX" pixels wide to the View's left and right.
padX
public int padX()
- Returns the View's "padX."
- See Also:
- setPadX
setPadY
public void setPadY(int value)
- Sets the padding the PackLayout adds to the View's height. The
PackLayout does not change the View's height, but it does create
empty space "padY" pixels tall above and below the View.
padY
public int padY()
- Returns the View's "padY."
- See Also:
- setPadY
setSide
public void setSide(int value)
- Sets the side of the View's allocated area to which the PackLayout
should attach the View. Possible values are SIDE_TOP, SIDE_BOTTOM,
SIDE_LEFT, and SIDE_RIGHT.
side
public int side()
- Returns the side of the View's allocated area to which the PackLayout
should attach the View.
- See Also:
- setSide
describeClassInfo
public void describeClassInfo(ClassInfo info)
- Describes the PackConstraints class' coding information.
- See Also:
- describeClassInfo
encode
public void encode(Encoder encoder) throws CodingException
- Encodes the PackConstraints.
- See Also:
- encode
decode
public void decode(Decoder decoder) throws CodingException
- Decodes the PackConstraints.
- See Also:
- decode
finishDecoding
public void finishDecoding() throws CodingException
- Finishes the PackConstraints decoding.
- See Also:
- finishDecoding
clone
public Object clone()
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index