}
info.getChangeSupport().addPropertyChangeListener(this);
- final TabLabel label = new TabLabel(this, info);
+ final TabLabel label = createTabLabel(info);
myInfo2Label.put(info, label);
if (!isDropTarget) {
return info;
}
+ protected TabLabel createTabLabel(TabInfo info) {
+ return new TabLabel(this, info);
+ }
@NotNull
public TabInfo addTab(TabInfo info) {
return myInfo2Label.get(getSelectedInfo());
}
- static class ShapeInfo {
- ShapeTransform path;
- ShapeTransform fillPath;
- ShapeTransform labelPath;
- int labelBottomY;
- int labelTopY;
- int labelLeftX;
- int labelRightX;
- Insets insets;
- Color from;
- Color to;
+ protected static class ShapeInfo {
+ public ShapeInfo() {}
+ public ShapeTransform path;
+ public ShapeTransform fillPath;
+ public ShapeTransform labelPath;
+ public int labelBottomY;
+ public int labelTopY;
+ public int labelLeftX;
+ public int labelRightX;
+ public Insets insets;
+ public Color from;
+ public Color to;
}
}
}
- public static Rectangle layout(JComponent c, Rectangle bounds) {
+ public Rectangle layout(JComponent c, Rectangle bounds) {
final Rectangle now = c.getBounds();
if (!bounds.equals(now)) {
c.setBounds(bounds);
return bounds;
}
- public static Rectangle layout(JComponent c, int x, int y, int width, int height) {
+ public Rectangle layout(JComponent c, int x, int y, int width, int height) {
return layout(c, new Rectangle(x, y, width, height));
}