Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > [gef-cvs] CVS update: /gef/src/org/tigris/gef/base/

gef
Discussion topic

Back to topic list

[gef-cvs] CVS update: /gef/src/org/tigris/gef/base/

Reply

Author raphael
Full name Raphael Langerhorst
Date 2003-05-31 09:01:33 PDT
Message User: raphael
Date: 03/05/31 09:01:33

Modified
 /gef/src/org/tigris/gef/base/
  LayerGrid.java

Log
 Issue number: 27
 Obtained from: jjones
 Submitted by: raphael
 Reviewed by:

File Changes:

Directory: /gef/src/org/tigris/gef/base/
====================​====================​

File [changed]: LayerGrid.java
Url: http://gef.tigris.or​g/source/browse/gef/​src/org/tigris/gef/b​ase/LayerGrid.java.d​iff?r1=1.2&r2=1.​3
Delta lines: +19 -2
--------------------
--- LayerGrid.java 6 Mar 2002 08:42:54 -0000 1.2
+++ LayerGrid.java 31 May 2003 16:01:33 -0000 1.3
@@ -27,13 +27,15 @@
 // File: LayerGrid.java
 // Classes: LayerGrid
 // Original Author: jrobbins at ics dot uci dot edu
-// $Id: LayerGrid.java,v 1.2 2002/03/06 08:42:54 1sturm Exp $
+// $Id: LayerGrid.java,v 1.3 2003/05/31 16:01:33 raphael Exp $
 
 package org.tigris.gef.base;
 
 import java.util.*;
 import java.awt.*;
 
+import javax.swing.UIManager;
+
 import org.tigris.gef.presentation.*;
 
 /** Paint a background drawing guide consisting of horizontal and
@@ -98,7 +100,22 @@
   // constructors
 
   /** Construct a new LayerGrid and name it 'Grid'. */
- public LayerGrid() { super("Grid"); }
+ public LayerGrid() {
+ super("Grid");
+ //Use the default background color as the color between the lines and dots
+ _bgColor = UIManager.getColor("​Panel.background");
+ if (_bgColor == null) {
+ _bgColor = Color.lightGray;
+ }
+
+ // The color of the lines and dots should be slightly darker than the
+ // background color
+ final float scale = 0.9f;
+ _color = new Color(
+ (int) (_bgColor.getRed() * scale),
+ (int) (_bgColor.getGreen() * scale),
+ (int) (_bgColor.getBlue() * scale));
+ }
 
   /** Construct a new LayerGrid with the given foreground color,
    * background color, line spacing, and lines/dots flag. */




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe at gef dot tigris dot org
For additional commands, e-mail: cvs-help at gef dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

[gef-cvs] CVS update: /gef/src/org/tigris/gef/base/ raphael Raphael Langerhorst 2003-05-31 09:01:33 PDT
Messages per page: