diff --git a/designer-realize/src/main/java/com/fr/grid/GridRowUI.java b/designer-realize/src/main/java/com/fr/grid/GridRowUI.java index e979aa9950..5a7f0bf420 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridRowUI.java +++ b/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 {