예제 #1
0
    private void fillPointsPanel() {
      int i = 0;
      for (Position pos : lineBuilder.getLine().getPositions()) {
        if (i == this.pointLabels.length) break;

        String las = String.format("Lat %7.4f\u00B0", pos.getLatitude().getDegrees());
        String los = String.format("Lon %7.4f\u00B0", pos.getLongitude().getDegrees());
        pointLabels[i++].setText(las + "  " + los);
      }
      for (; i < this.pointLabels.length; i++) pointLabels[i++].setText("");
    }
예제 #2
0
 public LinePanel(WorldWindow wwd, LineBuilder lineBuilder) {
   super(new BorderLayout());
   this.wwd = wwd;
   this.lineBuilder = lineBuilder;
   this.makePanel(new Dimension(200, 400));
   lineBuilder.addPropertyChangeListener(
       new PropertyChangeListener() {
         public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
           fillPointsPanel();
         }
       });
 }