1 19 20 21 package org.netbeans.modules.properties.syntax; 22 23 24 import java.awt.Color ; 25 26 import org.netbeans.modules.editor.options.BaseOptions; 27 import org.netbeans.modules.editor.options.OptionSupport; 28 29 import org.openide.util.HelpCtx; 30 import org.openide.util.NbBundle; 31 32 33 38 public class PropertiesOptions extends BaseOptions { 39 40 41 static final long serialVersionUID = 2347735706857337892L; 42 43 44 public static final String PROPERTIES = "properties"; 46 47 public static final String SHADOW_TABLE_CELL_PROP = "shadowTableCell"; 49 50 static final String [] PROPERTIES_PROP_NAMES = OptionSupport.mergeStringArrays( 51 BaseOptions.BASE_PROP_NAMES, 52 new String [] { 53 SHADOW_TABLE_CELL_PROP 54 } 55 ); 56 57 58 59 public PropertiesOptions() { 60 super(PropertiesKit.class, PROPERTIES); 61 } 62 63 64 67 protected String getString(String s) { 68 try { 69 String res = NbBundle.getBundle(PropertiesOptions.class).getString(s); 70 return (res == null) ? super.getString(s) : res; 71 } catch (Exception e) { 72 return super.getString(s); 73 } 74 } 75 76 77 public Color getShadowTableCell() { 78 return (Color ) getSettingValue(SHADOW_TABLE_CELL_PROP); 79 } 80 81 82 public void setShadowTableCell(Color color) { 83 setSettingValue(SHADOW_TABLE_CELL_PROP, color); 84 } 85 86 87 public HelpCtx getHelpCtx() { 88 return new HelpCtx("editing.editor.properties"); } 90 } 91 | Popular Tags |