zdefaultheadcellpainter.java
来自「用Java写的报表.功能如下: 0.内建网络打印,网络预览功能! 1.文件操作。」· Java 代码 · 共 60 行
JAVA
60 行
/* * Copyright 2002 EZCell , Inc. All rights reserved. * Version 1.0. * Author W.John */package ezcell;import java.awt.Graphics2D;/** * put your documentation comment here */class ZDefaultHeadCellPainter extends ZDefaultCellPainter { /** * put your documentation comment here * @param ZUIManager ui */ ZDefaultHeadCellPainter(ZDefaultUI ui) { super(ui); } /** * put your documentation comment here * @param cell * @param g2 * @param cellLoc */ protected void paintBorder(ZCell cell, Graphics2D g2, ZRect cellLoc) { g2.fill3DRect(cellLoc.left, cellLoc.top, cellLoc.getWidth(), cellLoc.getHeight(), true); return; } /** * put your documentation comment here * @param cell * @param g2 * @param cellLoc */ protected void paintText(ZCell cell, Graphics2D g2, ZRect cellLoc, String str, int alignX, int alignY, ZFont font) { String text = null; if (cell.getRow() > 0) { if (leftHeadText == ZDefaultUI.NUMBER_TEXT) { text = String.valueOf(cell.getRow()); } else if (leftHeadText == ZDefaultUI.LETTER_TEXT) { text = ZDefaultSheet.strId(cell.getRow()); } } else if (cell.getCol() > 0) { if (topHeadText == ZDefaultUI.NUMBER_TEXT) { text = String.valueOf(cell.getCol()); } else if (topHeadText == ZDefaultUI.LETTER_TEXT) { text = ZDefaultSheet.strId(cell.getCol()); } } super.paintText(cell, g2, cellLoc, text, alignX, alignY, font); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?