コード例 #1
0
    protected void setSelectionEditing(boolean editing) {
      if (this.selectedEntry == null) {
        throw new IllegalStateException();
      }

      if (this.selectedEntry.isEditing() == editing) {
        throw new IllegalStateException();
      }

      this.selectedEntry.setEditing(editing);

      AirspaceEditor editor = this.selectedEntry.getEditor();
      editor.setArmed(editing);

      if (editing) {
        this.editorController.setEditor(editor);
        insertBeforePlacenames(this.getApp().getWwd(), editor);
      } else {
        this.editorController.setEditor(null);
        this.getApp().getWwd().getModel().getLayers().remove(editor);
      }

      int index = this.getModel().getIndexForEntry(this.selectedEntry);
      this.getModel().fireTableRowsUpdated(index, index);
    }
コード例 #2
0
 public static void setEditorAttributes(AirspaceEditor editor) {
   editor.setUseRubberBand(true);
   editor.setKeepControlPointsAboveTerrain(true);
 }