com.guiseframework.component
Class TextControl.DefaultTransferable

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

protected static class TextControl.DefaultTransferable
extends AbstractTransferable<TextControl<?>>

The default transferable object for a text control.

Author:
Garret Wilson

Constructor Summary
TextControl.DefaultTransferable(TextControl<?> 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

TextControl.DefaultTransferable

public TextControl.DefaultTransferable(TextControl<?> 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 text/plain content type.

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.