Package jmri.util.swing
Class DrawSquares
java.lang.Object
jmri.util.swing.DrawSquares
Common utility to draw colored rectangular Image.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DrawSquares
public DrawSquares()
-
-
Method Details
-
getImage
Produce a grid of contrasting squares. Ideally the width and height match the parent frame size.- Parameters:
width- image width in pixelsheight- image height in pixelsdim- length of sides of squares in pixelscolor1- background colorcolor2- contrasting fill color- Returns:
- the image with a grid of squares
-