Java tutorial
// Copyright 2009 Victor Iacoban // // 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. package bazaar4idea.ui; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.uiDesigner.core.GridConstraints; import com.intellij.uiDesigner.core.GridLayoutManager; import org.apache.commons.lang.StringUtils; import javax.swing.*; import java.awt.*; public class BzrGlobalStatusDialog extends DialogWrapper { private JPanel contentPanel; private JTextArea outputTextArea; public BzrGlobalStatusDialog(Project project) { super(project, false); init(); } public void append(String text) { if (StringUtils.isEmpty(text)) { return; } outputTextArea.append(text); } protected Action[] createActions() { return new Action[] { getOKAction() }; } protected JComponent createCenterPanel() { return contentPanel; } { // 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$$$() { contentPanel = new JPanel(); contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); final JScrollPane scrollPane1 = new JScrollPane(); contentPanel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(300, 350), null, null, 0, false)); outputTextArea = new JTextArea(); outputTextArea.setEditable(false); scrollPane1.setViewportView(outputTextArea); } /** @noinspection ALL */ public JComponent $$$getRootComponent$$$() { return contentPanel; } }