1 /*******************************************************************************
\r
2 * Copyright (c) 2010, 2012 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.sysdyn.ui.properties.widgets.modules;
\r
14 import org.eclipse.jface.viewers.ITableLabelProvider;
\r
15 import org.eclipse.jface.viewers.LabelProvider;
\r
16 import org.eclipse.swt.graphics.Image;
\r
18 public class ReferenceRowLabelProvider extends LabelProvider implements ITableLabelProvider {
\r
21 public Image getColumnImage(Object element, int columnIndex) {
\r
26 public String getColumnText(Object element, int columnIndex) {
\r
27 ReferenceRow referenceRow = (ReferenceRow) element;
\r
28 switch (columnIndex) {
\r
30 return referenceRow.getName();
\r
32 return referenceRow.getValue();
\r
34 throw new RuntimeException("Should not happen");
\r