public class BlockBox extends CompositeBox
Modifier and Type | Method and Description |
---|---|
void |
add(FlowBox box)
Adds the given box and updates properties of this composite box.
|
boolean |
containsPoint(int x,
int y)
This method must be called on a block that is completely positioned and
committed.
|
int |
getAscent()
Returns the amount of line content in pixels which is above the baseline.
|
int |
getBaseline()
Returns y coordinate for the box's baseline.
|
int |
getDescent()
Returns the amount of line content in pixels which is below the baseline.
|
int |
getHeight() |
void |
setHeight(int h)
Sets the height.
|
void |
setLineTop(int y)
Positions the box vertically by setting the y coordinate for the top of
the content of the line.
|
getRecommendedWidth, setRecommendedWidth
public void add(FlowBox box)
CompositeBox
add
in class CompositeBox
box
- the child being addedCompositeBox.add(FlowBox)
public boolean containsPoint(int x, int y)
FlowBox
containsPoint
in class FlowBox
x
- Xy
- Ytrue
if the FlowBox contains the pointFlowBox.containsPoint(int, int)
public int getAscent()
FlowBox
getAscent
in class FlowBox
FlowBox.getAscent()
public int getBaseline()
FlowBox
getBaseline
in class FlowBox
FlowBox.getBaseline()
public int getDescent()
FlowBox
getDescent
in class FlowBox
FlowBox.getDescent()
public int getHeight()
public void setHeight(int h)
h
- The heightpublic void setLineTop(int y)
CompositeBox
setLineTop
in class CompositeBox
y
- the y coordinateCompositeBox.setLineTop(int)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.