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