Exemplo n.º 1
0
    public void addEntry(AirspaceEntry entry) {
      entry.getEditor().addEditListener(this);
      this.getModel().addEntry(entry);
      this.updateShapeIntersection();

      this.getApp().getAirspaceLayer().addRenderable(entry.getAirspace());
      this.getApp().getWwd().redraw();
    }
Exemplo n.º 2
0
 protected AirspaceEntry getEntryFor(Airspace airspace) {
   for (AirspaceEntry entry : this.getModel().getEntries()) {
     if (entry.getAirspace() == airspace) {
       return entry;
     }
   }
   return null;
 }
Exemplo n.º 3
0
    public void removeEntry(AirspaceEntry entry) {
      entry.getEditor().removeEditListener(this);

      if (this.getSelectedEntry() == entry) {
        this.selectEntry(null, true);
      }

      this.getModel().removeEntry(entry);
      this.updateShapeIntersection();

      this.getApp().getAirspaceLayer().removeRenderable(entry.getAirspace());
      this.getApp().getWwd().redraw();
    }
Exemplo n.º 4
0
    protected void updateShapeIntersection() {
      AirspaceEntry selected = this.getSelectedEntry();

      if (selected != null) {
        boolean hasIntersection = false;
        for (AirspaceEntry entry : this.getModel().getEntries()) {
          if (entry != selected) {
            boolean intersecting =
                this.areShapesIntersecting(entry.getAirspace(), selected.getAirspace());
            if (intersecting) hasIntersection = true;

            entry.setIntersecting(intersecting);
          }
        }

        selected.setIntersecting(hasIntersection);
      } else {
        for (AirspaceEntry entry : this.getModel().getEntries()) {
          entry.setIntersecting(false);
        }
      }
    }
Exemplo n.º 5
0
 public void setValueAt(Object aObject, int rowIndex, int columnIndex) {
   AirspaceEntry entry = this.entryList.get(rowIndex);
   String key = columnAttribute[columnIndex];
   entry.setValue(key, aObject);
 }
Exemplo n.º 6
0
 public Object getValueAt(int rowIndex, int columnIndex) {
   AirspaceEntry entry = this.entryList.get(rowIndex);
   return entry.getValue(columnAttribute[columnIndex]);
 }