This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is exactly the parameter in the Constructor "TransferHandler(String property)"?  RSS feed

 
Walter Wangzhichao
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
,this is my first question on this website.
the JDK API said this construtor
"TransferHandler(String property)
Constructs a transfer handler that can transfer a Java Bean property from one component to another via the clipboard or a drag and drop operation."

but I still don't know which parameter “String property” is exactly can be used, so please tell how to find which parameter can use when in the same situation.
Thank you Very much~
 
Rob Camick
Ranch Hand
Posts: 2754
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You specify the property of a Bean to be transferred. For example is DnD is supported on a JLabel you could use "text" in which case the text of the label would be copied. Or you could use "icon" in which case the icon would be copied. I've never tested it but in theory you can copy any property that has get/set methods.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...and welcome to the Ranch!
 
Walter Wangzhichao
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Camick wrote:You specify the property of a Bean to be transferred. For example is DnD is supported on a JLabel you could use "text" in which case the text of the label would be copied. Or you could use "icon" in which case the icon would be copied. I've never tested it but in theory you can copy any property that has get/set methods.

Thank you for answering the question.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!