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