1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.browsing.ui.common.labelers;
14 import java.util.Collections;
15 import java.util.HashMap;
18 import org.simantics.browsing.ui.GraphExplorer.ModificationContext;
19 import org.simantics.browsing.ui.content.Labeler;
21 public class LazyContainerLabeler implements Labeler {
23 private final HashMap<String, String> labels = new HashMap<String, String>(4);
25 //private LabelerListener listener;
27 public void addLabel(String key, String label) {
28 @SuppressWarnings("unused")
29 String old = labels.put(key, label);
30 //if (listener != null && !ObjectUtils.objectEquals(label, old))
31 // listener.columnModified(key, label);
35 public Map<String, String> getLabels() {
40 public Map<String, String> getRuntimeLabels() {
41 return Collections.emptyMap();
45 public int getCategory() {
49 public void setCategory(int category) {
50 this.category = category;
54 public Modifier getModifier(ModificationContext modificationContext, String key) {
59 public void setListener(LabelerListener listener) {
60 //this.listener = listener;