Changeset 1142 for trunk/src/org/apollo


Ignore:
Timestamp:
09/18/18 11:57:32 (6 years ago)
Author:
bln4
Message:

Used Eclipse refactoring to encapsulate Point.X and Point.Y

Location:
trunk/src/org/apollo
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/apollo/ApolloGestureActions.java

    r1098 r1142  
    170170                                for (Item i : current.getItems()) {
    171171                                        Point pos = i.getPosition();
    172                                         pos.x %= windowSize.width;
    173                                         pos.y %= windowSize.height;
     172                                        pos.setX(pos.getX() % windowSize.width);
     173                                        pos.setY(pos.getY() % windowSize.height);
    174174                                        i.setPosition(pos);
    175175                                }
  • trunk/src/org/apollo/audio/structure/AudioStructureModel.java

    r1102 r1142  
    347347                                                if (localFileName != null) {
    348348                                                        tracks.put(localFileName, new TrackModelData(
    349                                                                         initiationTime, -1, name, result.position.y)); // pass -1 for running time to signify that must be read from audio file
     349                                                                        initiationTime, -1, name, result.position.getY())); // pass -1 for running time to signify that must be read from audio file
    350350                                                }
    351351                                               
     
    389389                                                        if (virtualFilename != null) {
    390390                                                                linkedTracks.put(virtualFilename, new LinkedTrackModelData(
    391                                                                                 initiationTime, result.explink, name, result.position.y)); // pass -1 for running time to signify that must be read from audio file
     391                                                                                initiationTime, result.explink, name, result.position.getY())); // pass -1 for running time to signify that must be read from audio file
    392392                                                        }
    393393                                               
  • trunk/src/org/apollo/gui/FrameLayoutDaemon.java

    r1102 r1142  
    562562                                                        int offsetX = width / 2;
    563563                                                        int offsetY = freespaceTrackToFormat.getHeight() / 2;
    564                                                         freespaceTrackToFormat.setPosition(containerPoint.x - offsetX, containerPoint.y - offsetY);
     564                                                        freespaceTrackToFormat.setPosition(containerPoint.getX() - offsetX, containerPoint.getY() - offsetY);
    565565                                                        StandardGestureActions.resetOffset();
    566566                                                }
  • trunk/src/org/apollo/io/SampledAudioFileImporter.java

    r1102 r1142  
    2525                                f,
    2626                                DisplayController.getCurrentFrame(),
    27                                 location.x,
    28                                 location.y);
     27                                location.getX(),
     28                                location.getY());
    2929               
    3030                // Add the sampled track widget to the current frame
  • trunk/src/org/apollo/items/EmulatedTextItem.java

    r1125 r1142  
    9797                Point p = EcosystemManager.getInputManager().getCursorPosition();
    9898               
    99                 return isOnEmulatedText(p.x, p.y);
     99                return isOnEmulatedText(p.getX(), p.getY());
    100100        }
    101101       
     
    134134
    135135                // If so and the event really comes from its parent ...
    136                 if (isOnEmulatedText(p.x, p.y)) {
     136                if (isOnEmulatedText(p.getX(), p.getY())) {
    137137                       
    138138                        int yOffset = -6;
     
    154154                        {
    155155                                // 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());
    157157                               
    158158                                List<String> lines = emulatedSource.getTextList();
     
    166166                                // Move "cursored mouse"
    167167                                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));
    169169                                }
    170170                        }
     
    193193
    194194                // If so and the event really comes from its parent ...
    195                 if (isOnEmulatedText(p.x, p.y)) {
     195                if (isOnEmulatedText(p.getX(), p.getY())) {
    196196                       
    197197                        int yOffset = -6;
     
    207207                               
    208208                                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));
    210210                                }
    211211
     
    241241
    242242                // If so and the event really comes from its parent ...
    243                 if (isOnEmulatedText(p.x, p.y)) {
     243                if (isOnEmulatedText(p.getX(), p.getY())) {
    244244                       
    245245                        String toMoveIntoFreespace = null;
     
    267267                                if (target != null) {
    268268                                        Text selectionCopy = new Text(target.getNextItemID(), toMoveIntoFreespace);
    269                                         selectionCopy.setPosition(p.x, p.y);
     269                                        selectionCopy.setPosition(p.getX(), p.getY());
    270270                                        selectionCopy.setSize(emulatedSource.getSize());
    271271                                        StandardGestureActions.pickup(selectionCopy);
     
    290290
    291291                // If so and the event really comes from its parent ...
    292                 if (isOnEmulatedText(p.x, p.y)) {
     292                if (isOnEmulatedText(p.getX(), p.getY())) {
    293293                       
    294294                        emulatedSource.clearSelection();
    295                         emulatedSource.setSelectionStart(p.x, p.y, e.getButton());
     295                        emulatedSource.setSelectionStart(p.getX(), p.getY(), e.getButton());
    296296
    297297                        repaint();
     
    313313
    314314                // If so and the event really comes from its parent ...
    315                 if (isOnEmulatedText(p.x, p.y)) {
     315                if (isOnEmulatedText(p.getX(), p.getY())) {
    316316
    317317                        EcosystemManager.getGraphicsManager().setCursor(new Cursor(Cursor.CursorType.TEXT));
    318318                       
    319                         emulatedSource.setSelectionEnd(p.x, p.y);
     319                        emulatedSource.setSelectionEnd(p.getX(), p.getY());
    320320                        repaint();
    321321                       
  • trunk/src/org/apollo/widgets/LinkedTrack.java

    r1102 r1142  
    18141814                                if (y < 0) {
    18151815                                        y = LinkedTrack.this.getY() + LinkedTrack.this.getHeight() + 2;
    1816                                         animationSource.getTopLeft().y = y - 2;
     1816                                        animationSource.getTopLeft().setY(y - 2);
    18171817                                }
    18181818
  • trunk/src/org/apollo/widgets/SampledTrack.java

    r1102 r1142  
    12741274                                        ((Graphics2D)g).setStroke(EditableSampledTrackGraphView.GRAPH_BAR_STROKE);
    12751275                                        g.drawLine(
    1276                                                         containerPoint.x + me.getX(),
    1277                                                         containerPoint.y,
    1278                                                         containerPoint.x + me.getX(),
    1279                                                         containerPoint.y + me.getComponent().getHeight());
     1276                                                        containerPoint.getX() + me.getX(),
     1277                                                        containerPoint.getY(),
     1278                                                        containerPoint.getX() + me.getX(),
     1279                                                        containerPoint.getY() + me.getComponent().getHeight());
    12801280                                       
    12811281                                        DisplayController.invalidateArea(new AxisAlignedBoxBounds(
    1282                                                         containerPoint.x + me.getX(),
    1283                                                         containerPoint.y,
     1282                                                        containerPoint.getX() + me.getX(),
     1283                                                        containerPoint.getY(),
    12841284                                                        1,
    1285                                                         containerPoint.y + me.getComponent().getHeight() + 1));
     1285                                                        containerPoint.getY() + me.getComponent().getHeight() + 1));
    12861286                       
    12871287                                        // Restore clip
Note: See TracChangeset for help on using the changeset viewer.