1 /*******************************************************************************
\r
2 * Copyright (c) 2010, 2011 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.browsing.ui.model.actions;
\r
14 import java.util.Comparator;
\r
16 public interface IActionCategory {
\r
18 double getPriority();
\r
19 boolean isSubmenu();
\r
21 public static final Comparator<IActionCategory> ACTION_CATEGORY_COMPARATOR = new Comparator<IActionCategory>() {
\r
23 public int compare(IActionCategory o1, IActionCategory o2) {
\r
31 double p1 = o1.getPriority();
\r
32 double p2 = o2.getPriority();
\r
37 String label1 = o1.getLabel();
\r
38 String label2 = o2.getLabel();
\r
39 if(label1 == null) {
\r
49 return label1.compareTo(label2);
\r