Browse Source

无jira任务 代码质量

fbp/merge
vito 5 months ago
parent
commit
b42207570a
  1. 3
      designer-realize/src/main/java/com/fr/grid/GridRowUI.java

3
designer-realize/src/main/java/com/fr/grid/GridRowUI.java

@ -32,6 +32,7 @@ import java.awt.geom.Rectangle2D;
* @since 2012-3-22下午5:54:21
*/
public class GridRowUI extends ComponentUI {
private static final int OFFSET = 2;
protected Color editedBackground = UIManager.getColor("Center.GridColumnRowEditedColor");
protected Color selectedBackground = UIManager.getColor("Center.GridColumnRowSelectedColor");
@ -166,7 +167,7 @@ public class GridRowUI extends ComponentUI {
Rectangle2D bounds = new TextLayout(paintText, gridRow.getFont(), fontRenderContext).getBounds();
double stringHeight = bounds.getHeight() * time;
// 如果高度太小了就不画了
if (stringHeight <= increaseHeight + 2) {
if (stringHeight <= increaseHeight + OFFSET) {
if (isSelectedBounds) {
g2d.setColor(gridRow.getSelectedForeground());
} else {

Loading…
Cancel
Save