2 Copyright (C) 2001, 2006 United States Government
3 as represented by the Administrator of the
4 National Aeronautics and Space Administration.
7 package gov
.nasa
.worldwind
.layers
;
9 import gov
.nasa
.worldwind
.render
.*;
10 import gov
.nasa
.worldwind
.util
.Logging
;
12 import java
.util
.concurrent
.ConcurrentLinkedQueue
;
18 public class IconLayer
extends AbstractLayer
20 private final java
.util
.Collection
<WWIcon
> icons
= new ConcurrentLinkedQueue
<WWIcon
>();
21 private IconRenderer iconRenderer
= new IconRenderer();
22 private Pedestal pedestal
;
28 public void addIcon(WWIcon icon
)
32 String msg
= Logging
.getMessage("nullValue.Icon");
33 Logging
.logger().severe(msg
);
34 throw new IllegalArgumentException(msg
);
40 public void removeIcon(WWIcon icon
)
44 String msg
= Logging
.getMessage("nullValue.Icon");
45 Logging
.logger().severe(msg
);
46 throw new IllegalArgumentException(msg
);
49 this.icons
.remove(icon
);
52 public java
.util
.Collection
<WWIcon
> getIcons()
57 public Pedestal
getPedestal()
62 public void setPedestal(Pedestal pedestal
)
64 this.pedestal
= pedestal
;
68 protected void doPick(DrawContext dc
, java
.awt
.Point pickPoint
)
70 this.iconRenderer
.setPedestal(this.pedestal
);
71 this.iconRenderer
.pick(dc
, this.icons
, pickPoint
, this);
75 protected void doRender(DrawContext dc
)
77 this.iconRenderer
.setPedestal(this.pedestal
);
78 this.iconRenderer
.render(dc
, this.icons
);
82 public String
toString()
84 return Logging
.getMessage("layers.IconLayer.Name");