< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java

Print this page




 119 
 120     private Handler handler;
 121 
 122 
 123     static {
 124         newline = System.lineSeparator();
 125         if (newline == null) {
 126             newline = "\n";
 127         }
 128     }
 129 
 130     static void loadActionMap(LazyActionMap map) {
 131         map.put(new Actions(Actions.CLOSE));
 132         BasicLookAndFeel.installAudioActionMap(map);
 133     }
 134 
 135 
 136 
 137     /**
 138      * Creates a new {@code BasicOptionPaneUI} instance.
 139      *
 140      * @return a new {@code BasicOptionPaneUI} instance
 141      */
 142     public static ComponentUI createUI(JComponent x) {
 143         return new BasicOptionPaneUI();
 144     }
 145 
 146     /**
 147       * Installs the receiver as the L&amp;F for the passed in
 148       * <code>JOptionPane</code>.
 149       */
 150     public void installUI(JComponent c) {
 151         optionPane = (JOptionPane)c;
 152         installDefaults();
 153         optionPane.setLayout(createLayoutManager());
 154         installComponents();
 155         installListeners();
 156         installKeyboardActions();
 157     }
 158 
 159     /**




 119 
 120     private Handler handler;
 121 
 122 
 123     static {
 124         newline = System.lineSeparator();
 125         if (newline == null) {
 126             newline = "\n";
 127         }
 128     }
 129 
 130     static void loadActionMap(LazyActionMap map) {
 131         map.put(new Actions(Actions.CLOSE));
 132         BasicLookAndFeel.installAudioActionMap(map);
 133     }
 134 
 135 
 136 
 137     /**
 138      * Creates a new {@code BasicOptionPaneUI} instance.
 139      * @param x the component
 140      * @return a new {@code BasicOptionPaneUI} instance
 141      */
 142     public static ComponentUI createUI(JComponent x) {
 143         return new BasicOptionPaneUI();
 144     }
 145 
 146     /**
 147       * Installs the receiver as the L&amp;F for the passed in
 148       * <code>JOptionPane</code>.
 149       */
 150     public void installUI(JComponent c) {
 151         optionPane = (JOptionPane)c;
 152         installDefaults();
 153         optionPane.setLayout(createLayoutManager());
 154         installComponents();
 155         installListeners();
 156         installKeyboardActions();
 157     }
 158 
 159     /**


< prev index next >