In diesem Szenario wird davon ausgegangen, dass die Manager-Klassen die vordefinierten Werte, die als erweiterte Eigenschaften eingefügt werden, bereitstellen. Diese Werte werden im LetterEditor angezeigt, um die Werte der Dropdownlisten anzuzeigen. Die Klassen sind wie folgt definiert: package com.adobe.customizations
{
import mx.collections.ArrayCollection;
import mx.collections.IList;
public class GeographicalLocationManager
{
private static var geoInstance:GeographicalLocationManager;
public function GeographicalLocationManager()
{
}
//The method is used to retrieve a list of all the available geographical locations
public function getAllGeo():IList{
var geos:IList = new ArrayCollection();
geos.addItem("");
geos.addItem("Africa");
geos.addItem("Asia Pacific");
geos.addItem("Europe");
geos.addItem("Latin America");
geos.addItem("Middle East");
geos.addItem("North America");
return geos;
}
public static function getInstance():GeographicalLocationManager{
if(geoInstance == null)
geoInstance = new GeographicalLocationManager();
return geoInstance;
}
}
}
package com.adobe.customizations
{
import mx.collections.ArrayCollection;
import mx.collections.IList;
public class ProductLineManager
{
private static var prodLineInstance:ProductLineManager;
public function ProductLineManager()
{
}
//The method is used to retrieve a list of all the available product lines
public function getAllProductLines():IList{
var prodLines:IList = new ArrayCollection();
prodLines.addItem("");
prodLines.addItem("Medical Insurance");
prodLines.addItem("Property Insurance");
prodLines.addItem("Vehicle Insurance");
prodLines.addItem("Travel Insurance");
prodLines.addItem("General Insurance");
return prodLines;
}
public static function getInstance():ProductLineManager{
if(prodLineInstance == null)
prodLineInstance = new ProductLineManager();
return prodLineInstance;
}
}
}
|
|
|