Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

LexiconAttributes.java

Go to the documentation of this file.
00001 
00058 package com.arcle.rmt.j2se.swing.vc.rqml;
00059 
00060 import javax.swing.*;
00061 import java.awt.BorderLayout;
00062 import java.awt.GridBagLayout;
00063 import java.awt.GridBagConstraints;
00064 import java.awt.Insets;
00065 import java.util.Observable;
00066 
00067 import com.arcle.rmt.rqml.RQMLFirstClass;
00068 import com.arcle.rmt.rqml.Lexicon;
00069 
00075 public class LexiconAttributes extends FirstClassPanel {
00076     public LexiconAttributes(RQMLFirstClass fc) {
00077         super(fc);
00078         setName("Lexicon");
00079     }
00080 
00081     //-------------------------------------------------------------------
00082     // View implementations
00083 
00084 
00085     //-------------------------------------------------------------------
00086     protected void initChildren() {
00087         lbDefinition = createLabel("Definition");
00088 
00089         edDefinition = createTextArea();
00090     }
00091 
00092     protected void layoutChildren() {
00093         setLayout(new BorderLayout());
00094         JPanel p1;
00095         p1 = new JPanel();
00096         p1.setLayout(new BorderLayout());
00097         p1.add(lbDefinition, BorderLayout.NORTH);
00098         p1.add(createScrollPane(edDefinition), BorderLayout.CENTER);
00099         add(p1, BorderLayout.CENTER);
00100     }
00101 
00102     //-------------------------------------------------------------------
00103 
00104     protected void loadData() {
00105         RQMLFirstClass elem = getElement();
00106         if (elem instanceof Lexicon) {
00107             Lexicon lex = (Lexicon) elem;
00108             edDefinition.setText(lex.getDefinition().getString());
00109         }
00110     }
00111 
00112     protected void saveData() {
00113         RQMLFirstClass elem = getElement();
00114         if (elem instanceof Lexicon) {
00115             Lexicon lex = (Lexicon) elem;
00116             lex.getDefinition().setString(edDefinition.getText());
00117         }
00118     }
00119 
00120     //-------------------------------------------------------------------
00121     // Member Variables
00122 
00123     private JLabel lbDefinition;
00124 
00125     private JTextArea edDefinition;
00126 }

Generated on Fri Jun 18 19:51:22 2004 for Arcle Rambutan by doxygen 1.3.5