net.infonode.gui.shaped.panel
public class ShapedPanel extends BaseContainer implements BackgroundPainter
A panel that has support for a ComponentPainter and a ShapedBorder. The background of the panel is painted as normal and then the ComponentPainter paints the area inside the ShapedBorder or the complete component area if the its border isn't a ShapedBorder.
If a ShapedBorder is applied to this panel, mouse events etc. are only triggered for this panel if the point is inside the Shape of the ShapedBorder. Child components of this panel can optionally be clipped using the Shape.
A ShapedBorder wrapped inside CompoundBorder's will be used by the ShapedPanel, but a 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) |