2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
26 * UrlLink table row definition
32 public class UrlLinkDisplay
34 private String id; // id is not supplied to display, but used to identify
41 private boolean isDefault;
43 private boolean isSelected;
45 public final static int ID = 4;
47 public final static int URL = 1;
49 public final static int SELECTED = 2;
51 public final static int DEFAULT = 3;
53 public final static int NAME = 0;
55 public UrlLinkDisplay(String rowId, String rowName, String rowUrl,
56 boolean rowSelected, boolean rowDefault)
61 isDefault = rowDefault;
62 isSelected = rowSelected;
70 public String getName()
75 public String getUrl()
80 public boolean getIsDefault()
85 public boolean getIsSelected()
90 public void setUrl(String rowUrl)
95 public void setIsDefault(boolean rowDefault)
97 isDefault = rowDefault;
100 public void setIsSelected(boolean rowSelected)
102 isSelected = rowSelected;
105 public Object getValue(int index)
124 public void setValue(int index, Object value)
132 url = (String) value;
135 isDefault = (boolean) value;
138 isSelected = (boolean) value;
141 name = (String) value;
148 public boolean isEditable(int index)
150 return ((index == DEFAULT) || (index == SELECTED));