01: //Copyright (c) 2000, 2005 BlueJ Group, Deakin University
02: //
03: // This software is made available under the terms of the "MIT License"
04: // A copy of this license is included with this source distribution
05: // in "license.txt" and is also available at:
06: // http://www.opensource.org/licenses/mit-license.html
07: // Any queries should be directed to Michael Kolling mik@bluej.org
08:
09: 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 3357 2005-05-02 03:23:33Z davmac $
23: */
24: public class MoeEditorPrefPanel extends JPanel implements
25: PrefPanelListener {
26:
27: private JTextField sizeField;
28:
29: /**
30: * Setup the UI for the dialog and event handlers for the dialog's buttons.
31: *
32: * @param title the title of the dialog
33: */
34: public MoeEditorPrefPanel() {
35:
36: JLabel fontsizeTag = new JLabel("Font size");
37: {
38: fontsizeTag.setAlignmentX(LEFT_ALIGNMENT);
39: }
40:
41: sizeField = new JTextField(4);
42: {
43: sizeField.setAlignmentX(LEFT_ALIGNMENT);
44: }
45:
46: setLayout(new BoxLayout(this , BoxLayout.Y_AXIS));
47: setBorder(BlueJTheme.generalBorder);
48:
49: add(fontsizeTag);
50: add(sizeField);
51: add(Box.createGlue());
52: }
53:
54: public void beginEditing() {
55: sizeField.setText("10");
56: }
57:
58: public void revertEditing() {
59: }
60:
61: public void commitEditing() {
62: }
63: }
|