001/* 002 * SonarQube 003 * Copyright (C) 2009-2017 SonarSource SA 004 * mailto:info AT sonarsource DOT com 005 * 006 * This program is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 3 of the License, or (at your option) any later version. 010 * 011 * This program is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public License 017 * along with this program; if not, write to the Free Software Foundation, 018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 019 */ 020package org.sonar.api.web; 021 022/** 023 * Possible layouts for a dashboard. 024 * 025 * @since 2.13 026 * @deprecated since 6.2, this extension is ignored as dashboards have been removed 027 */ 028@Deprecated 029public enum DashboardLayout { 030 031 /** 032 * Only 1 column that take all the page 033 */ 034 ONE_COLUMN("100%", 1), 035 036 /** 037 * 2 columns of the same width 038 */ 039 TWO_COLUMNS("50%-50%", 2), 040 041 /** 042 * 2 columns with the first one smaller than the second 043 */ 044 TWO_COLUMNS_30_70("30%-70%", 2), 045 046 /** 047 * 2 columns with the first one bigger than the second 048 */ 049 TWO_COLUMNS_70_30("70%-30%", 2), 050 051 /** 052 * 3 columns of the same width 053 */ 054 TREE_COLUMNS("33%-33%-33%", 3); 055 056 private String code; 057 private int columns; 058 059 DashboardLayout(String code, int columns) { 060 this.code = code; 061 this.columns = columns; 062 } 063 064 public String getCode() { 065 return code; 066 } 067 068 public int getColumns() { 069 return columns; 070 } 071 072 @Override 073 public String toString() { 074 return code; 075 } 076 077}