source:
java/SwingComponents/src/net/oni2/swingcomponents/ColorCopy.java
Last change on this file was 849, checked in by , 12 years ago | |
---|---|
File size: 352 bytes |
Line | |
---|---|
1 | package net.oni2.swingcomponents; |
2 | |
3 | import java.awt.Color; |
4 | |
5 | /** |
6 | * @author Christian Illy |
7 | */ |
8 | public class ColorCopy { |
9 | /** |
10 | * @param orig |
11 | * Color to copy |
12 | * @return New color instance with same RGB but 100% opaque |
13 | */ |
14 | public static Color copyColor(Color orig) { |
15 | return new Color(orig.getRed(), orig.getGreen(), orig.getBlue()); |
16 | } |
17 | } |
Note:
See TracBrowser
for help on using the repository browser.