1 11 package org.eclipse.jface.viewers; 12 13 import java.util.HashMap ; 14 import java.util.Map ; 15 16 24 public class DecorationContext implements IDecorationContext { 25 26 30 public static final IDecorationContext DEFAULT_CONTEXT = new DecorationContext(); 31 32 private Map properties = new HashMap (); 33 34 37 public DecorationContext() { 38 } 39 40 41 44 public Object getProperty(String property) { 45 return properties.get(property); 46 } 47 48 51 public String [] getProperties() { 52 return (String []) properties.keySet().toArray(new String [properties.size()]); 53 } 54 55 63 public void putProperty(String property, Object value) { 64 if (value == null) { 65 properties.remove(property); 66 } else { 67 properties.put(property, value); 68 } 69 } 70 } 71 | Popular Tags |