Ignore:
Timestamp:
05/10/18 16:04:51 (6 years ago)
Author:
davidb
Message:

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/actions/ExploratorySearchActions.java

    r919 r1102  
    1919package org.expeditee.actions;
    2020
     21import org.expeditee.core.Point;
     22import org.expeditee.gio.EcosystemManager;
     23import org.expeditee.gio.gesture.StandardGestureActions;
    2124import org.expeditee.gui.Browser;
    22 import org.expeditee.gui.DisplayIO;
     25import org.expeditee.gui.DisplayController;
    2326import org.expeditee.gui.Frame;
    2427import org.expeditee.gui.FrameIO;
    25 import org.expeditee.gui.FrameKeyboardActions;
    26 import org.expeditee.gui.FrameMouseActions;
    2728import org.expeditee.gui.FreeItems;
    2829import org.expeditee.items.Item;
     
    5960                        }
    6061                       
    61                         Text linkToBrowserSession = DisplayIO.getCurrentFrame().addText(FrameMouseActions.getX(), FrameMouseActions.getY(), " - Web Browser Session", null);
    62                         linkToBrowserSession.setParent(DisplayIO.getCurrentFrame());
    63                         FrameKeyboardActions.AddDate(linkToBrowserSession);
    64                         FrameMouseActions.pickup(linkToBrowserSession);
     62                        Text linkToBrowserSession = DisplayController.getCurrentFrame().addText(DisplayController.getMouseX(), DisplayController.getMouseY(), " - Web Browser Session", null);
     63                        linkToBrowserSession.setParent(DisplayController.getCurrentFrame());
     64                        Text.AddDate(linkToBrowserSession);
     65                        StandardGestureActions.pickup(linkToBrowserSession);
    6566                       
    6667                        // Create new frame
     
    7576                        // Add web browser active overlay and @old
    7677                        Text t = (Text) frame.addText(-150, 50, "@ao: 2", null, "overlayset2");
    77                         t.setAnchorRight(-100.0f);
    78                         t.setAnchorTop(50.0f);
     78                        t.setAnchorRight(-100);
     79                        t.setAnchorTop(50);
    7980                        t = (Text) frame.addText(-150, 50, "@old", null);
    8081                        t.setFamily("Roboto Condensed");
     
    8485                        t.setJustification(Justification.right);
    8586                        t.setLinkMark(false);
    86                         t.setAnchorLeft(9.0f);
    87                         t.setAnchorBottom(114.0f);
     87                        t.setAnchorLeft(9);
     88                        t.setAnchorBottom(114);
    8889                       
    8990                        Text wt;
     
    101102                                                + ("--anchorLeft " + (lm + ExploratorySearchSettings.BROWSER_HORZ_OFFSET) + " --anchorRight " + rm + " --anchorTop "
    102103                                                + (ExploratorySearchSettings.BROWSER_VERT_OFFSET + tm) + " --anchorBottom " + bm + " ")
    103                                                 + (Browser._theBrowser.getContentPane().getWidth() - ExploratorySearchSettings.BROWSER_HORZ_OFFSET - lm - rm) + " "
    104                                                 + (Browser._theBrowser.getContentPane().getHeight() - ExploratorySearchSettings.BROWSER_VERT_OFFSET - tm - bm) + " : " + url, null);
     104                                                + (EcosystemManager.getGraphicsManager().getWindowSize().getWidth() - ExploratorySearchSettings.BROWSER_HORZ_OFFSET - lm - rm) + " "
     105                                                + (EcosystemManager.getGraphicsManager().getWindowSize().getHeight() - ExploratorySearchSettings.BROWSER_VERT_OFFSET - tm - bm) + " : " + url, null);
    105106                        } else {
    106107                                wt = frame.addText(ExploratorySearchSettings.BROWSER_HORZ_OFFSET + lm, ExploratorySearchSettings.BROWSER_VERT_OFFSET + tm,
     
    122123                // Replace any text item on cursor with link to a new mindmap
    123124                FreeItems.getInstance().clear();
    124                 Text text = DisplayIO.getCurrentFrame().addText(FrameMouseActions.getX(), FrameMouseActions.getY(), " - Mindmap Session", null);
    125                 text.setParent(DisplayIO.getCurrentFrame());
    126                 FrameKeyboardActions.AddDate(text);
    127                 FrameMouseActions.pickup(text);
     125                Point cursorPos = DisplayController.getMousePosition();
     126                Text text = DisplayController.getCurrentFrame().addText(cursorPos.getX(), cursorPos.getY(), " - Mindmap Session", null);
     127                text.setParent(DisplayController.getCurrentFrame());
     128                Text.AddDate(text);
     129                StandardGestureActions.pickup(text);
    128130                Frame frame = FrameIO.CreateNewFrame(text);
    129131                text.setLink("" + frame.getNumber());
     
    132134                frame.removeAllItems(frame.getItems());
    133135                Text t = (Text) frame.addText(-150, 50, "@ao: 2", null, "overlayset3");
    134                 t.setAnchorLeft(-150.0f);
    135                 t.setAnchorTop(50.0f);
     136                t.setAnchorLeft(-150);
     137                t.setAnchorTop(50);
    136138                t = (Text) frame.addText(-150, 50, "@old", null);
    137139                t.setFamily("Roboto Condensed");
     
    141143                t.setJustification(Justification.right);
    142144                t.setLinkMark(false);
    143                 t.setAnchorLeft(9.0f);
    144                 t.setAnchorBottom(114.0f);
     145                t.setAnchorLeft(9);
     146                t.setAnchorBottom(114);
    145147               
    146148                FrameIO.SaveFrame(frame);
     
    168170                        }
    169171                       
    170                         Text linkToBrowserSession = DisplayIO.getCurrentFrame().addText(FrameMouseActions.getX(), FrameMouseActions.getY(), url, null);
    171                         linkToBrowserSession.setParent(DisplayIO.getCurrentFrame());
    172                         FrameMouseActions.pickup(linkToBrowserSession);
     172                        Point cursorPos = DisplayController.getMousePosition();
     173                        Text linkToBrowserSession = DisplayController.getCurrentFrame().addText(cursorPos.getX(), cursorPos.getY(), url, null);
     174                        linkToBrowserSession.setParent(DisplayController.getCurrentFrame());
     175                        StandardGestureActions.pickup(linkToBrowserSession);
    173176                       
    174177                        // Create new frame
     
    183186                        // Add web browser active overlay and @old
    184187                        Text t = (Text) frame.addText(-150, 50, "@ao: 2", null, "overlayset2");
    185                         t.setAnchorLeft(-150.0f);
    186                         t.setAnchorTop(50.0f);
     188                        t.setAnchorLeft(-150);
     189                        t.setAnchorTop(50);
    187190                        t = (Text) frame.addText(-150, 50, "@old", null);
    188191                        t.setFamily("Roboto Condensed");
     
    192195                        t.setJustification(Justification.right);
    193196                        t.setLinkMark(false);
    194                         t.setAnchorLeft(9.0f);
    195                         t.setAnchorBottom(114.0f);
     197                        t.setAnchorLeft(9);
     198                        t.setAnchorBottom(114);
    196199                       
    197200                        Text wt;
     
    209212                                                + ("--anchorLeft " + (lm + ExploratorySearchSettings.BROWSER_HORZ_OFFSET) + " --anchorRight " + rm + " --anchorTop "
    210213                                                + (ExploratorySearchSettings.BROWSER_VERT_OFFSET + tm) + " --anchorBottom " + bm + " ")
    211                                                 + (Browser._theBrowser.getContentPane().getWidth() - ExploratorySearchSettings.BROWSER_HORZ_OFFSET - lm - rm) + " "
    212                                                 + (Browser._theBrowser.getContentPane().getHeight() - ExploratorySearchSettings.BROWSER_VERT_OFFSET - tm - bm) + " : " + url, null);
     214                                                + (EcosystemManager.getGraphicsManager().getWindowSize().getWidth() - ExploratorySearchSettings.BROWSER_HORZ_OFFSET - lm - rm) + " "
     215                                                + (EcosystemManager.getGraphicsManager().getWindowSize().getHeight() - ExploratorySearchSettings.BROWSER_VERT_OFFSET - tm - bm) + " : " + url, null);
    213216                        } else {
    214217                                wt = frame.addText(ExploratorySearchSettings.BROWSER_HORZ_OFFSET + lm, ExploratorySearchSettings.BROWSER_VERT_OFFSET + tm,
Note: See TracChangeset for help on using the changeset viewer.