Revision fda2cb06
Added by Patrick Plitzner over 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionTableView.java | ||
---|---|---|
10 | 10 |
import com.vaadin.data.Property; |
11 | 11 |
import com.vaadin.data.Property.ValueChangeEvent; |
12 | 12 |
import com.vaadin.data.Property.ValueChangeListener; |
13 |
import com.vaadin.event.ContextClickEvent; |
|
14 |
import com.vaadin.event.ContextClickEvent.ContextClickListener; |
|
15 |
import com.vaadin.event.ItemClickEvent; |
|
16 |
import com.vaadin.event.ItemClickEvent.ItemClickListener; |
|
13 | 17 |
import com.vaadin.event.ShortcutAction.KeyCode; |
14 | 18 |
import com.vaadin.event.ShortcutAction.ModifierKey; |
15 | 19 |
import com.vaadin.navigator.View; |
... | ... | |
110 | 114 |
table.setSortEnabled(true); |
111 | 115 |
|
112 | 116 |
columnList = new ArrayList<String>(Arrays.asList(new String[]{CdmQueryFactory.TAXON_COLUMN,CdmQueryFactory.RANK_COLUMN})); |
113 |
List<String> namedAreas = listener.getNamedAreasLabels(true);
|
|
117 |
List<String> namedAreas = listener.getNamedAreasLabels(); |
|
114 | 118 |
columnList.addAll(namedAreas); |
115 | 119 |
table.setVisibleColumns(columnList.toArray()); |
116 | 120 |
|
117 | 121 |
headerList = new ArrayList<String>(Arrays.asList(new String[]{CdmQueryFactory.TAXON_COLUMN,"Rang"})); |
118 |
headerList.addAll(listener.getNamedAreasLabels(true));
|
|
122 |
headerList.addAll(listener.getNamedAreasLabels()); |
|
119 | 123 |
String[] string = new String[headerList.size()]; |
120 | 124 |
table.setColumnHeaders(headerList.toArray(string)); |
121 | 125 |
|
... | ... | |
127 | 131 |
table.setColumnFooter(CdmQueryFactory.TAXON_COLUMN, "Total amount of Taxa displayed: " + container.size()); |
128 | 132 |
|
129 | 133 |
table.setCacheRate(20); |
130 |
|
|
134 |
|
|
131 | 135 |
//add generated columns for NamedAreas |
132 | 136 |
Collection<?> containerPropertyIds = table.getContainerPropertyIds(); |
133 | 137 |
for (Object object : containerPropertyIds) { |
... | ... | |
217 | 221 |
String itemCaption = null; |
218 | 222 |
Representation representation = presenceAbsenceTerm.getRepresentation(Language.DEFAULT()); |
219 | 223 |
if(representation!=null){ |
220 |
if((Boolean)VaadinSession.getCurrent().getAttribute(DistributionEditorUtil.SATTR_ABBREVIATED_LABELS)){
|
|
224 |
if(DistributionEditorUtil.isAbbreviatedLabels()){
|
|
221 | 225 |
itemCaption = representation.getAbbreviatedLabel(); |
222 | 226 |
} |
223 | 227 |
else{ |
Also available in: Unified diff
ref #5458 Add toggle button for abbreviations to settings menu