/** * Sets whether or not this control annotation is highlighted. * * @param highlighted true if this control annotation is highlighted, * false otherwise */ @Override public void setHighlighted(boolean highlighted) { this.isHighlighted = highlighted; if (highlighted) { this.getAttributes().setImageOpacity(this.highlightedOpacity); } else { this.getAttributes().setImageOpacity(this.defaultOpacity); } }
/** * Constructs a new depiction annotation with a specified image source * and text at a specified position. * * @param imageSource the image source of this depiction annotation * @param text the text of this depiction annotation * @param position the position of this depiction annotation in globe * coordinates */ public DepictionAnnotation(Object imageSource, String text, Position position) { super(text, position); this.getAttributes().setImageSource(imageSource); this.getAttributes().setImageScale(1d); this.getAttributes().setImageOpacity(1d); this.getAttributes().setImageRepeat(Annotation.IMAGE_REPEAT_NONE); this.getAttributes().setTextColor(Color.LIGHT_GRAY); this.getAttributes().setBackgroundColor(new Color(0, 0, 0, 0)); this.getAttributes().setAdjustWidthToText(AVKey.SIZE_FIXED); this.getAttributes().setSize(new Dimension(64, 64)); this.getAttributes().setTextAlign(AVKey.CENTER); this.getAttributes().setLeaderGapWidth(3); }
/** * Constructs a new depiction annotation with a specified image source, * size and text at a specified position. * * @param imageSource the image source of this depiction annotation * @param dim the size of this depiction annotation * @param text the text of this depiction annotation * @param position the position of this depiction annotation in globe * coordinates */ public DepictionAnnotation(Object imageSource, Dimension dim, String text, Position position) { super(text, position); this.getAttributes().setImageSource(imageSource); this.getAttributes().setImageScale(1d); this.getAttributes().setImageOpacity(1d); this.getAttributes().setImageRepeat(Annotation.IMAGE_REPEAT_NONE); this.getAttributes().setTextColor(Color.LIGHT_GRAY); this.getAttributes().setBackgroundColor(new Color(0, 0, 0, 0)); this.getAttributes().setAdjustWidthToText(AVKey.SIZE_FIXED); this.getAttributes().setSize(dim); this.getAttributes().setTextAlign(AVKey.CENTER); this.getAttributes().setLeaderGapWidth(3); }