Codota Logo
AnnotationAttributes
Code IndexAdd Codota to your IDE (free)

How to use
AnnotationAttributes
in
gov.nasa.worldwind.render

Best Java code snippets using gov.nasa.worldwind.render.AnnotationAttributes (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: com.uvic-cfar.swim/worldwind

/**
 * 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);
}
origin: senbox-org/s1tbx

public Level2ProductLayer() {
  this.setName("S-1 Level-2 OCN");
  theWWD = null;
  //dpHighlightAttrs = new BasicShapeAttributes();
  //dpHighlightAttrs.setOutlineMaterial(Material.WHITE);
  //dpHighlightAttrs.setOutlineWidth(2d);
  // this is copied from gov.nasa.worldwindx.examples.util.LayerManagerLayer
  theInfoAnnotation = new ScreenAnnotation("", new Point(120, 520));
  // Set annotation so that it will not force text to wrap (large width) and will adjust it's width to
  // that of the text. A height of zero will have the annotation height follow that of the text too.
  theInfoAnnotation.getAttributes().setSize(new Dimension(Integer.MAX_VALUE, 0));
  theInfoAnnotation.getAttributes().setAdjustWidthToText(AVKey.SIZE_FIT_TEXT);
  // Set appearance attributes
  theInfoAnnotation.getAttributes().setCornerRadius(0);
  //theInfoAnnotation.getAttributes().setFont(this.font);
  theInfoAnnotation.getAttributes().setHighlightScale(1);
  theInfoAnnotation.getAttributes().setTextColor(Color.WHITE);
  theInfoAnnotation.getAttributes().setBackgroundColor(new Color(0f, 0f, 0f, .5f));
  theInfoAnnotation.getAttributes().setInsets(new Insets(6, 6, 6, 6));
  theInfoAnnotation.getAttributes().setBorderWidth(1);
  theInfoAnnotation.getAttributes().setVisible(false);
}
origin: com.uvic-cfar.swim/worldwind

/**
 * Constructs a new depiction annotation with a specified text at a
 * specified position.
 * 
 * @param text the text of this depiction annotation
 * @param position the position of this depiction annotation in globe
 *        coordinates
 * 
 * @see GlobeAnnotation#GlobeAnnotation(String, Position)
 */
public DepictionAnnotation(String text, Position position) {
  super(text, position);
  this.getAttributes().setTextColor(Color.LIGHT_GRAY);
  this.getAttributes().setBackgroundColor(new Color(0, 0, 0, 0));
  this.getAttributes().setTextAlign(AVKey.CENTER);
  this.getAttributes().setLeaderGapWidth(3);
}

origin: com.uvic-cfar.swim/worldwind

/**
 * Sets whether or not this depiction is visible.
 * 
 * @param visible the visibility state to be set
 */
public void setVisible(boolean visible) {
  if (this.depiction instanceof TacticalGraphic) {
    ((TacticalGraphic) this.depiction).setVisible(visible);
  } else if (this.depiction instanceof TacticalSymbol) {
    ((TacticalSymbol) this.depiction).setVisible(visible);
  }
  if (null != this.annotation) {
    this.annotation.getAttributes().setVisible(visible);
  }
}

origin: senbox-org/snap-desktop

      || event.getEventAction().equals(SelectEvent.LEFT_CLICK)) {
    if (!annotation.getAttributes().isHighlighted()) {
      annotation.getAttributes().setHighlighted(true);
      update = true;
} else if (event.getEventAction().equals(SelectEvent.ROLLOVER) && annotation.getAttributes().isHighlighted()) {
  annotation.getAttributes().setHighlighted(false);
  ((Component) this.wwd).setCursor(Cursor.getDefaultCursor());
  this.update();
origin: senbox-org/s1tbx

public void updateInfoAnnotation(final SelectEvent event) {
  //SystemUtils.LOG.info("updateInfoAnnotation " + event.getTopObject() + " " + theObjectInfoHash.get(event.getTopObject()));
  if (event.getEventAction().equals(SelectEvent.ROLLOVER) && theObjectInfoHash.get(event.getTopObject()) != null) {
    String info = theObjectInfoHash.get(event.getTopObject());
    if (event.getTopObject() instanceof DirectedPath) {
      //SystemUtils.LOG.info("DirectedPath:::");
      DirectedPath dp = (DirectedPath) event.getTopObject();
      //dp.getAttributes().setOutlineMaterial(Material.WHITE);
      dp.setHighlighted(true);
      //dp.setAttributes(productLayer.dpHighlightAttrs);
      //theSelectedObjectLabel.setText("" + productLayer.theObjectInfoHash.get(dp));
      theLastSelectedDP = dp;
    }
    theInfoAnnotation.setText(info);
    theInfoAnnotation.getAttributes().setVisible(true);
    //SystemUtils.LOG.info("selectedProduct " + getSelectedProduct());
    //final ExecCommand command = datApp.getCommandManager().getExecCommand("showPolarWaveView");
    //command.execute(2);
  } else if (event.getEventAction().equals(SelectEvent.LEFT_CLICK) && theSurfaceProductHash.get(event.getTopObject()) != null && theSurfaceSequenceHash.get(event.getTopObject()) != null) {
    //SystemUtils.LOG.info("click " + event.getTopObject());
    OceanSwellTopComponent.setOSWRecord(theSurfaceProductHash.get(event.getTopObject()), theSurfaceSequenceHash.get(event.getTopObject()));
  } else {
    if (theLastSelectedDP != null) {
      theLastSelectedDP.setHighlighted(false);
    }
    theInfoAnnotation.getAttributes().setVisible(false);
    //theSelectedObjectLabel.setText("");
  }
}
origin: com.uvic-cfar.swim/worldwind

/**
 * 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);
}

origin: senbox-org/s1tbx

theInfoAnnotation.getAttributes().setVisible(false);
gov.nasa.worldwind.renderAnnotationAttributes

Most used methods

  • setAdjustWidthToText
  • setBackgroundColor
  • setSize
  • setTextColor
  • setVisible
  • isHighlighted
  • setBorderWidth
  • setCornerRadius
  • setHighlightScale
  • setHighlighted
  • setImageOpacity
  • setImageRepeat
  • setImageOpacity,
  • setImageRepeat,
  • setImageScale,
  • setImageSource,
  • setInsets,
  • setLeaderGapWidth,
  • setTextAlign

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Path (java.nio.file)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now