public interface TabPainter extends Border
Modifier and Type | Method and Description |
---|---|
void |
getCloseButtonRectangle(JComponent jc,
Rectangle rect,
Rectangle bounds)
Get the close button rectangle for this tab.
|
Polygon |
getInteriorPolygon(Component renderer)
Get the polygon representing the tag.
|
void |
paintInterior(Graphics g,
Component renderer)
Paint the interior (as defined by getInteriorPolygon()) as appropriate
for the tab.
|
boolean |
supportsCloseButton(JComponent renderer)
Returns true if close button is supported, false otherwise.
|
getBorderInsets, isBorderOpaque, paintBorder
Polygon getInteriorPolygon(Component renderer)
AbstractTabsUI
contains generic support for
drawing drag and drop target indications. If want to use it rather than
write your own, you need to specify the polygon returned by this method
with the following point order: The last two points in the point array
of the polygon must be the bottom left corner, followed by the
bottom right corner. In other words, start at the upper left
corner when constructing the polygon, and end at the bottom right corner,
using no more than one point for the bottom left and right corners:
start here --> /--------- | finish here --> ----------
void paintInterior(Graphics g, Component renderer)
void getCloseButtonRectangle(JComponent jc, Rectangle rect, Rectangle bounds)
jc
- The current rendererrect
- A rectangle that should be configured with the close button
boundsbounds
- The bounds relative to which the close button rectangle
should be determinedboolean supportsCloseButton(JComponent renderer)
renderer
- The current renderer