diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index a03c97da7f..45378742e8 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties @@ -1173,7 +1173,9 @@ North.coverPane.radius = 8 Center.OuterShadowColor = #F2F4F8 Center.ZoneBorderColor = #E6E9EF -Center.GridColumnRowColor = #F8F9FC +Center.GridColumnRowColor=#e8e8e9 +Center.GridColumnRowSelectedColor=fade(@BrandColor, 12%) +Center.GridColumnRowEditedColor=#e9ecf1 Center.SpaceColor = #FFF Center.border = 0, 10, 10, 10 Center.arc=10 diff --git a/designer-realize/src/main/java/com/fr/grid/GridColumnUI.java b/designer-realize/src/main/java/com/fr/grid/GridColumnUI.java index bf430f3226..2918512194 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridColumnUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridColumnUI.java @@ -31,7 +31,10 @@ import java.awt.geom.Rectangle2D; * @since 2012-3-22下午5:51:10 */ public class GridColumnUI extends ComponentUI { - protected Color withoutDetailsBackground = UIManager.getColor("Center.GridColumnRowColor"); + protected Color backgroundColor = UIManager.getColor("Center.GridColumnRowColor"); + protected Color editedBackground = UIManager.getColor("Center.GridColumnRowEditedColor"); + protected Color selectedBackground = UIManager.getColor("Center.GridColumnRowSelectedColor"); + private int resolution ; public GridColumnUI(int resolution){ @@ -74,8 +77,8 @@ public class GridColumnUI extends ComponentUI { columnLeftWidth = columnWidthList.getRangeValue(horizontalBeginValue, columnCount).toPixD(resolution); } columnLeftWidth = Math.min(verticalLineWidth, columnLeftWidth); - if (gridColumn.getBackground() != null) { - g2d.setPaint(this.withoutDetailsBackground); + if (editedBackground != null) { + g2d.setPaint(editedBackground); GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, columnLeftWidth, size.getHeight())); } // draw left border line. @@ -114,7 +117,7 @@ public class GridColumnUI extends ComponentUI { Selection sel = reportPane.getSelection(); int[] selectedColumn = sel.getSelectedColumns(); if (IntList.asList(selectedColumn).contain(i)) { - g2d.setColor(gridColumn.getSelectedBackground()); + g2d.setColor(selectedBackground); GraphHelper.fill(g2d, new Rectangle2D.Double(tmpWidth1 + 1, 0, tmpIncreaseWidth - 1, size.height)); isSelectedBounds = true; } else { 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 97d2eb9269..d2b7391f84 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,9 @@ import java.awt.geom.Rectangle2D; */ public class GridRowUI extends ComponentUI { private Color detailsBackground = UIManager.getColor("Center.GridColumnRowColor"); + protected Color editedBackground = UIManager.getColor("Center.GridColumnRowEditedColor"); + protected Color selectedBackground = UIManager.getColor("Center.GridColumnRowSelectedColor"); + private int resolution ; GridRowUI(int resolution){ @@ -74,8 +77,8 @@ public class GridRowUI extends ComponentUI { rowTopHeight = rowHeightList.getRangeValue(verticalBeginValue, rowCount).toPixD(resolution); } rowTopHeight = Math.min(horizontalLineHeight, rowTopHeight); - if (gridRow.getBackground() != null) { - g2d.setPaint(this.detailsBackground); + if (editedBackground != null) { + g2d.setPaint(editedBackground); GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, size.getWidth(), rowTopHeight)); } // draw top border line. @@ -110,7 +113,7 @@ public class GridRowUI extends ComponentUI { Selection sel = reportPane.getSelection(); int[] selectedRows = sel.getSelectedRows(); if (IntList.asList(selectedRows).contain(i)) { - g2d.setPaint(gridRow.getSelectedBackground()); + g2d.setPaint(selectedBackground); GraphHelper.fill(g2d, new Rectangle2D.Double(0, tmpHeight1 + 1, size.width, tmpIncreaseHeight - 1)); isSelectedBounds = true; } else {