1 package net.systemeD.potlatch2.mapfeatures.editors {
3 import net.systemeD.halcyon.connection.*;
4 import net.systemeD.potlatch2.mapfeatures.*;
5 import flash.display.*;
7 public class SingleTagEditorFactory extends EditorFactory {
8 private var tagKey:String;
9 private var boxDirection:String;
11 public function SingleTagEditorFactory(inputXML:XML, defaultLayout:String="vertical") {
13 tagKey = inputXML.@key;
14 boxDirection = inputXML.@layout;
15 if (!boxDirection) { boxDirection=defaultLayout; }
18 override public function areTagsMatching(entity:Entity):Boolean {
19 return entity.getTag(tagKey) != null;
22 public function get key():String {
26 public function get direction():String {
30 override public function createEditorInstance(entity:Entity):DisplayObject {
31 var editor:SingleTagEditor = createSingleTagEditor();
32 editor.factory = this;
33 editor.entity = entity;
37 protected function createSingleTagEditor():SingleTagEditor {