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
Post a Comment