|
|
@ -305,14 +305,18 @@ public class FineTemplateTabPaneUI extends PanelUI { |
|
|
|
g2d.setPaint(borderColor); |
|
|
|
g2d.setPaint(borderColor); |
|
|
|
paintRoundTabBorder(g2d, templateStartX, 0, |
|
|
|
paintRoundTabBorder(g2d, templateStartX, 0, |
|
|
|
tabPane.getTabWidth(), tabHeight, borderWidth, (float) tabArc); |
|
|
|
tabPane.getTabWidth(), tabHeight, borderWidth, (float) tabArc); |
|
|
|
FlatUIUtils.resetRenderingHints(g2d, oriRenderingHints); |
|
|
|
|
|
|
|
// 绘制图标
|
|
|
|
|
|
|
|
int sheetIconY = (tabHeight - sheeticon.getIconHeight()) / 2; |
|
|
|
|
|
|
|
sheeticon.paintIcon(tabPane, g2d, (int) templateStartX + tabInsets.left, sheetIconY); |
|
|
|
|
|
|
|
// 绘制字符
|
|
|
|
// 绘制字符
|
|
|
|
g2d.setPaint(tabPane.getForeground()); |
|
|
|
g2d.setPaint(tabPane.getForeground()); |
|
|
|
Point2D.Double textPoint = calTextPoint(templateStartX, sheeticon.getIconWidth()); |
|
|
|
Point2D.Double textPoint = calTextPoint(templateStartX, sheeticon.getIconWidth()); |
|
|
|
g2d.drawString(sheetName, (int) textPoint.x, (int) textPoint.y); |
|
|
|
g2d.drawString(sheetName, (int) textPoint.x, (int) textPoint.y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FlatUIUtils.resetRenderingHints(g2d, oriRenderingHints); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 绘制图标
|
|
|
|
|
|
|
|
int sheetIconY = (tabHeight - sheeticon.getIconHeight()) / 2; |
|
|
|
|
|
|
|
sheeticon.paintIcon(tabPane, g2d, (int) templateStartX + tabInsets.left, sheetIconY); |
|
|
|
|
|
|
|
|
|
|
|
int closePosition = (int) templateStartX + tabPane.getTabWidth() |
|
|
|
int closePosition = (int) templateStartX + tabPane.getTabWidth() |
|
|
|
- this.closeIcon.getIconWidth() - tabInsets.right; |
|
|
|
- this.closeIcon.getIconWidth() - tabInsets.right; |
|
|
|
int closeY = (tabHeight - closeIcon.getIconHeight()) / 2; |
|
|
|
int closeY = (tabHeight - closeIcon.getIconHeight()) / 2; |
|
|
@ -352,15 +356,16 @@ public class FineTemplateTabPaneUI extends PanelUI { |
|
|
|
tabPane.getTabWidth(), tabHeight - scale(borderWidth), tabArc); |
|
|
|
tabPane.getTabWidth(), tabHeight - scale(borderWidth), tabArc); |
|
|
|
g2d.fill(tabShape); |
|
|
|
g2d.fill(tabShape); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 画字符
|
|
|
|
|
|
|
|
g2d.setPaint(tabPane.getForeground()); |
|
|
|
|
|
|
|
Point2D.Double textPoint = calTextPoint(templateStartX, sheeticon.getIconWidth()); |
|
|
|
|
|
|
|
g2d.drawString(sheetName, (int) textPoint.x, (int) textPoint.y); |
|
|
|
|
|
|
|
|
|
|
|
FlatUIUtils.resetRenderingHints(g2d, oriRenderingHints); |
|
|
|
FlatUIUtils.resetRenderingHints(g2d, oriRenderingHints); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 画图标
|
|
|
|
int sheetIconY = (tabHeight - sheeticon.getIconHeight()) / 2; |
|
|
|
int sheetIconY = (tabHeight - sheeticon.getIconHeight()) / 2; |
|
|
|
sheeticon.paintIcon(tabPane, g2d, (int) templateStartX + tabInsets.left, sheetIconY); |
|
|
|
sheeticon.paintIcon(tabPane, g2d, (int) templateStartX + tabInsets.left, sheetIconY); |
|
|
|
// 画字符
|
|
|
|
|
|
|
|
g2d.setPaint(tabPane.getForeground()); |
|
|
|
|
|
|
|
Point2D.Double textPoint = calTextPoint(templateStartX, sheeticon.getIconWidth()); |
|
|
|
|
|
|
|
g2d.drawString(sheetName, (int) textPoint.x, (int) textPoint.y); |
|
|
|
|
|
|
|
int closeY = (tabHeight - closeIcon.getIconHeight()) / 2; |
|
|
|
int closeY = (tabHeight - closeIcon.getIconHeight()) / 2; |
|
|
|
int closePosition = (int) templateStartX + tabPane.getTabWidth() |
|
|
|
int closePosition = (int) templateStartX + tabPane.getTabWidth() |
|
|
|
- this.closeIcon.getIconWidth() - tabInsets.right; |
|
|
|
- this.closeIcon.getIconWidth() - tabInsets.right; |
|
|
|