All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.micromata.opengis.kml.v_2_2_0.LabelStyle Maven / Gradle / Ivy

Go to download

This is JavaAPIforKMml, Micromata's library for use with applications that want to parse, generate and operate on KML. It is an implementation of the OGC KML 2.2 standard. It is written entirely in Java and makes heavy use of JAXB.

There is a newer version: 3.0.4
Show newest version

package de.micromata.opengis.kml.v_2_2_0;

import de.micromata.opengis.kml.v_2_2_0.annotations.Obvious;
import jakarta.xml.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;


/**
 * {@code }
 * 

* Note: The {@code } tag is deprecated. Use {@code } instead. *

*

* Specifies how the {@code } of a Feature is drawn in the 3D viewer. A custom color, * color mode, and scale for the label (name) can be specified. *

* * Syntax: *
<LabelStyle id="ID">
 *   <!-- inherited from ColorStyle -->
 *   <color>ffffffff</color>            <!-- kml:color -->
 *   <colorMode>normal</colorMode>      <!-- kml:colorModeEnum: normal or random -->
 * 
 *   <!-- specific to LabelStyle -->
 *   <scale>1</scale>                   <!-- float -->
 * </LabelStyle>
* * Extends: * * * Contained By: * * * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LabelStyleType", propOrder = { "scale", "labelStyleSimpleExtension", "labelStyleObjectExtension" }) @XmlRootElement(name = "LabelStyle", namespace = "http://www.opengis.net/kml/2.2") public class LabelStyle extends ColorStyle implements Cloneable { /** * {@code } *

* Note: The {@code } tag has been deprecated. Use {@code } instead. *

*

* Resizes the icon. *

*

* Scales a model along the x, y, and z axes in the model's coordinate space. {@code * 2.5 2.5 3.5 } *

* * * */ @XmlElement(defaultValue = "1.0") protected double scale; @XmlElement(name = "LabelStyleSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List labelStyleSimpleExtension; /** * {@code } *

* This is an abstract base class and cannot be used directly in a KML file. It provides * the id attribute, which allows unique identification of a KML element, and the targetId * attribute, which is used to reference objects that have already been loaded into * Google Earth. The id attribute must be assigned if the Update mechanism is to * be used. *

* * Syntax: *
<!-- abstract element; do not create -->
     * <!-- Object id="ID" targetId="NCName" -->
     * <!-- /Object> -->
* * * */ @XmlElement(name = "LabelStyleObjectExtensionGroup") protected List labelStyleObjectExtension; public LabelStyle() { super(); } /** * * * @return * possible object is * {@link Double} * */ public double getScale() { return scale; } /** * * * @param value * allowed object is * {@link Double} * */ public void setScale(double value) { this.scale = value; } /** * * */ public List getLabelStyleSimpleExtension() { if (labelStyleSimpleExtension == null) { labelStyleSimpleExtension = new ArrayList(); } return this.labelStyleSimpleExtension; } /** * * */ public List getLabelStyleObjectExtension() { if (labelStyleObjectExtension == null) { labelStyleObjectExtension = new ArrayList(); } return this.labelStyleObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp; temp = Double.doubleToLongBits(scale); result = ((prime*result)+((int)(temp^(temp >>>(32))))); result = ((prime*result)+((labelStyleSimpleExtension == null)? 0 :labelStyleSimpleExtension.hashCode())); result = ((prime*result)+((labelStyleObjectExtension == null)? 0 :labelStyleObjectExtension.hashCode())); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (super.equals(obj) == false) { return false; } if ((obj instanceof LabelStyle) == false) { return false; } LabelStyle other = ((LabelStyle) obj); if (scale!= other.scale) { return false; } if (labelStyleSimpleExtension == null) { if (other.labelStyleSimpleExtension!= null) { return false; } } else { if (labelStyleSimpleExtension.equals(other.labelStyleSimpleExtension) == false) { return false; } } if (labelStyleObjectExtension == null) { if (other.labelStyleObjectExtension!= null) { return false; } } else { if (labelStyleObjectExtension.equals(other.labelStyleObjectExtension) == false) { return false; } } return true; } /** * * * @param labelStyleSimpleExtension * Objects of the following type are allowed in the list: {@link Object} */ public void setLabelStyleSimpleExtension(final List labelStyleSimpleExtension) { this.labelStyleSimpleExtension = labelStyleSimpleExtension; } /** * add a value to the labelStyleSimpleExtension property collection * * @param labelStyleSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public LabelStyle addToLabelStyleSimpleExtension(final Object labelStyleSimpleExtension) { this.getLabelStyleSimpleExtension().add(labelStyleSimpleExtension); return this; } /** * * * @param labelStyleObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} */ public void setLabelStyleObjectExtension(final List labelStyleObjectExtension) { this.labelStyleObjectExtension = labelStyleObjectExtension; } /** * add a value to the labelStyleObjectExtension property collection * * @param labelStyleObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public LabelStyle addToLabelStyleObjectExtension(final AbstractObject labelStyleObjectExtension) { this.getLabelStyleObjectExtension().add(labelStyleObjectExtension); return this; } /** * * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public LabelStyle addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * * */ @Obvious @Override public void setSubStyleSimpleExtension(final List subStyleSimpleExtension) { super.setSubStyleSimpleExtension(subStyleSimpleExtension); } @Obvious @Override public LabelStyle addToSubStyleSimpleExtension(final Object subStyleSimpleExtension) { super.getSubStyleSimpleExtension().add(subStyleSimpleExtension); return this; } /** * * */ @Obvious @Override public void setSubStyleObjectExtension(final List subStyleObjectExtension) { super.setSubStyleObjectExtension(subStyleObjectExtension); } @Obvious @Override public LabelStyle addToSubStyleObjectExtension(final AbstractObject subStyleObjectExtension) { super.getSubStyleObjectExtension().add(subStyleObjectExtension); return this; } /** * * */ @Obvious @Override public void setColorStyleSimpleExtension(final List colorStyleSimpleExtension) { super.setColorStyleSimpleExtension(colorStyleSimpleExtension); } @Obvious @Override public LabelStyle addToColorStyleSimpleExtension(final Object colorStyleSimpleExtension) { super.getColorStyleSimpleExtension().add(colorStyleSimpleExtension); return this; } /** * * */ @Obvious @Override public void setColorStyleObjectExtension(final List colorStyleObjectExtension) { super.setColorStyleObjectExtension(colorStyleObjectExtension); } @Obvious @Override public LabelStyle addToColorStyleObjectExtension(final AbstractObject colorStyleObjectExtension) { super.getColorStyleObjectExtension().add(colorStyleObjectExtension); return this; } /** * fluent setter * * * @param scale * required parameter */ public LabelStyle withScale(final double scale) { this.setScale(scale); return this; } /** * fluent setter * * * @param labelStyleSimpleExtension * required parameter */ public LabelStyle withLabelStyleSimpleExtension(final List labelStyleSimpleExtension) { this.setLabelStyleSimpleExtension(labelStyleSimpleExtension); return this; } /** * fluent setter * * * @param labelStyleObjectExtension * required parameter */ public LabelStyle withLabelStyleObjectExtension(final List labelStyleObjectExtension) { this.setLabelStyleObjectExtension(labelStyleObjectExtension); return this; } @Obvious @Override public LabelStyle withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public LabelStyle withId(final String id) { super.withId(id); return this; } @Obvious @Override public LabelStyle withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Obvious @Override public LabelStyle withSubStyleSimpleExtension(final List subStyleSimpleExtension) { super.withSubStyleSimpleExtension(subStyleSimpleExtension); return this; } @Obvious @Override public LabelStyle withSubStyleObjectExtension(final List subStyleObjectExtension) { super.withSubStyleObjectExtension(subStyleObjectExtension); return this; } @Obvious @Override public LabelStyle withColor(final String color) { super.withColor(color); return this; } @Obvious @Override public LabelStyle withColorMode(final ColorMode colorMode) { super.withColorMode(colorMode); return this; } @Obvious @Override public LabelStyle withColorStyleSimpleExtension(final List colorStyleSimpleExtension) { super.withColorStyleSimpleExtension(colorStyleSimpleExtension); return this; } @Obvious @Override public LabelStyle withColorStyleObjectExtension(final List colorStyleObjectExtension) { super.withColorStyleObjectExtension(colorStyleObjectExtension); return this; } @Override public LabelStyle clone() { LabelStyle copy; copy = ((LabelStyle) super.clone()); copy.labelStyleSimpleExtension = new ArrayList((getLabelStyleSimpleExtension().size())); for (Object iter: labelStyleSimpleExtension) { copy.labelStyleSimpleExtension.add(iter); } copy.labelStyleObjectExtension = new ArrayList((getLabelStyleObjectExtension().size())); for (AbstractObject iter: labelStyleObjectExtension) { copy.labelStyleObjectExtension.add(iter.clone()); } return copy; } }