com.guiseframework.component
Class AbstractLabel.DefaultTransferable

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

protected static class AbstractLabel.DefaultTransferable
extends AbstractTransferable<LabelComponent>

The default transferable object for a label.

Author:
Garret Wilson

Constructor Summary
AbstractLabel.DefaultTransferable(LabelComponent 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

AbstractLabel.DefaultTransferable

public AbstractLabel.DefaultTransferable(LabelComponent 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 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.