Menu

Modify graphic objects

Developers
prince
2010-05-19
2013-04-26
  • prince

    prince - 2010-05-19

    Each graphic object has popup menu with options ""Move To Front", "Move To Back", "Move Forward" and "Move Backward". As I understand, these options only change position of the graphic object in the container, but they not change the view of the object. Is so, why does user need these option ?

    Pls correct me if I am mistaken.

     
  • Codist Monk

    Codist Monk - 2010-05-19

    If you draw a blue rectangle, and then a green rectangle over it, and then click "Move Backward" on the green rectangle, it should go behind the blue rectangle.

     
  • prince

    prince - 2010-06-24

    Do we need mouseMoved and mouseDragged functions in Slide class ? Isn't enough to have them in Graphic object only ?

     
  • Codist Monk

    Codist Monk - 2010-06-24

    When the mouse is moved quickly while dragging a component or resize handle, it can go outside the object being dragged.
    When the glass pane was still in its early stages, that phenomenon caused the events to be dispatched not to the selected component, but instead to the component below the mouse, which was usually the slide.
    But now, with all the modifications and improvements to the glass pane, it may no longer be necessary so we should probably remove it (and call startResizingSelection() when an object is created).

    As far as I can tell, mouseMoved() doesn't serve any purpose; the current code tries to update the mouse cursor but it seems broken.

     
  • prince

    prince - 2010-06-24

    I was trying without these functions - didn't work good. Took some seconds till drawing shape started, it was flicking also.
    OK, let's stay these functions for now.

     
  • prince

    prince - 2010-07-01

    codistmonk, after your last changes of GraphicObject, revision 203, the selection stopped to work correctly. Look at following scenario:

    1. Draw rectangle.
    2. Draw oval which is MORE WIDE THAN RECTANGLE and doesn't intersect rectangle at all.
    3. Try to select rectagle from 1. Result: oval is returned selected.

    Reason:
    In MouseHandler.selectGraphicObjectByPoint(): startIndex = index of oval object.
    component.contains(point) returns TRUE (component = oval) because:

        @Override
        public final boolean contains(final Point point) {
            return this.containsPoint(getPointRelativeToParent(this, point));
        }

    getPointRelativeToParent calculates point RELATED TO OVAL OBJECT (but user selected rectangle object), so containsPoint will return TRUE.

    Bottom line, I am supporting all improvements in code but I really don't know why did we need all of this just for support component.contains() function. We agreed that Graphic object will work in coordinates of Slide and I impemented all functions up to it.

    May be it is better to return version of code ?

    Sorry in advance if I was a little rough. I am not a  native english speaker.

     
  • Codist Monk

    Codist Monk - 2010-07-01

    I replaced GraphicObject with its version from r202, effectively reverting all modifications from r203-r204.

    It should now be like it was before.

     
  • prince

    prince - 2010-07-02

    Regarding to Kyle's post into "Draw one shape over another - ID: 3015570" : it works fine to me, I can draw line/arrow over a rectangle in borders of rectangle.

    I don't have an option to add the post into the bug itself (don't know why), so I am answering here.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.