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

Form.java

Go to the documentation of this file.
00001 
00066 package com.arcle.rmt.superwaba.ui;
00067 
00068 import waba.ui.Container;
00069 import waba.ui.Control;
00070 import waba.ui.Button;
00071 import waba.ui.ListBox;
00072 import waba.ui.ComboBox;
00073 
00080 public abstract class Form extends Container {
00085     public Form() {
00086         super();
00087         initChildren();
00088     }
00089 
00090     //-----------------------------------------------------------------------
00091     // New Abstract Methods
00092 
00096     protected abstract void initChildren();
00097 
00098     protected abstract void layoutChildren();
00099 
00100 
00101     //-----------------------------------------------------------------------
00102     // Overridden Methods
00103 
00104 
00113     public void setRect(int x, int y, int width, int height, Control relative) {
00114         super.setRect(x, y, width, height, relative);
00115         if (!isInitialized) {
00116             layoutChildren();
00117             initCompleted();
00118             isInitialized = true;
00119         }
00120     }
00121 
00122     //-----------------------------------------------------------------------
00123     // Protected methods.
00124 
00129     protected void initCompleted() { }
00130 
00131     //-----------------------------------------------------------------------
00132     // Factory Methods
00133 
00134 
00138     protected Button createButton(String text) {
00139         return new Button(text);
00140     }
00141 
00145     protected ListBox createListBox() {
00146         return new ListBox();
00147     }
00148 
00149     protected ComboBox createComboBox(Object[] items) {
00150         return new ComboBox(items);
00151     }
00152 
00153 
00154     //-----------------------------------------------------------------------
00155     // Member Variables
00156 
00157 
00161     private boolean isInitialized = false;
00162 
00163 }
00164     

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