/src/slix/ced/jvm/gui/src/slix/ced/gui/MainPanel.java
Java | 183 lines | 124 code | 25 blank | 34 comment | 0 complexity | 311621dc292481dcedd5b9456aa45843 MD5 | raw file
Possible License(s): EPL-1.0, LGPL-3.0
1/* 2 * %! Copyright (C) 2011 Kei Suzuki All rights reserved. !% 3 * 4 * This file is part of Sevenri, a Clojure environment ("This Software"). 5 * 6 * The use and distribution terms for this software are covered by the Eclipse 7 * Public License version 1.0 (http://opensource.org/licenses/eclipse-1.0.php) 8 * which can be found in the COPYING at the root of this distribution. 9 * By using this software in any fashion, you are agreeing to be bound by the 10 * terms of this license. 11 * You must not remove this notice, or any other, from this software. 12 */ 13 14/* 15 * To change this template, choose Tools | Templates 16 * and open the template in the editor. 17 */ 18 19/* 20 * MainPanel.java 21 * 22 * Created on Sep 8, 2010, 11:07:12 AM 23 */ 24 25package slix.ced.gui; 26 27/** 28 * 29 * @author ksuzuki 30 */ 31public class MainPanel extends javax.swing.JPanel { 32 33 /** Creates new form MainPanel */ 34 public MainPanel() { 35 initComponents(); 36 } 37 38 /** This method is called from within the constructor to 39 * initialize the form. 40 * WARNING: Do NOT modify this code. The content of this method is 41 * always regenerated by the Form Editor. 42 */ 43 @SuppressWarnings("unchecked") 44 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 45 private void initComponents() { 46 47 splitter = new javax.swing.JSplitPane(); 48 scrollPane2 = new javax.swing.JScrollPane(); 49 ced2 = new javax.swing.JEditorPane(); 50 scrollPane1 = new javax.swing.JScrollPane(); 51 ced1 = new javax.swing.JEditorPane(); 52 toolBar = new javax.swing.JToolBar(); 53 modIndicator = new javax.swing.JLabel(); 54 lineNumber = new javax.swing.JFormattedTextField(); 55 col = new javax.swing.JLabel(); 56 columnNumber = new javax.swing.JLabel(); 57 sep = new javax.swing.JToolBar.Separator(); 58 findKeyword = new javax.swing.JTextField(); 59 60 setBackground(new java.awt.Color(255, 255, 255)); 61 setFont(new java.awt.Font("Courier", 0, 12)); 62 setMinimumSize(new java.awt.Dimension(320, 200)); 63 setPreferredSize(new java.awt.Dimension(640, 400)); 64 65 splitter.setDividerSize(6); 66 splitter.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); 67 splitter.setFont(getFont()); 68 splitter.setMaximumSize(new java.awt.Dimension(32767, 32767)); 69 splitter.setOneTouchExpandable(true); 70 71 scrollPane2.setFont(getFont()); 72 scrollPane2.setMinimumSize(new java.awt.Dimension(0, 0)); 73 scrollPane2.setPreferredSize(new java.awt.Dimension(640, 370)); 74 75 ced2.setFont(getFont()); 76 ced2.setMaximumSize(new java.awt.Dimension(32767, 32767)); 77 ced2.setMinimumSize(new java.awt.Dimension(0, 0)); 78 ced2.setName("ced2"); // NOI18N 79 ced2.setPreferredSize(new java.awt.Dimension(640, 370)); 80 scrollPane2.setViewportView(ced2); 81 82 splitter.setLeftComponent(scrollPane2); 83 84 scrollPane1.setFont(getFont()); 85 scrollPane1.setMinimumSize(new java.awt.Dimension(0, 0)); 86 scrollPane1.setPreferredSize(new java.awt.Dimension(640, 370)); 87 88 ced1.setFont(getFont()); 89 ced1.setMaximumSize(new java.awt.Dimension(32767, 32767)); 90 ced1.setMinimumSize(new java.awt.Dimension(0, 0)); 91 ced1.setName("ced1"); // NOI18N 92 ced1.setPreferredSize(new java.awt.Dimension(640, 370)); 93 scrollPane1.setViewportView(ced1); 94 95 splitter.setRightComponent(scrollPane1); 96 97 toolBar.setFloatable(false); 98 toolBar.setRollover(true); 99 toolBar.setFont(getFont()); 100 toolBar.setMaximumSize(new java.awt.Dimension(32767, 32767)); 101 toolBar.setMinimumSize(new java.awt.Dimension(320, 30)); 102 toolBar.setPreferredSize(new java.awt.Dimension(640, 30)); 103 104 modIndicator.setFont(getFont()); 105 modIndicator.setForeground(new java.awt.Color(255, 0, 0)); 106 modIndicator.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); 107 modIndicator.setFocusTraversalKeysEnabled(false); 108 modIndicator.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); 109 modIndicator.setMaximumSize(new java.awt.Dimension(8, 12)); 110 modIndicator.setMinimumSize(new java.awt.Dimension(8, 12)); 111 modIndicator.setPreferredSize(new java.awt.Dimension(8, 12)); 112 modIndicator.setRequestFocusEnabled(false); 113 modIndicator.setVerifyInputWhenFocusTarget(false); 114 toolBar.add(modIndicator); 115 116 lineNumber.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); 117 lineNumber.setHorizontalAlignment(javax.swing.JTextField.RIGHT); 118 lineNumber.setFocusTraversalKeysEnabled(false); 119 lineNumber.setFont(getFont()); 120 lineNumber.setMaximumSize(new java.awt.Dimension(70, 24)); 121 lineNumber.setMinimumSize(new java.awt.Dimension(70, 24)); 122 lineNumber.setPreferredSize(new java.awt.Dimension(70, 24)); 123 toolBar.add(lineNumber); 124 125 col.setFont(getFont()); 126 col.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); 127 col.setText(":"); 128 toolBar.add(col); 129 130 columnNumber.setFont(getFont()); 131 columnNumber.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 132 columnNumber.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); 133 columnNumber.setMaximumSize(new java.awt.Dimension(30, 12)); 134 columnNumber.setMinimumSize(new java.awt.Dimension(30, 12)); 135 columnNumber.setPreferredSize(new java.awt.Dimension(30, 12)); 136 toolBar.add(columnNumber); 137 toolBar.add(sep); 138 139 findKeyword.setFont(getFont()); 140 findKeyword.setHorizontalAlignment(javax.swing.JTextField.LEFT); 141 findKeyword.setFocusTraversalKeysEnabled(false); 142 findKeyword.setMaximumSize(new java.awt.Dimension(160, 24)); 143 findKeyword.setMinimumSize(new java.awt.Dimension(160, 24)); 144 findKeyword.setPreferredSize(new java.awt.Dimension(160, 24)); 145 toolBar.add(findKeyword); 146 147 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 148 this.setLayout(layout); 149 layout.setHorizontalGroup( 150 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 151 .add(toolBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 152 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 153 .add(splitter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE)) 154 ); 155 layout.setVerticalGroup( 156 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 157 .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() 158 .addContainerGap(370, Short.MAX_VALUE) 159 .add(toolBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 160 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 161 .add(layout.createSequentialGroup() 162 .add(splitter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE) 163 .add(30, 30, 30))) 164 ); 165 }// </editor-fold>//GEN-END:initComponents 166 167 168 // Variables declaration - do not modify//GEN-BEGIN:variables 169 public javax.swing.JEditorPane ced1; 170 public javax.swing.JEditorPane ced2; 171 private javax.swing.JLabel col; 172 public javax.swing.JLabel columnNumber; 173 public javax.swing.JTextField findKeyword; 174 public javax.swing.JFormattedTextField lineNumber; 175 public javax.swing.JLabel modIndicator; 176 public javax.swing.JScrollPane scrollPane1; 177 public javax.swing.JScrollPane scrollPane2; 178 private javax.swing.JToolBar.Separator sep; 179 public javax.swing.JSplitPane splitter; 180 public javax.swing.JToolBar toolBar; 181 // End of variables declaration//GEN-END:variables 182 183}