Ejemplo n.º 1
0
  protected static AirspaceEditor getEditorFor(Airspace airspace) {
    if (airspace instanceof Polygon) {
      PolygonEditor editor = new PolygonEditor();
      editor.setPolygon((Polygon) airspace);
      setEditorAttributes(editor);
      return editor;
    } else if (airspace instanceof SphereAirspace) {
      SphereAirspaceEditor editor = new SphereAirspaceEditor();
      editor.setSphere((SphereAirspace) airspace);
      setEditorAttributes(editor);
      return editor;
    }

    return null;
  }
Ejemplo n.º 2
0
 public AirspaceEditor createEditor(Airspace airspace) {
   PolygonEditor editor = new PolygonEditor();
   editor.setPolygon((Polygon) airspace);
   setEditorAttributes(editor);
   return editor;
 }