Пример #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;
  }
Пример #2
0
 public AirspaceEditor createEditor(Airspace airspace) {
   SphereAirspaceEditor editor = new SphereAirspaceEditor();
   editor.setSphere((SphereAirspace) airspace);
   setEditorAttributes(editor);
   return editor;
 }