|
|
@ -886,11 +886,11 @@ public class MultiTemplateTabPane extends JComponent { |
|
|
|
g2d.draw(new Arc2D.Double(x[3] - CORNOR_RADIUS * 2, y[3], CORNOR_RADIUS * 2, CORNOR_RADIUS * 2, 90, -90, 0)); |
|
|
|
g2d.draw(new Arc2D.Double(x[3] - CORNOR_RADIUS * 2, y[3], CORNOR_RADIUS * 2, CORNOR_RADIUS * 2, 90, -90, 0)); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
int sheetIconY = (getHeight() - sheeticon.getIconHeight()) / 2; |
|
|
|
int sheetIconY = (getHeight() - sheeticon.getIconHeight()) / 2; |
|
|
|
sheeticon.paintIcon(this, g2d, (int) templateStartX + GAP, sheetIconY); |
|
|
|
sheeticon.paintIcon(this, g2d, BidiUtils.rtl() ? (int) templateStartX + realWidth - sheeticon.getIconWidth() - GAP : (int) templateStartX + GAP, sheetIconY); |
|
|
|
// 画字符
|
|
|
|
// 画字符
|
|
|
|
g2d.setPaint(getForeground()); |
|
|
|
g2d.setPaint(getForeground()); |
|
|
|
g2d.drawString(sheetName, (int) templateStartX + sheeticon.getIconWidth() + 2 * GAP, getHeight() - GAP * 2); |
|
|
|
g2d.drawString(sheetName, BidiUtils.rtl() ? (int) templateStartX + realWidth - 2 * GAP - sheeticon.getIconWidth() - getStringWidth(sheetName) : (int) templateStartX + sheeticon.getIconWidth() + 2 * GAP, getHeight() - GAP * 2); |
|
|
|
int closePosition = (int) templateStartX + realWidth - CLOSE.getIconWidth() - SMALLGAP; |
|
|
|
int closePosition = BidiUtils.rtl() ? (int) templateStartX + SMALLGAP : (int) templateStartX + realWidth - CLOSE.getIconWidth() - SMALLGAP; |
|
|
|
int closeY = (getHeight() - closeIcon.getIconHeight()) / 2; |
|
|
|
int closeY = (getHeight() - closeIcon.getIconHeight()) / 2; |
|
|
|
if (!DesignerMode.isVcsMode()) { |
|
|
|
if (!DesignerMode.isVcsMode()) { |
|
|
|
closeIcon.paintIcon(this, g2d, closePosition, closeY); |
|
|
|
closeIcon.paintIcon(this, g2d, closePosition, closeY); |
|
|
@ -944,12 +944,12 @@ public class MultiTemplateTabPane extends JComponent { |
|
|
|
|
|
|
|
|
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
int sheetIconY = (getHeight() - sheeticon.getIconHeight()) / 2; |
|
|
|
int sheetIconY = (getHeight() - sheeticon.getIconHeight()) / 2; |
|
|
|
sheeticon.paintIcon(this, g2d, (int) templateStartX + GAP, sheetIconY); |
|
|
|
sheeticon.paintIcon(this, g2d, BidiUtils.rtl() ? (int) templateStartX + realWidth - sheeticon.getIconWidth() - GAP : (int) templateStartX + GAP, sheetIconY); |
|
|
|
// 画字符
|
|
|
|
// 画字符
|
|
|
|
g2d.setPaint(getForeground()); |
|
|
|
g2d.setPaint(getForeground()); |
|
|
|
g2d.drawString(sheetName, (int) templateStartX + sheeticon.getIconWidth() + 2 * GAP, getHeight() - GAP * 2); |
|
|
|
g2d.drawString(sheetName, BidiUtils.rtl() ? (int) templateStartX + realWidth - 2 * GAP - sheeticon.getIconWidth() - getStringWidth(sheetName) : (int) templateStartX + sheeticon.getIconWidth() + 2 * GAP, getHeight() - GAP * 2); |
|
|
|
int closeY = (getHeight() - closeIcon.getIconHeight()) / 2; |
|
|
|
int closeY = (getHeight() - closeIcon.getIconHeight()) / 2; |
|
|
|
int closePosition = (int) templateStartX + realWidth - CLOSE.getIconWidth() - SMALLGAP; |
|
|
|
int closePosition = BidiUtils.rtl() ? (int) templateStartX + SMALLGAP : (int) templateStartX + realWidth - CLOSE.getIconWidth() - SMALLGAP; |
|
|
|
if (!DesignerMode.isVcsMode()) { |
|
|
|
if (!DesignerMode.isVcsMode()) { |
|
|
|
closeIcon.paintIcon(this, g2d, closePosition, closeY); |
|
|
|
closeIcon.paintIcon(this, g2d, closePosition, closeY); |
|
|
|
} |
|
|
|
} |
|
|
|