1 19 20 package org.netbeans.modules.options.editor; 21 22 import javax.swing.Icon ; 23 import javax.swing.ImageIcon ; 24 import javax.swing.JComponent ; 25 import javax.swing.JPanel ; 26 import org.netbeans.spi.options.OptionsCategory; 27 import org.netbeans.spi.options.OptionsPanelController; 28 import org.openide.util.NbBundle; 29 import org.openide.util.Utilities; 30 31 32 38 public final class Editor extends OptionsCategory { 39 40 private static String loc (String key) { 41 return NbBundle.getMessage (Editor.class, key); 42 } 43 44 45 private static Icon icon; 46 47 public Icon getIcon () { 48 if (icon == null) 49 icon = new ImageIcon ( 50 Utilities.loadImage 51 ("org/netbeans/modules/options/resources/editor.png") 52 ); 53 return icon; 54 } 55 56 public String getCategoryName () { 57 return loc ("CTL_Editor"); 58 } 59 60 public String getTitle () { 61 return loc ("CTL_Editor_Title"); 62 } 63 64 public String getDescription () { 65 return loc ("CTL_Editor_Description"); 66 } 67 68 public OptionsPanelController create () { 69 return new EditorPanelController (); 70 } 71 } 72 | Popular Tags |