Package org.opentrafficsim.xml.bindings
Class ColorAdapter
-
public class ColorAdapter extends javax.xml.bind.annotation.adapters.XmlAdapter<String,Color>
ColorAdapter to convert between Color and a String representation of the Color. Allowed representations are:
- #RRGGBB as three hexadecimal values
- RGB(r,g,b) where r, g and b are bytes - well known color string such as RED, GREEN, BLACKCopyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck
-
-
Constructor Summary
Constructors Constructor Description ColorAdapter()
-
-
-
Method Detail
-
unmarshal
public Color unmarshal(String field) throws IllegalArgumentException
- Specified by:
unmarshalin classjavax.xml.bind.annotation.adapters.XmlAdapter<String,Color>- Throws:
IllegalArgumentException
-
marshal
public String marshal(Color color) throws IllegalArgumentException
- Specified by:
marshalin classjavax.xml.bind.annotation.adapters.XmlAdapter<String,Color>- Throws:
IllegalArgumentException
-
-