- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/MagneticConstraint/Actions/VerticalTabAction.java
r967 r1102 1 1 package org.expeditee.items.MagneticConstraint.Actions; 2 2 3 import org.expeditee.g ui.Browser;4 import org.expeditee.gui.Display IO;3 import org.expeditee.gio.EcosystemManager; 4 import org.expeditee.gui.DisplayController; 5 5 import org.expeditee.items.Item; 6 6 import org.expeditee.items.MagneticConstraint.MagneticConstraintAction; … … 12 12 public boolean exec(final Item item) { 13 13 if(item.getParent() == null || !this.isSpIDERCodePage(item.getParent())) return false; 14 final int tabWidth = Browser._theBrowser.getFontMetrics(Browser._theBrowser.getFont()).stringWidth("");14 final int tabWidth = EcosystemManager.getTextLayoutManager().getStringWidth(null, " "); 15 15 tab(item, tabWidth); 16 16 return true; … … 20 20 public boolean invert(Item item) { 21 21 if(item.getParent() == null || !this.isSpIDERCodePage(item.getParent())) return false; 22 final int tabWidth = -( Browser._theBrowser.getFontMetrics(Browser._theBrowser.getFont()).stringWidth(" "));22 final int tabWidth = -(EcosystemManager.getTextLayoutManager().getStringWidth(null, " ")); 23 23 tab(item, tabWidth); 24 24 return true; … … 27 27 private void tab(final Item item, final int tabWidth) { 28 28 if(item == null) { 29 Display IO.setCursorPosition(DisplayIO.getMouseX() + tabWidth, DisplayIO.getMouseY());29 DisplayController.setCursorPosition(DisplayController.getMouseX() + tabWidth, DisplayController.getMouseY()); 30 30 } else { 31 31 final Line postTabLine = Line.getLineFromToken(item); 32 32 postTabLine.deltaX(tabWidth); 33 33 if(postTabLine.size() > 0) 34 Display IO.setCursorPosition(postTabLine.get(0).getPosition());34 DisplayController.setCursorPosition(postTabLine.get(0).getPosition()); 35 35 } 36 36 }
Note:
See TracChangeset
for help on using the changeset viewer.