1181 |
} |
} |
1182 |
} |
} |
1183 |
|
|
1184 |
/** The button that increments the current scroll location. */ |
/** The button that increments the current scroll location. |
1185 |
private transient ScrollingButton incrButton; |
* This is package-private to avoid an accessor method. */ |
1186 |
|
transient ScrollingButton incrButton; |
1187 |
/** The button that decrements the current scroll location. */ |
|
1188 |
private transient ScrollingButton decrButton; |
/** The button that decrements the current scroll location. |
1189 |
|
* This is package-private to avoid an accessor method. */ |
1190 |
/** The viewport used to display the tabs. */ |
transient ScrollingButton decrButton; |
1191 |
private transient ScrollingViewport viewport; |
|
1192 |
|
/** The viewport used to display the tabs. |
1193 |
/** The panel inside the viewport that paints the tabs. */ |
* This is package-private to avoid an accessor method. */ |
1194 |
private transient ScrollingPanel panel; |
transient ScrollingViewport viewport; |
1195 |
|
|
1196 |
/** The starting visible tab in the run in SCROLL_TAB_MODE. */ |
/** The panel inside the viewport that paints the tabs. |
1197 |
private transient int currentScrollLocation; |
* This is package-private to avoid an accessor method. */ |
1198 |
|
transient ScrollingPanel panel; |
1199 |
|
|
1200 |
|
/** The starting visible tab in the run in SCROLL_TAB_MODE. |
1201 |
|
* This is package-private to avoid an accessor method. */ |
1202 |
|
transient int currentScrollLocation; |
1203 |
|
|
1204 |
/** A reusable rectangle. */ |
/** A reusable rectangle. */ |
1205 |
protected Rectangle calcRect; |
protected Rectangle calcRect; |
1310 |
/** The tab pane that this UI paints. */ |
/** The tab pane that this UI paints. */ |
1311 |
protected JTabbedPane tabPane; |
protected JTabbedPane tabPane; |
1312 |
|
|
1313 |
/** The current layout manager for the tabPane. */ |
/** The current layout manager for the tabPane. |
1314 |
private transient LayoutManager layoutManager; |
* This is package-private to avoid an accessor method. */ |
1315 |
|
transient LayoutManager layoutManager; |
1316 |
/** The rectangle that describes the tab area's position and size. */ |
|
1317 |
private transient Rectangle tabAreaRect; |
/** The rectangle that describes the tab area's position and size. |
1318 |
|
* This is package-private to avoid an accessor method. */ |
1319 |
/** The rectangle that describes the content area's position and size. */ |
transient Rectangle tabAreaRect; |
1320 |
private transient Rectangle contentRect; |
|
1321 |
|
/** The rectangle that describes the content area's position and |
1322 |
|
* size. This is package-private to avoid an accessor method. */ |
1323 |
|
transient Rectangle contentRect; |
1324 |
|
|
1325 |
/** |
/** |
1326 |
* Creates a new BasicTabbedPaneUI object. |
* Creates a new BasicTabbedPaneUI object. |
1333 |
/** |
/** |
1334 |
* This method creates a ScrollingButton that points in the appropriate |
* This method creates a ScrollingButton that points in the appropriate |
1335 |
* direction for an increasing button. |
* direction for an increasing button. |
1336 |
|
* This is package-private to avoid an accessor method. |
1337 |
* |
* |
1338 |
* @return The increase ScrollingButton. |
* @return The increase ScrollingButton. |
1339 |
*/ |
*/ |
1340 |
private ScrollingButton createIncreaseButton() |
ScrollingButton createIncreaseButton() |
1341 |
{ |
{ |
1342 |
if (incrButton == null) |
if (incrButton == null) |
1343 |
incrButton = new ScrollingButton(SwingConstants.NORTH); |
incrButton = new ScrollingButton(SwingConstants.NORTH); |
1352 |
/** |
/** |
1353 |
* This method creates a ScrollingButton that points in the appropriate |
* This method creates a ScrollingButton that points in the appropriate |
1354 |
* direction for a decreasing button. |
* direction for a decreasing button. |
1355 |
|
* This is package-private to avoid an accessor method. |
1356 |
* |
* |
1357 |
* @return The decrease ScrollingButton. |
* @return The decrease ScrollingButton. |
1358 |
*/ |
*/ |
1359 |
private ScrollingButton createDecreaseButton() |
ScrollingButton createDecreaseButton() |
1360 |
{ |
{ |
1361 |
if (decrButton == null) |
if (decrButton == null) |
1362 |
decrButton = new ScrollingButton(SwingConstants.SOUTH); |
decrButton = new ScrollingButton(SwingConstants.SOUTH); |
1371 |
/** |
/** |
1372 |
* This method finds the point to set the view position at given the index |
* This method finds the point to set the view position at given the index |
1373 |
* of a tab. The tab will be the first visible tab in the run. |
* of a tab. The tab will be the first visible tab in the run. |
1374 |
|
* This is package-private to avoid an accessor method. |
1375 |
* |
* |
1376 |
* @param index The index of the first visible tab. |
* @param index The index of the first visible tab. |
1377 |
* |
* |
1378 |
* @return The position of the first visible tab. |
* @return The position of the first visible tab. |
1379 |
*/ |
*/ |
1380 |
private Point findPointForIndex(int index) |
Point findPointForIndex(int index) |
1381 |
{ |
{ |
1382 |
int tabPlacement = tabPane.getTabPlacement(); |
int tabPlacement = tabPane.getTabPlacement(); |
1383 |
int selectedIndex = tabPane.getSelectedIndex(); |
int selectedIndex = tabPane.getSelectedIndex(); |