pax_global_header 0000666 0000000 0000000 00000000064 13011616643 0014513 g ustar 00root root 0000000 0000000 52 comment=6b687ef76236e79d43fe9b918a1d06fc357ac81e
malai-2.0+ds1/ 0000775 0000000 0000000 00000000000 13011616643 0013122 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/.gitignore 0000664 0000000 0000000 00000000015 13011616643 0015106 0 ustar 00root root 0000000 0000000 *.class
bin/
malai-2.0+ds1/README.md 0000664 0000000 0000000 00000002645 13011616643 0014410 0 ustar 00root root 0000000 0000000 Malai
=====
libMalai is a Java implementation of the Malai architectural design pattern.
Malai can be viewed as an major step beyond MVC where the controller has been completely rethought to consider modern evolutions of the interactivity of systems.
Malai can also be viewed as MVP architecture focusing on modern concerns:
- More and more interactivity in software systems (with more and more post-WIMP interactions)
- Multi-platform development thanks to its modularity
Malai is based on the following HCI concepts: Norman's action model, instrumental interaction, direct manipulation, the interactor concept, and the DPI model.
Research papers on Malai:
- Blouin A. and Beaudoux O. Improving modularity and usability of interactive systems with Malai, EICS'10: Proceedings of the 2nd ACM SIGCHI symposium on Engineering interactive computing systems http://hal.archives-ouvertes.fr/docs/00/47/76/27/PDF/BLOUIN10a.pdf
- Blouin A., Morin B., Beaudoux O., Nain G., Albers P., and Jézéquel J.-M. Combining Aspect-Oriented Modeling with Property-Based Reasoning to Improve User Interface Adaptation, EICS'11: Proceedings of the 3rd ACM SIGCHI symposium on Engineering interactive computing systems, 85-94 http://hal.inria.fr/inria-00590891/PDF/main.pdf
- Blouin A. Un modèle pour l'ingénierie des systèmes interactifs dédiés à la manipulation de données, Ph.D. thesis http://tel.archives-ouvertes.fr/docs/00/44/63/14/PDF/these.pdf
malai-2.0+ds1/malai-core/ 0000775 0000000 0000000 00000000000 13011616643 0015133 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/ 0000775 0000000 0000000 00000000000 13011616643 0020423 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/.classpath 0000664 0000000 0000000 00000001034 13011616643 0022404 0 ustar 00root root 0000000 0000000
malai-2.0+ds1/malai-core/org.malai.android/.gitignore 0000664 0000000 0000000 00000000015 13011616643 0022407 0 ustar 00root root 0000000 0000000 /target
/bin
malai-2.0+ds1/malai-core/org.malai.android/.project 0000664 0000000 0000000 00000000570 13011616643 0022074 0 ustar 00root root 0000000 0000000
org.malai.androidorg.eclipse.jdt.core.javabuilderorg.eclipse.jdt.core.javanature
malai-2.0+ds1/malai-core/org.malai.android/.settings/ 0000775 0000000 0000000 00000000000 13011616643 0022341 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/.settings/org.eclipse.jdt.core.prefs 0000664 0000000 0000000 00000001113 13011616643 0027317 0 ustar 00root root 0000000 0000000 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
malai-2.0+ds1/malai-core/org.malai.android/pom.xml 0000664 0000000 0000000 00000005601 13011616643 0021742 0 ustar 00root root 0000000 0000000 4.0.0org.malaimalai.android2.0jarmalai.swing :: Malai Android componentsrc/mainsrc/resources/maven-assembly-plugin2.4src/assembly/assemblySrc.xmlsrc/assembly/assemblyBin.xmlmake-assemblypackagesingleorg.apache.maven.pluginsmaven-compiler-plugin2.0.21.71.7UTF-8org.apache.felixmaven-bundle-plugin2.3.7truemethods2
*
org.malaimalai.core1.1com.google.androidandroid4.1.1.4providedmavenInriaSnapshothttp://maven.inria.fr-snapshotshttp://maven.inria.fr/artifactory/malai-public-snapshotmavenInriaReleasehttp://maven.inria.fr-releaseshttp://maven.inria.fr/artifactory/malai-public-release
malai-2.0+ds1/malai-core/org.malai.android/src/ 0000775 0000000 0000000 00000000000 13011616643 0021212 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/assembly/ 0000775 0000000 0000000 00000000000 13011616643 0023031 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/assembly/assemblyBin.xml 0000664 0000000 0000000 00000001626 13011616643 0026030 0 ustar 00root root 0000000 0000000 binzip${project.build.directory}/${project.artifactId}-${project.version}.jartrue${project.basedir}/license*true
malai-2.0+ds1/malai-core/org.malai.android/src/assembly/assemblySrc.xml 0000664 0000000 0000000 00000001460 13011616643 0026043 0 ustar 00root root 0000000 0000000 srczip${project.basedir}src/compilelicense*pom.xml.classpath.gitignore.project.settings/true
malai-2.0+ds1/malai-core/org.malai.android/src/main/ 0000775 0000000 0000000 00000000000 13011616643 0022136 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/main/org/ 0000775 0000000 0000000 00000000000 13011616643 0022725 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/main/org/malai/ 0000775 0000000 0000000 00000000000 13011616643 0024010 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/main/org/malai/android/ 0000775 0000000 0000000 00000000000 13011616643 0025430 5 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/main/org/malai/android/interaction/ 0000775 0000000 0000000 00000000000 13011616643 0027747 5 ustar 00root root 0000000 0000000 AndroidEventHandler.java 0000664 0000000 0000000 00000001764 13011616643 0034423 0 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/main/org/malai/android/interaction package org.malai.android.interaction;
import android.widget.Button;
/**
* This interface can be used for object that want to gather Android events (button pressed, etc.) produced by HIDs.
*
* This file is part of Malai.
* Copyright (c) 2009-2013 Arnaud BLOUIN
*
* Malai is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later version.
*
* Malai is distributed without any warranty; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* 2013-02-26
* @author Arnaud BLOUIN
* @since 0.2
*/
public interface AndroidEventHandler {
/**
* Defines actions to do when a button is activated.
* @param button The pressed button.
* @since 0.2
*/
void onButtonPressed(final Button button);
}
AndroidEventManager.java 0000664 0000000 0000000 00000004636 13011616643 0034421 0 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/main/org/malai/android/interaction package org.malai.android.interaction;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import org.malai.interaction.BasicEventManager;
import org.malai.interaction.EventHandler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
/**
* An android event manager gathers Android events produces by widgets and transfers them handlers.
*
* This file is part of Malai.
* Copyright (c) 2009-2013 Arnaud BLOUIN
*
* Malai is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later version.
*
* Malai is distributed without any warranty; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* 2013-02-26
* @author Arnaud BLOUIN
* @since 0.2
*/
public class AndroidEventManager extends BasicEventManager implements OnClickListener {
/** A subset of the set 'handlers' corresponding to the Android Handlers. */
private List androidHandlers;
/**
* Creates a event manager that gathers Android events and transfers them to handlers.
* @since 0.2
*/
public AndroidEventManager() {
super();
androidHandlers = null;
}
/**
* Attaches the SwingEventManager to the Java component to listen.
* @param comp The Java Component to listen.
*/
public void attachTo(final View view) {
if(view!=null) {
view.setOnClickListener(this);
}
}
@Override
public void detachForm(final View view) {
if(view!=null) {
view.setOnClickListener(null);
}
}
@Override
public void addHandlers(final EventHandler h) {
super.addHandlers(h);
if(h instanceof AndroidEventHandler) {
if(androidHandlers==null) androidHandlers = new CopyOnWriteArrayList<>();
androidHandlers.add((AndroidEventHandler)h);
}
}
@Override
public void removeHandler(final EventHandler h) {
super.removeHandler(h);
if(h!=null && androidHandlers!=null)
androidHandlers.remove(h);
}
@Override
public void onClick(final View view) {
if(androidHandlers!=null && view instanceof Button) {
Button button = (Button) view;
for(final AndroidEventHandler handler : androidHandlers)
handler.onButtonPressed(button);
}
}
}
AndroidInteraction.java 0000664 0000000 0000000 00000001600 13011616643 0034310 0 ustar 00root root 0000000 0000000 malai-2.0+ds1/malai-core/org.malai.android/src/main/org/malai/android/interaction package org.malai.android.interaction;
import org.malai.interaction.InitState;
import org.malai.interaction.Interaction;
import org.malai.stateMachine.ITransition;
import android.widget.Button;
public class AndroidInteraction extends Interaction implements AndroidEventHandler {
public AndroidInteraction() {
super();
}
public AndroidInteraction(final InitState initState) {
super(initState);
}
@Override
public void onButtonPressed(final Button button) {
if(!activated) return ;
boolean again = true;
ITransition t;
for(int i=0, j=currentState.getTransitions().size(); i