/src/slix/ced/jvm/gui/src/slix/ced/gui/MainPanel.java

http://github.com/ksuzuki/Sevenri · Java · 183 lines · 124 code · 25 blank · 34 comment · 0 complexity · 311621dc292481dcedd5b9456aa45843 MD5 · raw file

  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. * To change this template, choose Tools | Templates
  15. * and open the template in the editor.
  16. */
  17. /*
  18. * MainPanel.java
  19. *
  20. * Created on Sep 8, 2010, 11:07:12 AM
  21. */
  22. package slix.ced.gui;
  23. /**
  24. *
  25. * @author ksuzuki
  26. */
  27. public class MainPanel extends javax.swing.JPanel {
  28. /** Creates new form MainPanel */
  29. public MainPanel() {
  30. initComponents();
  31. }
  32. /** This method is called from within the constructor to
  33. * initialize the form.
  34. * WARNING: Do NOT modify this code. The content of this method is
  35. * always regenerated by the Form Editor.
  36. */
  37. @SuppressWarnings("unchecked")
  38. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  39. private void initComponents() {
  40. splitter = new javax.swing.JSplitPane();
  41. scrollPane2 = new javax.swing.JScrollPane();
  42. ced2 = new javax.swing.JEditorPane();
  43. scrollPane1 = new javax.swing.JScrollPane();
  44. ced1 = new javax.swing.JEditorPane();
  45. toolBar = new javax.swing.JToolBar();
  46. modIndicator = new javax.swing.JLabel();
  47. lineNumber = new javax.swing.JFormattedTextField();
  48. col = new javax.swing.JLabel();
  49. columnNumber = new javax.swing.JLabel();
  50. sep = new javax.swing.JToolBar.Separator();
  51. findKeyword = new javax.swing.JTextField();
  52. setBackground(new java.awt.Color(255, 255, 255));
  53. setFont(new java.awt.Font("Courier", 0, 12));
  54. setMinimumSize(new java.awt.Dimension(320, 200));
  55. setPreferredSize(new java.awt.Dimension(640, 400));
  56. splitter.setDividerSize(6);
  57. splitter.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
  58. splitter.setFont(getFont());
  59. splitter.setMaximumSize(new java.awt.Dimension(32767, 32767));
  60. splitter.setOneTouchExpandable(true);
  61. scrollPane2.setFont(getFont());
  62. scrollPane2.setMinimumSize(new java.awt.Dimension(0, 0));
  63. scrollPane2.setPreferredSize(new java.awt.Dimension(640, 370));
  64. ced2.setFont(getFont());
  65. ced2.setMaximumSize(new java.awt.Dimension(32767, 32767));
  66. ced2.setMinimumSize(new java.awt.Dimension(0, 0));
  67. ced2.setName("ced2"); // NOI18N
  68. ced2.setPreferredSize(new java.awt.Dimension(640, 370));
  69. scrollPane2.setViewportView(ced2);
  70. splitter.setLeftComponent(scrollPane2);
  71. scrollPane1.setFont(getFont());
  72. scrollPane1.setMinimumSize(new java.awt.Dimension(0, 0));
  73. scrollPane1.setPreferredSize(new java.awt.Dimension(640, 370));
  74. ced1.setFont(getFont());
  75. ced1.setMaximumSize(new java.awt.Dimension(32767, 32767));
  76. ced1.setMinimumSize(new java.awt.Dimension(0, 0));
  77. ced1.setName("ced1"); // NOI18N
  78. ced1.setPreferredSize(new java.awt.Dimension(640, 370));
  79. scrollPane1.setViewportView(ced1);
  80. splitter.setRightComponent(scrollPane1);
  81. toolBar.setFloatable(false);
  82. toolBar.setRollover(true);
  83. toolBar.setFont(getFont());
  84. toolBar.setMaximumSize(new java.awt.Dimension(32767, 32767));
  85. toolBar.setMinimumSize(new java.awt.Dimension(320, 30));
  86. toolBar.setPreferredSize(new java.awt.Dimension(640, 30));
  87. modIndicator.setFont(getFont());
  88. modIndicator.setForeground(new java.awt.Color(255, 0, 0));
  89. modIndicator.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  90. modIndicator.setFocusTraversalKeysEnabled(false);
  91. modIndicator.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  92. modIndicator.setMaximumSize(new java.awt.Dimension(8, 12));
  93. modIndicator.setMinimumSize(new java.awt.Dimension(8, 12));
  94. modIndicator.setPreferredSize(new java.awt.Dimension(8, 12));
  95. modIndicator.setRequestFocusEnabled(false);
  96. modIndicator.setVerifyInputWhenFocusTarget(false);
  97. toolBar.add(modIndicator);
  98. lineNumber.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));
  99. lineNumber.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
  100. lineNumber.setFocusTraversalKeysEnabled(false);
  101. lineNumber.setFont(getFont());
  102. lineNumber.setMaximumSize(new java.awt.Dimension(70, 24));
  103. lineNumber.setMinimumSize(new java.awt.Dimension(70, 24));
  104. lineNumber.setPreferredSize(new java.awt.Dimension(70, 24));
  105. toolBar.add(lineNumber);
  106. col.setFont(getFont());
  107. col.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  108. col.setText(":");
  109. toolBar.add(col);
  110. columnNumber.setFont(getFont());
  111. columnNumber.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
  112. columnNumber.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
  113. columnNumber.setMaximumSize(new java.awt.Dimension(30, 12));
  114. columnNumber.setMinimumSize(new java.awt.Dimension(30, 12));
  115. columnNumber.setPreferredSize(new java.awt.Dimension(30, 12));
  116. toolBar.add(columnNumber);
  117. toolBar.add(sep);
  118. findKeyword.setFont(getFont());
  119. findKeyword.setHorizontalAlignment(javax.swing.JTextField.LEFT);
  120. findKeyword.setFocusTraversalKeysEnabled(false);
  121. findKeyword.setMaximumSize(new java.awt.Dimension(160, 24));
  122. findKeyword.setMinimumSize(new java.awt.Dimension(160, 24));
  123. findKeyword.setPreferredSize(new java.awt.Dimension(160, 24));
  124. toolBar.add(findKeyword);
  125. org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
  126. this.setLayout(layout);
  127. layout.setHorizontalGroup(
  128. layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  129. .add(toolBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  130. .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  131. .add(splitter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 640, Short.MAX_VALUE))
  132. );
  133. layout.setVerticalGroup(
  134. layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  135. .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
  136. .addContainerGap(370, Short.MAX_VALUE)
  137. .add(toolBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  138. .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  139. .add(layout.createSequentialGroup()
  140. .add(splitter, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE)
  141. .add(30, 30, 30)))
  142. );
  143. }// </editor-fold>//GEN-END:initComponents
  144. // Variables declaration - do not modify//GEN-BEGIN:variables
  145. public javax.swing.JEditorPane ced1;
  146. public javax.swing.JEditorPane ced2;
  147. private javax.swing.JLabel col;
  148. public javax.swing.JLabel columnNumber;
  149. public javax.swing.JTextField findKeyword;
  150. public javax.swing.JFormattedTextField lineNumber;
  151. public javax.swing.JLabel modIndicator;
  152. public javax.swing.JScrollPane scrollPane1;
  153. public javax.swing.JScrollPane scrollPane2;
  154. private javax.swing.JToolBar.Separator sep;
  155. public javax.swing.JSplitPane splitter;
  156. public javax.swing.JToolBar toolBar;
  157. // End of variables declaration//GEN-END:variables
  158. }