Exemplo n.º 1
0
  /**
   * Draws all features that match the given attribute stored in the given column of the attribute
   * table. If no features are found or the given column is out of bounds, nothing is drawn
   *
   * @param attribute Attribute identifying features to draw.
   * @param col Column in the attribute table (where ID is column 0) to search.
   */
  public void draw(String attribute, int col) {
    Set<Integer> ids = attributes.match(attribute, col);

    for (Integer id : ids) {
      Feature feature = features.get(id);
      if (feature != null) {
        feature.draw(this);
      }
    }
  }
Exemplo n.º 2
0
 /** Draws the map in the parent sketch. */
 public void draw() {
   for (Feature feature : features.values()) {
     feature.draw(this);
   }
 }
Exemplo n.º 3
0
 /**
  * Draws the feature that matches the given id. If the id is not found, nothing is drawn.
  *
  * @param id ID of feature to draw.
  */
 public void draw(int id) {
   Feature feature = features.get(new Integer(id));
   if (feature != null) {
     feature.draw(this);
   }
 }