History log of /sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/Gesture.java
Revision Date Author Comments
a21b9b44b0db30f497b3507c8b97683387960b59 17-Sep-2012 Tor Norbye <tnorbye@google.com> Code cleanup

Replace "this.mFoo = foo" with just "mFoo = foo".

Change-Id: I44d537ebb62cd7e5c8493a0b50dcb527cd20f91c
85e4a1a9dd133abb879ec211ce8dd385004edf22 08-Aug-2012 Xavier Ducrohet <xav@android.com> Refactor common.jar

Move resources and com.android.util.Pair into layoutlib_api
where they belong since layoutlib depends on them and we need
to control the API.

Made a copy of Pair to stay in common.jar but moved it to
com.android.utils.Pair (the one in com.android.util.Pair is
marked as deprecated to prevent usage where applicable).

Also moved XmlUtil and PositionXmlParser to com.android.utils
to match Pair.

Change-Id: I21d7057d3f2ce604f86a3bb1fa3c130948c93b89
8f6e2fc89af2a75e05608d9ee1c648171ea47d83 11-Jul-2011 Tor Norbye <tnorbye@google.com> Add resize feedback tooltip

This changeset adds a "tooltip" during resize operations close to the
mouse cursor which displays feedback about the current resize
dimensions.

The feedback window is similar in appearance to a tooltip, but unlike
SWT tooltips it moves with the cursor and updates the text
dynamically, and appears immediately rather than being tied to mouse
motion timeouts. It is also partially translucent and uses a slightly
smaller font.

Change-Id: I6b663510f078f325d2f7b168c887aeff14de31b8
80d9301c2e874b29889c41adb0623666cf534fa0 10-Apr-2011 Tor Norbye <tnorbye@google.com> Resize & Guideline Support

RelativeLayout now has both drop/move and resize guidelines, and
existing constraints are visualized for the selection.

LinearLayout resizing now uses weights to change the size of nodes
rather than setting width/height.

All resize operations offer guidelines to snap to their "wrap_content"
size.

Various bug fixes in related areas as well.

Change-Id: I817e34c6e67ce61cfb137eb067076d91f69f99e9
83dba505e22985fd2f9414e7c6ef14ce29d31713 26-Oct-2010 Tor Norbye <tnorbye@google.com> Add gesture support, marquee selection, and refactoring

This checkin adds support for gestures and overlays. Gestures are
sessions of mouse/keyboard activity, and this is documented in the
javadoc for the new Gesture class. Overlays are units of graphics, and
these are documented in the Overlay javadoc. The gesture architecture
lets us isolate the logic for each different type of operation
(marquee, resize, move, etC), and with associated overlays we don't
attempt to for example paint drag feedback during a resize operation,
etc.

The checkin also adds marquee selection (as a second gesture, in
addition to the existing drag & drop based move gesture), along with
some associated changes in how the root view is treated.

As part of isolating the mouse handling and painting related to
gestures, painting etc., I also refactored the code quite a bit.
LayoutCanvas which used to be a large class has been split into a
number of new classes, one for each area of responsibility:

- The mouse listener and drag & drop code has been moved into a
GestureManager. (A lot of the drop handling code also came from the
CanvasDropListener class.)

- Code related to maintaining the set of rendered views, and
performing searches in the views, has been moved into a
ViewHierarchy class.

- Code related to selection has been moved into a SelectionManager.

- Various individual painting pieces (outline, hover, etc) have been
moved into individual Overlay classes such as OutlineOverlay,
HoverOverlay, SelectionOverlay, etc. This also moved associated
resource allocation and cleanup into the overlays.

- New coordinate classes, ControlPoint and LayoutPoint, are used
instead of ints and plain Points to make it really clear which
methods require coordinates in the layout (such as the
ViewHieararchy search methods) and which ones require coordinates in
the canvas control (such as paint methods). There are factory methods
to automatically construct the right kind of coordinate from
different types of mouse events, as well as methods to convert
between the two.

I also tweaked the visual appearance of selection a bit more, and
some other misc cleanup.

Change-Id: I666aabdcd36720bebe406b68237e8966d985fb8f