java - JFace different instances of dropped POJO -


i have label wrapped in pojo. external operations delegated label.

i (internally) hook dragsource said label. transfer localselectiontransfer.

implementation of dragsourceadapter:

@override public void dragsetdata(dragsourceevent e) {       transfer.setselection(new structuredselection(this)); // *this* pojo wrapper } 

question:

on drop events (externally), if

final object newobj = ((structuredselection) transfer.getselection()).getfirstelement(); 

newobj pojo$1, or pojo$2 etc.

what's reason? why don't instanceof pojo?

as say, new structuredselection(this) inside implementation of dragsourceadapter, this implementation (an anonymous inner class of "pojo") instead of pojo itself! need instead new structuredselection(pojo.this) refer outer instance (obviously, replace pojo actual name of class).

a bit of aside, wouldn't call class concerned gui directly "pojo".


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -