Changeset 1142 for trunk/src/org/apollo/items
- Timestamp:
- 09/18/18 11:57:32 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/apollo/items/EmulatedTextItem.java
r1125 r1142 97 97 Point p = EcosystemManager.getInputManager().getCursorPosition(); 98 98 99 return isOnEmulatedText(p. x, p.y);99 return isOnEmulatedText(p.getX(), p.getY()); 100 100 } 101 101 … … 134 134 135 135 // If so and the event really comes from its parent ... 136 if (isOnEmulatedText(p. x, p.y)) {136 if (isOnEmulatedText(p.getX(), p.getY())) { 137 137 138 138 int yOffset = -6; … … 154 154 { 155 155 // Insert the text according to the current mouse position 156 Point newMouse = emulatedSource.insertChar(e.getKeyChar(), p. x, p.y);156 Point newMouse = emulatedSource.insertChar(e.getKeyChar(), p.getX(), p.getY()); 157 157 158 158 List<String> lines = emulatedSource.getTextList(); … … 166 166 // Move "cursored mouse" 167 167 if (newMouse != null) { 168 EcosystemManager.getInputManager().setCursorPosition(new Point((int) newMouse. x, (int) newMouse.y+ yOffset));168 EcosystemManager.getInputManager().setCursorPosition(new Point((int) newMouse.getX(), (int) newMouse.getY() + yOffset)); 169 169 } 170 170 } … … 193 193 194 194 // If so and the event really comes from its parent ... 195 if (isOnEmulatedText(p. x, p.y)) {195 if (isOnEmulatedText(p.getX(), p.getY())) { 196 196 197 197 int yOffset = -6; … … 207 207 208 208 if (newMouse != null) { 209 EcosystemManager.getInputManager().setCursorPosition(new Point((int) newMouse. x, (int) newMouse.y+ yOffset));209 EcosystemManager.getInputManager().setCursorPosition(new Point((int) newMouse.getX(), (int) newMouse.getY() + yOffset)); 210 210 } 211 211 … … 241 241 242 242 // If so and the event really comes from its parent ... 243 if (isOnEmulatedText(p. x, p.y)) {243 if (isOnEmulatedText(p.getX(), p.getY())) { 244 244 245 245 String toMoveIntoFreespace = null; … … 267 267 if (target != null) { 268 268 Text selectionCopy = new Text(target.getNextItemID(), toMoveIntoFreespace); 269 selectionCopy.setPosition(p. x, p.y);269 selectionCopy.setPosition(p.getX(), p.getY()); 270 270 selectionCopy.setSize(emulatedSource.getSize()); 271 271 StandardGestureActions.pickup(selectionCopy); … … 290 290 291 291 // If so and the event really comes from its parent ... 292 if (isOnEmulatedText(p. x, p.y)) {292 if (isOnEmulatedText(p.getX(), p.getY())) { 293 293 294 294 emulatedSource.clearSelection(); 295 emulatedSource.setSelectionStart(p. x, p.y, e.getButton());295 emulatedSource.setSelectionStart(p.getX(), p.getY(), e.getButton()); 296 296 297 297 repaint(); … … 313 313 314 314 // If so and the event really comes from its parent ... 315 if (isOnEmulatedText(p. x, p.y)) {315 if (isOnEmulatedText(p.getX(), p.getY())) { 316 316 317 317 EcosystemManager.getGraphicsManager().setCursor(new Cursor(Cursor.CursorType.TEXT)); 318 318 319 emulatedSource.setSelectionEnd(p. x, p.y);319 emulatedSource.setSelectionEnd(p.getX(), p.getY()); 320 320 repaint(); 321 321
Note:
See TracChangeset
for help on using the changeset viewer.