Class ImageHelper
java.lang.Object
net.simplace.ui.service.ImageHelper
Helper methods and constants for images and colors.
- Author:
- Andreas Enders
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNamed color constants, taken from the Netscape color list (http://mindprod.com/jgloss/netscapecolours.html). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleansavePanelToFile(JPanel aPanel, File aFile) Paints a panel into an image and saves it to a file.
-
Constructor Details
-
ImageHelper
public ImageHelper()
-
-
Method Details
-
savePanelToFile
Paints a panel into an image and saves it to a file. The image format is taken from the file extension (e.g.png,jpg).- Parameters:
aPanel- panel to save; its current size is used as image sizeaFile- target file- Returns:
trueif the image was written,falseif an I/O error occurred
-