Class DdCoordinate

java.lang.Object
org.jdesktop.beans.AbstractBean
org.jdesktop.beans.AbstractSerializableBean
org.nuiton.jaxx.widgets.gis.DdCoordinate
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbsoluteDdCoordinateEditorModel, SignedDdCoordinateEditorModel

public class DdCoordinate
extends org.jdesktop.beans.AbstractSerializableBean
Created on 9/2/14.
Since:
2.12
Author:
Tony Chemit - chemit@codelutin.com
See Also:
Serialized Form
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.util.regex.Pattern COORDINATE_PATTERN  
    static java.lang.String COORDINATE_STRING_PATTERN  
    protected java.lang.Integer decimal  
    protected java.lang.Integer degree  
    static java.lang.String PROPERTY_DECIMAL  
    static java.lang.String PROPERTY_DEGREE  
    static java.lang.String PROPERTY_SIGN  
    protected boolean sign  
  • Constructor Summary

    Constructors
    Constructor Description
    DdCoordinate()  
  • Method Summary

    Modifier and Type Method Description
    void addTrailingZero()  
    static DdCoordinate empty()  
    void fromDecimal​(java.lang.Float decimalValue)
    Mets a jour les composants de la position a partir d'une valeur decimal.
    java.lang.Integer getDecimal()  
    java.lang.Integer getDegree()  
    int getNotNullDecimal()  
    int getNotNullDegree()  
    java.lang.Integer getSignedDegree()  
    boolean isDecimalNull()  
    boolean isDecimalValid()  
    boolean isDegreeNull()  
    protected boolean isDegreeValid​(boolean longitude)  
    boolean isLatitudeDegreeValid()  
    boolean isLongitudeDegreeValid()  
    boolean isNull()  
    boolean isSign()  
    void removeTrailingZero()  
    void reset()  
    void setDecimal​(java.lang.Integer decimal)  
    void setDegree​(java.lang.Integer degree)  
    void setSign​(boolean sign)  
    java.lang.Float toDecimal()  
    java.lang.String toString()  
    static DdCoordinate valueOf​(boolean sign, java.lang.Integer d, java.lang.Integer dc)
    Methode statique de fabrique de position a partir d'une valeur du format degre décimale.
    static DdCoordinate valueOf​(java.lang.Float decimal)
    Methode statique de fabrique de position a partir d'une valeur du format decimal.
    static DdCoordinate valueOf​(DdCoordinate decimal)
    Methode statique de fabrique de position a partir d'un autre DdCoordinate.

    Methods inherited from class org.jdesktop.beans.AbstractBean

    addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • COORDINATE_STRING_PATTERN

      public static final java.lang.String COORDINATE_STRING_PATTERN
      See Also:
      Constant Field Values
    • COORDINATE_PATTERN

      public static final java.util.regex.Pattern COORDINATE_PATTERN
    • PROPERTY_SIGN

      public static final java.lang.String PROPERTY_SIGN
      See Also:
      Constant Field Values
    • PROPERTY_DEGREE

      public static final java.lang.String PROPERTY_DEGREE
      See Also:
      Constant Field Values
    • PROPERTY_DECIMAL

      public static final java.lang.String PROPERTY_DECIMAL
      See Also:
      Constant Field Values
    • sign

      protected boolean sign
    • degree

      protected java.lang.Integer degree
    • decimal

      protected java.lang.Integer decimal
  • Constructor Details

    • DdCoordinate

      public DdCoordinate()
  • Method Details

    • empty

      public static DdCoordinate empty()
    • valueOf

      public static DdCoordinate valueOf​(DdCoordinate decimal)
      Methode statique de fabrique de position a partir d'un autre DdCoordinate. Note : Si la valeur vaut null, alors on reinitialise les composants de la position a null et la methode isNull() vaudra alors true.
      Parameters:
      decimal - la valeur au format decimal
      Returns:
      une nouvelle instance de position convertie
    • valueOf

      public static DdCoordinate valueOf​(java.lang.Float decimal)
      Methode statique de fabrique de position a partir d'une valeur du format decimal. Note : Si la valeur (au format decimal) vaut null, alors on reinitialise les composants de la position a null et la methode isNull() vaudra alors true.
      Parameters:
      decimal - la valeur au format decimal
      Returns:
      une nouvelle instance de position convertie
    • valueOf

      public static DdCoordinate valueOf​(boolean sign, java.lang.Integer d, java.lang.Integer dc)
      Methode statique de fabrique de position a partir d'une valeur du format degre décimale.
      Parameters:
      d - la valeur des degres
      dc - la valeur des décimales de minutes
      Returns:
      une nouvelle instance de position convertie
    • isSign

      public boolean isSign()
    • getDegree

      public java.lang.Integer getDegree()
    • getDecimal

      public java.lang.Integer getDecimal()
    • setSign

      public void setSign​(boolean sign)
    • setDegree

      public void setDegree​(java.lang.Integer degree)
    • setDecimal

      public void setDecimal​(java.lang.Integer decimal)
    • isNull

      public boolean isNull()
      Returns:
      true si aucune composante n'est renseignée, false autrement.
    • isDegreeNull

      public boolean isDegreeNull()
    • isDecimalNull

      public boolean isDecimalNull()
    • fromDecimal

      public void fromDecimal​(java.lang.Float decimalValue)
      Mets a jour les composants de la position a partir d'une valeur decimal. Note : Si la valeur (au format decimal) vaut null, alors on reinitialise les composants de la position a null et la methode isNull() vaudra alors true.
      Parameters:
      decimalValue - la valeur decimale a convertir (qui peut etre nulle).
    • toDecimal

      public java.lang.Float toDecimal()
    • addTrailingZero

      public void addTrailingZero()
    • removeTrailingZero

      public void removeTrailingZero()
    • getSignedDegree

      public java.lang.Integer getSignedDegree()
    • getNotNullDegree

      public int getNotNullDegree()
    • getNotNullDecimal

      public int getNotNullDecimal()
    • isLatitudeDegreeValid

      public boolean isLatitudeDegreeValid()
    • isLongitudeDegreeValid

      public boolean isLongitudeDegreeValid()
    • isDecimalValid

      public boolean isDecimalValid()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • reset

      public void reset()
    • isDegreeValid

      protected boolean isDegreeValid​(boolean longitude)