| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -108,9 +108,9 @@ public void initFrame(PApplet sketch, int backgroundColor, | |||
| 108 | 108 | ||
| 109 | 109 | public void setFrameRate(float fps); | |
| 110 | 110 | ||
| 111 | - // called on the first frame so that the now-visible drawing surface can | ||
| 112 | - // receive key and mouse events | ||
| 113 | - public void requestFocus(); | ||
| 111 | + // // called on the first frame so that the now-visible drawing surface can | ||
| 112 | + // // receive key and mouse events | ||
| 113 | + // public void requestFocus(); | ||
| 114 | 114 | ||
| 115 | 115 | // // finish rendering to the screen (called by PApplet) | |
| 116 | 116 | // public void blit(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,7 +111,7 @@ public void componentResized(ComponentEvent e) { | |||
| 111 | 111 | * invokeLater() happens in here rather than requiring the caller to wrap it. | |
| 112 | 112 | */ | |
| 113 | 113 | @Override | |
| 114 | - public void requestFocus() { | ||
| 114 | + void requestFocus() { | ||
| 115 | 115 | // for 2.0a6, moving this request to the EDT | |
| 116 | 116 | EventQueue.invokeLater(new Runnable() { | |
| 117 | 117 | public void run() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -115,6 +115,7 @@ public void handle(ScrollEvent e) { | |||
| 115 | 115 | ||
| 116 | 116 | EventHandler<KeyEvent> keyHandler = new EventHandler<KeyEvent>() { | |
| 117 | 117 | public void handle(KeyEvent e) { | |
| 118 | + System.out.println(e); | ||
| 118 | 119 | fxKeyEvent(e); | |
| 119 | 120 | } | |
| 120 | 121 | }; | |
@@ -231,6 +232,7 @@ public void setVisible(boolean visible) { | |||
| 231 | 232 | Platform.runLater(new Runnable() { | |
| 232 | 233 | public void run() { | |
| 233 | 234 | stage.show(); | |
| 235 | + canvas.requestFocus(); | ||
| 234 | 236 | } | |
| 235 | 237 | }); | |
| 236 | 238 | } | |
@@ -408,11 +410,10 @@ public void setFrameRate(float fps) { | |||
| 408 | 410 | } | |
| 409 | 411 | ||
| 410 | 412 | ||
| 411 | - @Override | ||
| 412 | - public void requestFocus() { | ||
| 413 | - // TODO Auto-generated method stub | ||
| 414 | - | ||
| 415 | - } | ||
| 413 | + // @Override | ||
| 414 | + // public void requestFocus() { | ||
| 415 | + // canvas.requestFocus(); | ||
| 416 | + // } | ||
| 416 | 417 | ||
| 417 | 418 | ||
| 418 | 419 | public void setCursor(int kind) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,7 +141,7 @@ public void setSmooth(int level) { | |||
| 141 | 141 | ||
| 142 | 142 | } | |
| 143 | 143 | ||
| 144 | - public void requestFocus() { | ||
| 144 | + void requestFocus() { | ||
| 145 | 145 | // TODO Auto-generated method stub | |
| 146 | 146 | ||
| 147 | 147 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments