/** * Paints the tabs in the tab area. * Invoked by paint(). * The graphics parameter must be a valid <code>Graphics</code> * object. Tab placement may be either: * <code>JTabbedPane.TOP</code>, <code>JTabbedPane.BOTTOM</code>, * <code>JTabbedPane.LEFT</code>, or <code>JTabbedPane.RIGHT</code>. * The selected index must be a valid tabbed pane tab index (0 to * tab count - 1, inclusive) or -1 if no tab is currently selected. * The handling of invalid parameters is unspecified. * @param g the graphics object to use for rendering * @param tabPlacement the placement for the tabs within the JTabbedPane * @param selectedIndex the tab index of the selected component * @since 1.4 */ protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { super.paintTabArea(g, tabPlacement, selectedIndex); }
/** * Paints the tabs in the tab area. * Invoked by paint(). * The graphics parameter must be a valid <code>Graphics</code> * object. Tab placement may be either: * <code>JTabbedPane.TOP</code>, <code>JTabbedPane.BOTTOM</code>, * <code>JTabbedPane.LEFT</code>, or <code>JTabbedPane.RIGHT</code>. * The selected index must be a valid tabbed pane tab index (0 to * tab count - 1, inclusive) or -1 if no tab is currently selected. * The handling of invalid parameters is unspecified. * @param g the graphics object to use for rendering * @param tabPlacement the placement for the tabs within the JTabbedPane * @param selectedIndex the tab index of the selected component * @since 1.4 */ protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { super.paintTabArea(g, tabPlacement, selectedIndex); }
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { int tw = tabPane.getBounds().width; g.setColor(fillColor); g.fillRect(0, 0, tw, rects[0].height + 3); super.paintTabArea(g, tabPlacement, selectedIndex); }
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Graphics2D g2d = (Graphics2D) g; /*g2d.setPaint(new GradientPaint(0, 0, defaultColorSet.topGradColor1, 0, 10, defaultColorSet.topGradColor2)); g2d.fillRect(0, 0, tabPane.getWidth(), 10); g2d.setPaint(new GradientPaint(0, 10, defaultColorSet.bottomGradColor1, 0, 21, defaultColorSet.bottomGradColor2)); g2d.fillRect(0, 10, tabPane.getWidth(), 11);*/ super.paintTabArea(g, tabPlacement, selectedIndex); if (contentTopBorderDrawn) { g2d.setColor(lineColor); g2d.drawLine(0, 20, tabPane.getWidth() - 1, 20); } }
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Graphics2D g2d = (Graphics2D) g; g2d.setPaint(new GradientPaint(0, 0, defaultColorSet.topGradColor1, 0, 10, defaultColorSet.topGradColor2)); g2d.fillRect(0, 0, tabPane.getWidth(), 10); g2d.setPaint(new GradientPaint(0, 10, defaultColorSet.bottomGradColor1, 0, 21, defaultColorSet.bottomGradColor2)); g2d.fillRect(0, 10, tabPane.getWidth(), 11); super.paintTabArea(g, tabPlacement, selectedIndex); if (contentTopBorderDrawn) { g2d.setColor(lineColor); g2d.drawLine(0, 20, tabPane.getWidth() - 1, 20); } }
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Graphics2D g2d = (Graphics2D) g; g2d.setPaint(new GradientPaint(0, 0, defaultColorSet.topGradColor1, 0, 10, defaultColorSet.topGradColor2)); g2d.fillRect(0, 0, tabPane.getWidth(), 10); g2d.setPaint(new GradientPaint(0, 10, defaultColorSet.bottomGradColor1, 0, 21, defaultColorSet.bottomGradColor2)); g2d.fillRect(0, 10, tabPane.getWidth(), 11); super.paintTabArea(g, tabPlacement, selectedIndex); if (contentTopBorderDrawn) { g2d.setColor(lineColor); g2d.drawLine(0, 20, tabPane.getWidth() - 1, 20); } }
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Graphics2D g2d = (Graphics2D) g; g2d.setColor(unselectedColor); g2d.fillRect(0, 0, tabPane.getWidth(), tabPane.getHeight()); super.paintTabArea(g, tabPlacement, selectedIndex); g2d.setColor(lineColor); g2d.drawLine(0, tabHeight-1, tabPane.getWidth() - 1, tabHeight); }
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Graphics2D g2d = (Graphics2D) g; g2d.setColor(defaultColorSet); g2d.fillRect(0, 0, tabPane.getWidth(), tabPane.getHeight()); super.paintTabArea(g, tabPlacement, selectedIndex); g2d.setColor(lineColor); g2d.drawLine(0, tabHeight-1, tabPane.getWidth() - 1, tabHeight); }
@Override protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { if (this.substanceContentOpaque) { int width = calculateTabAreaWidth(tabPlacement, runCount, maxTabWidth); if ((tabPlacement == SwingConstants.TOP) || (tabPlacement == SwingConstants.BOTTOM)) width = Math.max(width, tabPane.getWidth()); int height = calculateTabAreaHeight(tabPlacement, runCount, maxTabHeight); if (toRotateTabsOnPlacement(tabPlacement)) height = Math.max(height, tabPane.getHeight()); // restrict the painting to the tab area only Graphics2D g2d = (Graphics2D) g.create(0, 0, width, height); BackgroundPaintingUtils.update(g2d, this.tabPane, true); g2d.dispose(); } super.paintTabArea(g, tabPlacement, selectedIndex); }
@Override protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { if (this.substanceContentOpaque) { int width = calculateTabAreaWidth(tabPlacement, runCount, maxTabWidth); if ((tabPlacement == SwingConstants.TOP) || (tabPlacement == SwingConstants.BOTTOM)) width = Math.max(width, tabPane.getWidth()); int height = calculateTabAreaHeight(tabPlacement, runCount, maxTabHeight); if (toRotateTabsOnPlacement(tabPlacement)) height = Math.max(height, tabPane.getHeight()); // restrict the painting to the tab area only Graphics2D g2d = (Graphics2D) g.create(0, 0, width, height); BackgroundPaintingUtils.update(g2d, this.tabPane, true); g2d.dispose(); } super.paintTabArea(g, tabPlacement, selectedIndex); }
super.paintTabArea( g, tabPlacement, selectedIndex);