org.malai.instrument.library
Class MenuItem2OpenWebPageLink

java.lang.Object
  extended by org.malai.instrument.Link<OpenWebPage,MenuItemPressed,Instrument>
      extended by org.malai.instrument.library.MenuItem2OpenWebPageLink
All Implemented Interfaces:
InteractionHandler

public class MenuItem2OpenWebPageLink
extends Link<OpenWebPage,MenuItemPressed,Instrument>

This link maps an action OpenWebPage to an interaction MenuItemPressed.

This file is part of Malai.
Copyright (c) 2009-2012 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.

08/11/2011

Since:
0.2
Version:
0.2
Author:
Arnaud BLOUIN

Field Summary
protected  MMenuItem menuItem
          The menu item that will be uses to create the action.
protected  java.net.URI uri
          The URI to open.
 
Fields inherited from class org.malai.instrument.Link
action, clazzAction, execute, instrument, interaction
 
Constructor Summary
MenuItem2OpenWebPageLink(Instrument ins, MMenuItem menuItem, java.net.URI uri)
          Creates the link.
 
Method Summary
 void initAction()
          After being created by method createAction, the action must be initialised by this method.
 boolean isConditionRespected()
           
 
Methods inherited from class org.malai.instrument.Link
addEventable, clearEvents, createAction, getAction, getInstrument, getInteraction, interactionAborts, interactionStarts, interactionStops, interactionUpdates, interimFeedback, isActivated, isExecute, isInteractionMustBeAborted, isRunnable, isRunning, setActivated, updateAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

menuItem

protected MMenuItem menuItem
The menu item that will be uses to create the action.


uri

protected java.net.URI uri
The URI to open.

Constructor Detail

MenuItem2OpenWebPageLink

public MenuItem2OpenWebPageLink(Instrument ins,
                                MMenuItem menuItem,
                                java.net.URI uri)
                         throws java.lang.InstantiationException,
                                java.lang.IllegalAccessException
Creates the link.

Parameters:
ins - The instrument that will contain the link.
menuItem - he menu item that will be uses to create the action.
uri - The URI to open.
Throws:
java.lang.IllegalArgumentException - If one of the given parameters is null.
java.lang.IllegalAccessException - If no free-parameter constructor is available.
java.lang.InstantiationException - If an error occurs during instantiation of the interaction/action.
Since:
0.2
Method Detail

initAction

public void initAction()
Description copied from class: Link
After being created by method createAction, the action must be initialised by this method.

Specified by:
initAction in class Link<OpenWebPage,MenuItemPressed,Instrument>

isConditionRespected

public boolean isConditionRespected()
Specified by:
isConditionRespected in class Link<OpenWebPage,MenuItemPressed,Instrument>
Returns:
True if the condition of the link is respected.