Package com.luna.common.swing
Class ImageSelection
java.lang.Object
com.luna.common.swing.ImageSelection
- All Implemented Interfaces:
Transferable
,Serializable
图片转换器,用于将图片对象转换为剪贴板支持的对象
此对象也用于将图像文件和
此对象也用于将图像文件和
DataFlavor.imageFlavor
元信息对应- Since:
- 4.5.6
- Author:
- looly
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetTransferData
(DataFlavor flavor) 获取图片获取元数据类型信息boolean
isDataFlavorSupported
(DataFlavor flavor) 是否支持指定元数据类型
-
Constructor Details
-
ImageSelection
构造- Parameters:
image
- 图片
-
-
Method Details
-
getTransferDataFlavors
获取元数据类型信息- Specified by:
getTransferDataFlavors
in interfaceTransferable
- Returns:
- 元数据类型列表
-
isDataFlavorSupported
是否支持指定元数据类型- Specified by:
isDataFlavorSupported
in interfaceTransferable
- Parameters:
flavor
- 元数据类型- Returns:
- 是否支持
-
getTransferData
获取图片- Specified by:
getTransferData
in interfaceTransferable
- Parameters:
flavor
- 元数据类型- Returns:
- 转换后的对象
- Throws:
UnsupportedFlavorException
-