Changeset 3859 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2011-02-05T19:47:07+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Utils.java
r3848 r3859 2 2 package org.openstreetmap.josm.tools; 3 3 4 import java.awt.Color; 4 5 import java.util.Collection; 5 6 … … 110 111 return s.toString(); 111 112 } 113 114 /** 115 * convert Color to String 116 * (Color.toString() omits alpha value) 117 */ 118 public static String toString(Color c) { 119 if (c == null) 120 return "null"; 121 if (c.getAlpha() == 255) 122 return String.format("#%06x", c.getRGB() & 0x00ffffff); 123 else 124 return String.format("#%06x(alpha=%d)", c.getRGB() & 0x00ffffff, c.getAlpha()); 125 } 112 126 }
Note:
See TracChangeset
for help on using the changeset viewer.