< prev index next >
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
Print this page
*** 130,146 ****
protected KeyStroke rightKey;
// Transient variables (recalculated each time TabbedPane is layed out)
/** Tab runs */
! protected int tabRuns[] = new int[10];
/** Run count */
protected int runCount = 0;
/** Selected run */
protected int selectedRun = -1;
/** Tab rects */
! protected Rectangle rects[] = new Rectangle[0];
/** Maximum tab height */
protected int maxTabHeight;
/** Maximum tab width */
protected int maxTabWidth;
--- 130,146 ----
protected KeyStroke rightKey;
// Transient variables (recalculated each time TabbedPane is layed out)
/** Tab runs */
! protected int[] tabRuns = new int[10];
/** Run count */
protected int runCount = 0;
/** Selected run */
protected int selectedRun = -1;
/** Tab rects */
! protected Rectangle[] rects = new Rectangle[0];
/** Maximum tab height */
protected int maxTabHeight;
/** Maximum tab width */
protected int maxTabWidth;
*** 984,995 ****
* to (tab.y).
* For tabs placed on LEFT or RIGHT, the bottom torn edge is created by
* subtracting xCropLen[i] from (tab.y + tab.height) and adding yCropLen[i]
* to (tab.x).
*/
! private static int xCropLen[] = {1,1,0,0,1,1,2,2};
! private static int yCropLen[] = {0,3,3,6,6,9,9,12};
private static final int CROP_SEGMENT = 12;
private static Polygon createCroppedTabShape(int tabPlacement, Rectangle tabRect, int cropline) {
int rlen;
int start;
--- 984,995 ----
* to (tab.y).
* For tabs placed on LEFT or RIGHT, the bottom torn edge is created by
* subtracting xCropLen[i] from (tab.y + tab.height) and adding yCropLen[i]
* to (tab.x).
*/
! private static int[] xCropLen = {1,1,0,0,1,1,2,2};
! private static int[] yCropLen = {0,3,3,6,6,9,9,12};
private static final int CROP_SEGMENT = 12;
private static Polygon createCroppedTabShape(int tabPlacement, Rectangle tabRect, int cropline) {
int rlen;
int start;
*** 1015,1026 ****
int rcnt = rlen/CROP_SEGMENT;
if (rlen%CROP_SEGMENT > 0) {
rcnt++;
}
int npts = 2 + (rcnt*8);
! int xp[] = new int[npts];
! int yp[] = new int[npts];
int pcnt = 0;
xp[pcnt] = ostart;
yp[pcnt++] = end;
xp[pcnt] = ostart;
--- 1015,1026 ----
int rcnt = rlen/CROP_SEGMENT;
if (rlen%CROP_SEGMENT > 0) {
rcnt++;
}
int npts = 2 + (rcnt*8);
! int[] xp = new int[npts];
! int[] yp = new int[npts];
int pcnt = 0;
xp[pcnt] = ostart;
yp[pcnt++] = end;
xp[pcnt] = ostart;
< prev index next >