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, BLACK
Copyright (c) 2003-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.- Author:
- Alexander Verbraeck
-
-
Constructor Summary
Constructors Constructor Description ColorAdapter()
-
-
-
Method Detail
-
unmarshal
public Color unmarshal(String field) throws IllegalArgumentException
- Specified by:
unmarshal
in classjavax.xml.bind.annotation.adapters.XmlAdapter<String,Color>
- Throws:
IllegalArgumentException
-
marshal
public String marshal(Color color) throws IllegalArgumentException
- Specified by:
marshal
in classjavax.xml.bind.annotation.adapters.XmlAdapter<String,Color>
- Throws:
IllegalArgumentException
-
-