java - What does the use of copyFor() in javaFX -



java - What does the use of copyFor() in javaFX -

i've searched on online , didn't found clear explanation utilize of copyfor() method in javafx used on keyevent.copyfor(event.getsource(), event.gettarget()). method used on next code.

private keyevent remap(keyevent event) { keyevent newevent = new keyevent( event.geteventtype(), event.getcharacter(), event.gettext(), event.getcode(), !event.isshiftdown(), event.iscontroldown(), event.isaltdown(), event.ismetadown() ); homecoming newevent.copyfor(event.getsource(), event.gettarget()); }

as per documentation:

creates , returns re-create of event specified event source , target.

this means copies event handler new source , target. possible utilize if wanted key combination perform specific event on 2 different nodes.

java methods javafx keyevent

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -