1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\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.browsing.ui.common.labelers;
\r
14 import java.util.Collections;
\r
15 import java.util.HashMap;
\r
16 import java.util.Map;
\r
18 import org.simantics.browsing.ui.GraphExplorer.ModificationContext;
\r
19 import org.simantics.browsing.ui.content.Labeler;
\r
21 public class LazyContainerLabeler implements Labeler {
\r
23 private final HashMap<String, String> labels = new HashMap<String, String>(4);
\r
24 private int category;
\r
25 //private LabelerListener listener;
\r
27 public void addLabel(String key, String label) {
\r
28 @SuppressWarnings("unused")
\r
29 String old = labels.put(key, label);
\r
30 //if (listener != null && !ObjectUtils.objectEquals(label, old))
\r
31 // listener.columnModified(key, label);
\r
35 public Map<String, String> getLabels() {
\r
40 public Map<String, String> getRuntimeLabels() {
\r
41 return Collections.emptyMap();
\r
45 public int getCategory() {
\r
49 public void setCategory(int category) {
\r
50 this.category = category;
\r
54 public Modifier getModifier(ModificationContext modificationContext, String key) {
\r
59 public void setListener(LabelerListener listener) {
\r
60 //this.listener = listener;
\r