com.guiseframework.component
Class AbstractImageComponent.DefaultTransferable

java.lang.Object
  extended by com.guiseframework.component.transfer.AbstractTransferable<ImageComponent>
      extended by com.guiseframework.component.AbstractImageComponent.DefaultTransferable
All Implemented Interfaces:
Transferable<ImageComponent>
Enclosing class:
AbstractImageComponent

protected static class AbstractImageComponent.DefaultTransferable
extends AbstractTransferable<ImageComponent>

The default transferable object for an image.

Author:
Garret Wilson

Constructor Summary
AbstractImageComponent.DefaultTransferable(ImageComponent source)
          Source constructor.
 
Method Summary
 com.globalmentor.net.ContentType[] getContentTypes()
          Determines the content types available for this transfer.
 java.lang.Object transfer(com.globalmentor.net.ContentType contentType)
          Transfers data using the given content type.
 
Methods inherited from class com.guiseframework.component.transfer.AbstractTransferable
canTransfer, getSource, transfer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractImageComponent.DefaultTransferable

public AbstractImageComponent.DefaultTransferable(ImageComponent source)
Source constructor.

Parameters:
source - The source of the transferable data.
Throws:
java.lang.NullPointerException - if the provided source is null.
Method Detail

getContentTypes

public com.globalmentor.net.ContentType[] getContentTypes()
Determines the content types available for this transfer. This implementation returns a URI-list content type and the content type of the label.

Returns:
The content types available for this transfer.

transfer

public java.lang.Object transfer(com.globalmentor.net.ContentType contentType)
Transfers data using the given content type.

Parameters:
contentType - The type of data expected.
Returns:
The transferred data, which may be null.
Throws:
java.lang.IllegalArgumentException - if the given content type is not supported.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.