|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TabPainter
An extention to Border which can provide a non-rectangular interior region that will contain the tab's content, and actually paint that interior. The goal of this class is to make it extremely easy to plug in different painting logic without having to write an entire UI delegate.
Method Summary | |
---|---|
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. |
Methods inherited from interface javax.swing.border.Border |
---|
getBorderInsets, isBorderOpaque, paintBorder |
Method Detail |
---|
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
|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |