|
|
|
@ -134,7 +134,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
* 编辑的对象实例 |
|
|
|
|
*/ |
|
|
|
|
private ReportComponentComposite reportComposite; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int selectedIndex = -1; |
|
|
|
|
|
|
|
|
|
private JPanel buttonPane; |
|
|
|
@ -332,7 +332,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
leftButton.setEnabled(buttonEnabled); |
|
|
|
|
rightButton.setEnabled(buttonEnabled); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 抽出来方便OEM |
|
|
|
|
* @return |
|
|
|
@ -417,10 +417,10 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
|
|
|
|
|
// 画两个添加sheet图标
|
|
|
|
|
iconLocation = isOvertakeWidth ? (int) (maxWidth) : addIconlocation + GRAP; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paintAddButton(g2d); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void paintAddButton(Graphics2D g2d){ |
|
|
|
|
getAddWorkSheet().paintIcon(this, g2d, iconLocation, 3); |
|
|
|
|
ADD_POLY_SHEET.paintIcon(this, g2d, iconLocation + getAddWorkSheet().getIconWidth() + ICON_SEP_DISTANCE, 3); |
|
|
|
@ -496,7 +496,8 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
|
|
|
|
|
sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2); |
|
|
|
|
g2d.setPaint(getForeground()); |
|
|
|
|
g2d.drawString(sheetName, (int) textX + charWidth + 14, textAscent); |
|
|
|
|
// REPORT-40495 之前的g2d.drawString(),在windows下默认宋体时,无法绘制韩文字符,而GraphHelper的drawString中对韩文做了额外处理,可以绘制韩文字符
|
|
|
|
|
GraphHelper.drawString(g2d, sheetName, (int) textX + charWidth + 14, textAscent); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -626,7 +627,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
processRightMouseButton(evtX, evtY); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void processRightMouseButton(int evtX, int evtY){ |
|
|
|
|
MenuDef def = new MenuDef(); |
|
|
|
|
addInsertGridShortCut(def); |
|
|
|
@ -636,14 +637,14 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
def.updateMenu(); |
|
|
|
|
GUICoreUtils.showPopupMenu(tabPop, this, evtX - 1, evtY - 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void processLeftMouseButton(int evtX){ |
|
|
|
|
if (evtX > iconLocation && evtX < iconLocation + GRID_TOSHEET_RIGHT) { |
|
|
|
|
firstInsertActionPerformed(); |
|
|
|
|
} else if (evtX > iconLocation + POLY_TOSHEET_LEFT && evtX < iconLocation + POLY_TOSHEET_RIGHT) { |
|
|
|
|
new PolyReportInsertAction().actionPerformed(null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void addInsertGridShortCut(MenuDef def){ |
|
|
|
@ -847,7 +848,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected class GridReportInsertAction extends SheetInsertAction { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected TemplateReport newTemplateReport() { |
|
|
|
|
return new WorkSheet(); |
|
|
|
|