第 10 課結束之後所完成之 MapLocatorHandler.egl 的程式碼

下列程式碼是第 10 課結束之後 MapLocatorHandler.egl 檔的文字。
package handlers;

import com.ibm.egl.rui.widgets.GridLayout;
import com.ibm.egl.rui.widgets.TextLabel;
import com.ibm.egl.rui.widgets.GridLayoutData;
import com.ibm.egl.rui.widgets.TextField;
import dojo.widgets.DojoButton;
import com.ibm.egl.rui.widgets.Box;
import com.ibm.egl.rui.widgets.GridLayoutLib;
import utils.map.GoogleMap;

handler MapLocatorHandler type RUIhandler {
   initialUI = [ ui ], onConstructionFunction = start,
   cssFile="css/MortgageUIProject.css", title="MapLocatorHandler" }

   ui GridLayout{ columns = 3, rows = 3, cellPadding = 4, 
                  children = [ localMap, listingBox, zipButton, 
                               zipField, zipLabel, introLabel ] };
   introLabel TextLabel{ layoutData = new GridLayoutData{ row = 1, column = 1,
                         horizontalSpan = 3 }, text = "Search for mortgage business" };
   zipLabel TextLabel{ layoutData = new GridLayoutData{ row = 2, column = 1 }, 
                       text = "Zip code:" };
   zipField TextField{ layoutData = new GridLayoutData{ row = 2, column = 2 },
                           width = "100", onKeyDown ::= checkForEnter};
   zipButton DojoButton{ layoutData = new GridLayoutData{ row = 2, column = 3 }, 
                         text = "Search", onClick ::= buttonClicked };
   listingBox Box{ layoutData = new GridLayoutData{ row = 3, column = 1,
                   verticalAlignment = GridLayoutLib.VALIGN_TOP,
                   horizontalSpan = 2 }, padding=8, columns = 1, 	width = "150" };
   localMap GoogleMap{ layoutData = new GridLayoutData{ row = 3, column = 3 },
                       width = 400, height = 400 };
		
   function start()
   end

   function checkForEnter(event Event in)
   end
	
   function buttonClicked(event Event in)
   end
end

意見