srcanaapps/depexplorer/com.nokia.s60tools.appdep/src/com/nokia/s60tools/appdep/ui/actions/AbstractMainViewAction.java
author noe\swadi
Sat, 09 Jan 2010 10:04:11 +0530
changeset 0 a02c979e8dfd
permissions -rw-r--r--
1. Copyrights changed to EPL 2. Feature updates mentioned in release notes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     1
/*
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     3
* All rights reserved.
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     4
* This component and the accompanying materials are made available
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     6
* which accompanies this distribution, and is available
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     8
*
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
     9
* Initial Contributors:
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    11
*
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    12
* Contributors:
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    13
*
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    14
* Description:
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    15
*
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    16
*/
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    17
 
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    18
 
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    19
package com.nokia.s60tools.appdep.ui.actions;
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    20
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    21
import org.eclipse.jface.action.Action;
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    22
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    23
import com.nokia.s60tools.appdep.ui.views.main.MainView;
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    24
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    25
/**
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    26
 * Common abstract base class for all main view
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    27
 * related actions.
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    28
 */
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    29
public abstract class AbstractMainViewAction extends Action {
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    30
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    31
	/**
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    32
	 * Reference to the view.
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    33
	 */
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    34
	MainView view;
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    35
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    36
	/**
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    37
	 * Constructor.
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    38
	 * @param view Reference to the view.
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    39
	 */
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    40
	public AbstractMainViewAction(MainView view) {
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    41
		super();
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    42
		this.view = view;
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    43
	}
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    44
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    45
	/* (non-Javadoc)
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    46
	 * @see org.eclipse.jface.action.IAction#run()
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    47
	 */
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    48
	public void run() {
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    49
		// Makes sure that action buttons states are updated 
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    50
		// correctly whenever some action is performed.
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    51
		view.updateViewActionEnabledStates();
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    52
	}
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    53
	
a02c979e8dfd 1. Copyrights changed to EPL
noe\swadi
parents:
diff changeset
    54
}