1 /*******************************************************************************
2 * Copyright (c) 2007, 2011 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.model.modifiers;
14 import org.simantics.browsing.ui.content.Labeler.Modifier;
15 import org.simantics.browsing.ui.model.browsecontexts.BrowseContext;
16 import org.simantics.db.ReadGraph;
17 import org.simantics.db.exception.DatabaseException;
20 * @author Tuukka Lehtonen
22 public enum NoModifierRule implements ModifierRule {
27 * This modifier is fixed to indicate that there shall be no modifier. It is
29 * {@link BrowseContext#getModifier(ReadGraph, org.simantics.browsing.ui.NodeContext, String)}
32 public static Modifier NO_MODIFIER = new Modifier() {
34 public String getValue() {
35 throw new UnsupportedOperationException();
38 public String isValid(String label) {
39 throw new UnsupportedOperationException();
42 public void modify(String label) {
43 throw new UnsupportedOperationException();
47 public static NoModifierRule get() {
52 * Compatible with any content type.
55 public boolean isCompatible(Class<?> contentType) {
60 public Modifier getModifier(ReadGraph graph, Object content,
61 String columnKey) throws DatabaseException {