net.infonode.gui.shaped.panel
public class ShapedPanel extends BaseContainer implements BackgroundPainter
A panel that has support for a {@link ComponentPainter} and a {@link ShapedBorder}. The background of the panel is painted as normal and then the {@link ComponentPainter} paints the area inside the {@link ShapedBorder} or the complete component area if the its border isn't a {@link ShapedBorder}.
If a {@link ShapedBorder} is applied to this panel, mouse events etc. are only triggered for this panel if the point is inside the {@link Shape} of the {@link ShapedBorder}. Child components of this panel can optionally be clipped using the {@link Shape}.
A {@link ShapedBorder} wrapped inside {@link CompoundBorder}'s will be used by the ShapedPanel, but a {@link ShapedBorder} wrapped inside other border types can't be found and is hence not used by the panel.
Constructor Summary | |
---|---|
ShapedPanel() | |
ShapedPanel(LayoutManager l) | |
ShapedPanel(ComponentPainter painter) | |
ShapedPanel(ComponentPainter painter, Border border) | |
ShapedPanel(Component component) |
Method Summary | |
---|---|
boolean | contains(int x, int y) |
ComponentPainter | getComponentPainter() |
Direction | getDirection() |
Shape | getShape() |
ShapedBorder | getShapedBorder() |
boolean | inside(int x, int y) |
boolean | isClipChildren() |
boolean | isHorizontalFlip() |
boolean | isVerticalFlip() |
protected void | paintChildren(Graphics g) |
protected void | paintComponent(Graphics g) |
void | setBorder(Border border) |
void | setClipChildren(boolean clipChildren) |
void | setComponentPainter(ComponentPainter painter) |
void | setDirection(Direction direction) |
void | setHorizontalFlip(boolean horizontalFlip) |
void | setVerticalFlip(boolean verticalFlip) |