| /* | |
| * Copyright 2000-2009 JetBrains s.r.o. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, | |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| * See the License for the specific language governing permissions and | |
| * limitations under the License. | |
| */ | |
| import javax.swing.*; | |
| public class BindingTest { | |
| public JComponent myRootComponent; | |
| public BindingTest() { | |
| super(); | |
| } | |
| private void createUIComponents() { | |
| } | |
| { | |
| // GUI initializer generated by IntelliJ IDEA GUI Designer | |
| // >>> IMPORTANT!! <<< | |
| // DO NOT EDIT OR ADD ANY CODE HERE! | |
| $$$setupUI$$$(); | |
| } | |
| /** | |
| * Method generated by IntelliJ IDEA GUI Designer | |
| * >>> IMPORTANT!! <<< | |
| * DO NOT edit this method OR call it in your code! | |
| * | |
| * @noinspection ALL | |
| */ | |
| private void $$$setupUI$$$() { | |
| myRootComponent = new JPanel(); | |
| myRootComponent.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new java.awt.Insets(0, 0, 0, 0), -1, -1)); | |
| myRootComponent.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), this.$$$getMessageFromBundle$$$("messages/TestBundle", "test.key"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); | |
| } | |
| private static java.lang.reflect.Method $$$cachedGetBundleMethod$$$ = null; | |
| private String $$$getMessageFromBundle$$$(String path, String key) { | |
| ResourceBundle bundle; | |
| try { | |
| Class<?> thisClass = this.getClass(); | |
| if ($$$cachedGetBundleMethod$$$ == null) { | |
| Class<?> dynamicBundleClass = thisClass.getClassLoader().loadClass("com.intellij.DynamicBundle"); | |
| $$$cachedGetBundleMethod$$$ = dynamicBundleClass.getMethod("getBundle", String.class, Class.class); | |
| } | |
| bundle = (ResourceBundle) $$$cachedGetBundleMethod$$$.invoke(null, path, thisClass); | |
| } catch (Exception e) { | |
| bundle = ResourceBundle.getBundle(path); | |
| } | |
| return bundle.getString(key); | |
| } | |
| /** | |
| * @noinspection ALL | |
| */ | |
| public JComponent $$$getRootComponent$$$() { | |
| return myRootComponent; | |
| } | |
| } |