ter.SDK.controler
Class TreeHeritageControler

java.lang.Object
  |
  +--ter.SDK.controler.AbstractControler
        |
        +--ter.SDK.controler.HeritageControler
              |
              +--ter.SDK.controler.TreeHeritageControler
All Implemented Interfaces:
java.awt.event.ActionListener, Controler, java.util.EventListener, java.awt.event.MouseListener, Plugin

public class TreeHeritageControler
extends HeritageControler
implements java.awt.event.ActionListener, java.awt.event.MouseListener

Title: Class TreeHeritageClass

Description: A controler for a TreeHeritageView

Company: UNSA

Version:
1.0
Author:
Charbit Lucas - Gahide Jérome - Galbois Xavier - Zerbib Gabriel

Constructor Summary
TreeHeritageControler()
          The default constructor
TreeHeritageControler(Manager hm, View htv)
          The constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          We cacth the action events coming from the JPopupMenu.
 void createJPopupMenu()
          Create the JPopupMenu
 java.lang.String getDefaultView()
          Return the default view that can be controled by the controler
 java.lang.String getName()
          Needed by the controler interface
 boolean isControlable(View v)
          Needed by the controler interface.
 void listenToView()
          Needed by the controler interface.
 void mouseClicked(java.awt.event.MouseEvent evt)
          We catch the MouseEvent.
 void mouseEntered(java.awt.event.MouseEvent evt)
           
 void mouseExited(java.awt.event.MouseEvent evt)
           
 void mousePressed(java.awt.event.MouseEvent evt)
          Needed by the MouseListened interface
 void mouseReleased(java.awt.event.MouseEvent evt)
           
 
Methods inherited from class ter.SDK.controler.HeritageControler
getType, getView
 
Methods inherited from class ter.SDK.controler.AbstractControler
create, getManager, setManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeHeritageControler

public TreeHeritageControler()
The default constructor


TreeHeritageControler

public TreeHeritageControler(Manager hm,
                             View htv)
The constructor

Parameters:
hm - : the father manager
htv - : the view to control
Method Detail

getName

public java.lang.String getName()
Needed by the controler interface

Specified by:
getName in interface Plugin
Returns:
: a string containing the name of the class

listenToView

public void listenToView()
Needed by the controler interface. This function get the dedired elements in the view and makes the controler listen to them

Specified by:
listenToView in interface Controler

isControlable

public boolean isControlable(View v)
Needed by the controler interface. This function tells if the controler is able to control a tupe of a view

Specified by:
isControlable in interface Controler
Parameters:
v - : the target view
Returns:
: true is this controler can control the view, false otherwise

getDefaultView

public java.lang.String getDefaultView()
Return the default view that can be controled by the controler

Specified by:
getDefaultView in interface Controler
Returns:
: a string containing the name of the class of the default view that can be controled by this controler

createJPopupMenu

public void createJPopupMenu()
Create the JPopupMenu


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
We catch the MouseEvent. If the user double click, a new view is open, otherwise, we bring the JPopupMenu

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
evt - : the mouse event

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Needed by the MouseListened interface

Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
evt - : the mouse event

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
We cacth the action events coming from the JPopupMenu.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - : the action event