2.3 Frameworks for Interactive Tables
2.3.1 DiamondSpin
DiamondSpin [Shen, Vernier, Forlines, and Ringel, 2004] is a Java framework for Dia- mondTouch [Dietz and Leigh, 2001]. Being developed with DiamondTouch in mind has resulted in a well-developed model of concurrent multi-user, multi-touch interaction, and binding it to Java has made it straightforward to port existing concepts of windowing interfaces from vertical displays to the tabletop, by leveraging Java’s Swing API.
In designing DiamondSpin, the following functionality requirements were considered fundamental for tabletop user interfaces [Shen et al., 2004]:
• Visual document management, • Document control and interaction, • Manipulation,
• RotationalUser Interface (UI), • Digital tabletop layout, and • Multi-user support.
Figure 2.2: DiamondSpin Software Architecture
from http: // diamondspin. free. fr/, verified 2008-01-31, copyright §D.1
Here, a document is typically any persistent on-screen object such as a loaded image or a region of text. Cruiser, too, considers these requirements in its design (§3.5), but has a special focus on providing reusable functionality for the application programmer, as well as addressing functionality from the user view of the interface.
The DiamondSpin architecture is shown in Figure 2.2, the key functionality is provided by the following Java classes:
DSApplication Program entry point and initialisation.
DSTabletopPane Providing translation (and rotation) of on-screen objects using Cartesian coordinates to and from polar coordinates. Includes background image and facility to rotate the entire environment.
DSMenuBar Provides menu functionality akin to traditional menu bars, but allows multiple (per-user) menu bars, along the edge of the interface, and these may be moved around.
DSPopupMenu A circular pop-up context menu (pie menu), activated with a double-tap. DSFrame A holder for Java Swing windowing components (text boxes, buttons, etc.), with additional control points for zoom, rotate, resize and peel. These manipulations are activated via an underlain square in each corner of the frame.
DSStroke Provides free-hand drawn objects, using the finger as a brush.
DSAnnotationPanel A component that may be overlaid on a DSFrame to support annotation with DSStrokes.
2.3. Frameworks for Interactive Tables CHAPTER 2. BACKGROUND
One key aspect of the framework is its set of techniques for automatically orienting virtual objects according to their location on the table. For example, objects may orient automatically to point outward, along radial lines; or the table may be divided into halves, or quadrants, so that objects align themselves orthographically with an edge.
A strength of DiamondSpin is its ability to utilise existing widgetsfrom the Java Swing
API. Thus interface objects for buttons, text boxes, tabbed panes, scroll bars, etc. are already written. However, there is some argument as to whether these, legacy interface objects (see §6.1) are appropriate for tabletop interfaces [Shen et al., 2007]. Furthermore, these interface widgets operate only under aJava Virtual Machine (JVM)and are unsuited for efficient rendering in a graphics-accelerated environment, such as OpenGL.
A number of other applications have been developed, including “Table for N” for collaborative document manipulation, an “opportunistic browsing coffee table”, a “Collage Builder” and the “Poetry Table”. The applications built are an indication of the effectiveness of the toolkit.
UbiTable
Shen, Everitt, and Ryall [2003a] used DiamondTouch and DiamondSpin to encourage impromptu collaboration and sharing of active workspaces across wirelessly connected laptops in the development of the UbiTable project. Everitt, Forlines, Ryall, and Shen [2004] studied 14 participants (in pairs) using the UbiTable application with two laptops and a DiamondTouch. After a tutorial, participants were each asked to transfer an image of a molecule from their laptop to the DiamondTouch, draw a tally of the atoms from both molecules and then save the tally and their partner’s molecule onto their own laptop, by dragging the images to their side of the table. The authors observed that fingertip direct manipulation shows good potential for easy learnability, but that object ownership was sometimes unclear. The work also found that users were uncomfortable with their partner being able to move documents into their personal space and thus onto their own laptop. Summary
DiamondSpin’s reliance on DiamondTouch and Java ultimately limits its usefulness. Plugins – loadable code that can be detected at runtime – are essential for additions to a framework to be reused across applications, for encapsulation, and for enhanced maintainability. Java’s support for this has been poor until recent contributions by the open source community and the Java Plug-in Framework Project (JPF)5, which grew out of plugin requirements for the EclipseIntegrated Development Environment (IDE), and reached production quality in 2007; well after the release of DiamondSpin.
It is often beneficial to integrate existing libraries outside the scope of theJava Runtime Environment (JRE), but Java makes it difficult to leverage existing utilities in the open source community. For example, reading Exifdata from photographs can be accomplished using the libexif library6, implemented in C. Using libexif from C or C++is straightforward.
However, incorporating non-Java code into Java applications is fraught with maintainability problems, as not only does the C library code need to be compiled on each targeted platform, but also C wrapper code must be provided, maintained and compiled; and Java Native Interface (JNI) bindings (additional Java code) must be provided to access the library through the wrapper in Java. Such tasks can be made slightly easier using tools such as SWIG, the Simplified Wrapper and Interface Generator7, but this only solves one direction – calling C/C++from Java. Calling Java code from non-Java applications has additional
5
http://jpf.sourceforge.net/
6
http://libexif.sourceforge.net/
complications, ultimately resulting in an undesirable platform-lock-in to the Java Virtual Machine.
While planned8, DiamondSpin is also currently unable to leverage the accelerated graphics capabilities of a dedicated graphics card. For tasks as graphically intensive as high- resolution photo sharing, in a multi-user, multi-orientation environment, the performance loss from not using accelerated graphics is significant. For example, it is enough to make the software unusable for large photograph collections.