Package jmri.util.swing
Class DrawSquares
- java.lang.Object
-
- jmri.util.swing.DrawSquares
-
public class DrawSquares extends java.lang.Object
Common utility to draw colored rectangular Image.
-
-
Constructor Summary
Constructors Constructor Description DrawSquares()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.image.BufferedImage
getImage(int width, int height, int dim, java.awt.Color color1, java.awt.Color color2)
Produce a grid of contrasting squares.
-
-
-
Constructor Detail
-
DrawSquares
public DrawSquares()
-
-
Method Detail
-
getImage
public static java.awt.image.BufferedImage getImage(int width, int height, int dim, java.awt.Color color1, java.awt.Color color2)
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
-
-