de.unihalle.informatik.MiToBo.core.dataio.provider.cmdline
Class AwtColorDataIOCmdline

java.lang.Object
  extended by de.unihalle.informatik.Alida.dataio.provider.cmdline.ALDStandardizedDataIOCmdline
      extended by de.unihalle.informatik.MiToBo.core.dataio.provider.cmdline.AwtColorDataIOCmdline
All Implemented Interfaces:
de.unihalle.informatik.Alida.dataio.provider.ALDDataIO, de.unihalle.informatik.Alida.dataio.provider.ALDDataIOCmdline

@ALDDataIOProvider
public class AwtColorDataIOCmdline
extends de.unihalle.informatik.Alida.dataio.provider.cmdline.ALDStandardizedDataIOCmdline

Data I/O provider for Cmdline-OpRunner for java.awt.Color objects.

java.awt.Color object are represented by a string in the following format:

"rINT:bINT:gINT[:aINT]"

where INT is an integer value in the range [0,255]. The specification of an alpha-value (aINT) is optional and defaults to a255 if not specified.

TODO: Change to more readable format that is valid as argument for ALDOpRunner !!

Author:
Oliver Gress

Field Summary
 
Fields inherited from class de.unihalle.informatik.Alida.dataio.provider.cmdline.ALDStandardizedDataIOCmdline
DERIVEDCLASS_CHAR, FILEIO_CHAR
 
Constructor Summary
AwtColorDataIOCmdline()
           
 
Method Summary
 String formatAsString(Object obj)
          Converts an java.awt.Color object to a string-representation in the format "rINT:bINT:gINT:aINT".
 Object parse(Field field, Class<?> cl, String valueString)
          A java.awt.Color object is created from a string, which holds color information in the following format:

"rINT:bINT:gINT[:aINT]"

where INT is an integer value in the range [0,255].
 Collection<Class<?>> providedClasses()
           
 
Methods inherited from class de.unihalle.informatik.Alida.dataio.provider.cmdline.ALDStandardizedDataIOCmdline
formatAsString, readData, writeData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AwtColorDataIOCmdline

public AwtColorDataIOCmdline()
Method Detail

providedClasses

public Collection<Class<?>> providedClasses()

parse

public Object parse(Field field,
                    Class<?> cl,
                    String valueString)
             throws de.unihalle.informatik.Alida.exceptions.ALDDataIOProviderException
A java.awt.Color object is created from a string, which holds color information in the following format:

"rINT:bINT:gINT[:aINT]"

where INT is an integer value in the range [0,255]. The specification of an alpha-value (aINT) is optional and defaults to a255 if not specified.

Specified by:
parse in class de.unihalle.informatik.Alida.dataio.provider.cmdline.ALDStandardizedDataIOCmdline
Throws:
de.unihalle.informatik.Alida.exceptions.ALDDataIOProviderException

formatAsString

public String formatAsString(Object obj)
Converts an java.awt.Color object to a string-representation in the format "rINT:bINT:gINT:aINT". See ALDStandardizedDataIOCmdline.readData(Field, Class, String) for further format information.

Specified by:
formatAsString in class de.unihalle.informatik.Alida.dataio.provider.cmdline.ALDStandardizedDataIOCmdline


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.