1 /* 2 * Copyright 2006 - 2012 Christina Bohk and Roland Ewald 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package p3j.gui.misc; 17 18 /** 19 * The available tabs for the navigation tree on the left-hand side of the GUI. 20 * 21 * @author Christina Bohk 22 * @author Roland Ewald 23 * 24 */ 25 public enum NavigationTreeTab { 26 27 /** The overview on all projections in the database. */ 28 DB_OVERVIEW, 29 30 /** The overview on the elements of the projection. */ 31 PROJECTION_OVERVIEW, 32 33 /** The overview on the results associated with the projection. */ 34 RESULTS_OVERVIEW; 35 36 /** 37 * Gets the tab index. 38 * 39 * @return the tab index 40 */ 41 public int getTabIndex() { 42 switch (this) { 43 case DB_OVERVIEW: 44 return 0; 45 case PROJECTION_OVERVIEW: 46 return 1; 47 case RESULTS_OVERVIEW: 48 return 2; 49 default: 50 throw new IllegalArgumentException(); 51 } 52 } 53 }