KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > bluej > editor > moe > MoeEditorPrefPanel


1 //Copyright (c) 2000, 2005 BlueJ Group, Deakin University
2
//
3
// This software is made available under the terms of the "MIT License"
4
// A copy of this license is included with this source distribution
5
// in "license.txt" and is also available at:
6
// http://www.opensource.org/licenses/mit-license.html
7
// Any queries should be directed to Michael Kolling mik@bluej.org
8

9 package bluej.editor.moe;
10
11 import javax.swing.*;
12
13 import bluej.*;
14 import bluej.prefmgr.*;
15
16 /**
17 * A PrefPanel subclass to allow the user to interactively add a new library
18 * to the browser. The new library can be specified as a file (ZIP or JAR
19 * archive) with an associated description.
20 *
21 * @author Andrew Patterson
22 * @version $Id: MoeEditorPrefPanel.java,v 1.9 2005/05/02 03:23:32 davmac Exp $
23 */

24 public class MoeEditorPrefPanel extends JPanel implements PrefPanelListener {
25
26     private JTextField sizeField;
27
28     /**
29      * Setup the UI for the dialog and event handlers for the dialog's buttons.
30      *
31      * @param title the title of the dialog
32      */

33     public MoeEditorPrefPanel() {
34
35         JLabel fontsizeTag = new JLabel("Font size");
36         {
37             fontsizeTag.setAlignmentX(LEFT_ALIGNMENT);
38         }
39
40         sizeField = new JTextField(4);
41         {
42             sizeField.setAlignmentX(LEFT_ALIGNMENT);
43         }
44
45         setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
46         setBorder(BlueJTheme.generalBorder);
47
48         add(fontsizeTag);
49         add(sizeField);
50         add(Box.createGlue());
51     }
52
53     public void beginEditing()
54     {
55         sizeField.setText("10");
56     }
57
58     public void revertEditing()
59     {
60     }
61
62     public void commitEditing()
63     {
64     }
65 }
66
67
Popular Tags