KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > ui > internal > search > SortAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.
3  * This program and the accompanying materials are made available under the
4  * terms of the Common Public License v1.0 which accompanies this distribution,
5  * and is available at http://www.eclipse.org/legal/cpl-v10.html
6  *
7  * Contributors: IBM Corporation - initial API and implementation
8  ******************************************************************************/

9 package org.eclipse.help.ui.internal.search;
10 import org.eclipse.jface.action.*;
11 public class SortAction extends Action {
12     private int fSortOrder;
13     private ResultPage fPage;
14     public SortAction(String JavaDoc label, ResultPage page, int sortOrder) {
15         super(label);
16         fPage = page;
17         fSortOrder = sortOrder;
18     }
19     public void run() {
20         fPage.setSortOrder(this);
21     }
22     public int getSortOrder() {
23         return fSortOrder;
24     }
25 }
Popular Tags