cds.aladin
Class Obj

java.lang.Object
  extended by cds.aladin.Obj
Direct Known Subclasses:
Position

public abstract class Obj
extends java.lang.Object

Interface pour la manipulation d'un objet graphique affichable dans la vue

Version:
2.0 : (nov 06) Compatibilité pour Plugins, 1.0 : (5 mai 99) Toilettage du code, 0.9 : (??) creation
Author:
Pierre Fernique [CDS]

Field Summary
static int CIRCLE
           
static int CIRCLES
           
static int CROSS
           
 double dej
          J2000 DEC coordinate
static int DOT
           
 java.lang.String id
           
static int OVAL
           
static int PLUS
           
static int POINT
           
 double raj
          J2000 RA coordinate
static int RHOMB
           
static int SQUARE
           
static int TRIANGLE
           
 
Constructor Summary
Obj()
           
 
Method Summary
 double getDistance(Obj obj)
          Tool : Return the distance in degrees between this object and another
 java.lang.String[] getNames()
          Return the names associated to the columns (Source object)
 java.lang.String getObjType()
          Return the object type
 double getRadius()
          Retourne la taille angulaire du repère en arcmin (pour le moment en pixel)
 java.lang.String getSexa()
          Return the position in J2000 sexagesimal coord
 int getSize()
          Return the number of columns (Source object)
 java.lang.String[] getUCDs()
          Return the UCDs associated to the columns (Source object)
 java.lang.String[] getUnits()
          Return the units associated to the columns (Source object)
 java.lang.String[] getValues()
          Return the values associated to the object (Source object)
 int indexOf(java.lang.String key)
          Return the index of a column (Source object).
 boolean isSelected()
          Retourne true si la source a le flag sélect positionné
 void setColumn(int index, java.lang.String name, java.lang.String unit, java.lang.String ucd, int width)
          Set metadata for a specifical column (name, unit, ucd, display width).
 void setSelected(boolean flag)
          Select or unselect the object
 void setShape(int shape)
          Set the drawing shape (dedicated for catalog sources)
 boolean setValue(int index, java.lang.String value)
          Set a new value for a specifical column index For a new column, creates it before via the selColumn() method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OVAL

public static final int OVAL
See Also:
Constant Field Values

SQUARE

public static final int SQUARE
See Also:
Constant Field Values

CIRCLE

public static final int CIRCLE
See Also:
Constant Field Values

RHOMB

public static final int RHOMB
See Also:
Constant Field Values

CROSS

public static final int CROSS
See Also:
Constant Field Values

TRIANGLE

public static final int TRIANGLE
See Also:
Constant Field Values

PLUS

public static final int PLUS
See Also:
Constant Field Values

CIRCLES

public static final int CIRCLES
See Also:
Constant Field Values

POINT

public static final int POINT
See Also:
Constant Field Values

DOT

public static final int DOT
See Also:
Constant Field Values

raj

public double raj
J2000 RA coordinate


dej

public double dej
J2000 DEC coordinate


id

public java.lang.String id
Constructor Detail

Obj

public Obj()
Method Detail

isSelected

public final boolean isSelected()
Retourne true si la source a le flag sélect positionné


getRadius

public double getRadius()
Retourne la taille angulaire du repère en arcmin (pour le moment en pixel)


getDistance

public double getDistance(Obj obj)
Tool : Return the distance in degrees between this object and another


getValues

public java.lang.String[] getValues()
Return the values associated to the object (Source object)

Returns:
String array containing each field value

getNames

public java.lang.String[] getNames()
Return the names associated to the columns (Source object)

Returns:
String array containing each names

getUnits

public java.lang.String[] getUnits()
Return the units associated to the columns (Source object)

Returns:
String array containing each unit

getUCDs

public java.lang.String[] getUCDs()
Return the UCDs associated to the columns (Source object)

Returns:
String array containing each unit

getSize

public int getSize()
Return the number of columns (Source object)


indexOf

public int indexOf(java.lang.String key)
Return the index of a column (Source object). Proceed in 2 steps, Look into the column name, if there is no match, look into the ucd. If nothing match, return -1. The string key can use wilcards (* and ?).

Parameters:
key - name or ucd to find
Returns:
index of first column matching the key

setColumn

public void setColumn(int index,
                      java.lang.String name,
                      java.lang.String unit,
                      java.lang.String ucd,
                      int width)
Set metadata for a specifical column (name, unit, ucd, display width). null or <0 values are not modified. If the index is greater than the number of columns, the additionnal columns are automatically created

Parameters:
index - number of column (0 is the first one)
name - new name or null for no modification
unit - new unit or null
ucd - new ucd or null
width - new width or -1. 0 to use the default display width.

setValue

public boolean setValue(int index,
                        java.lang.String value)
Set a new value for a specifical column index For a new column, creates it before via the selColumn() method

Parameters:
index - column index (0 is the first column)
value - new value for this column
Returns:
true ok, false otherwise

setShape

public void setShape(int shape)
Set the drawing shape (dedicated for catalog sources)

Parameters:
sourceType - Obj.OVAL, SQUARE, CIRCLE, RHOMB, PLUS, CROSS, TRIANGLE, CIRCLES, POINT, DOT

getObjType

public java.lang.String getObjType()
Return the object type


getSexa

public java.lang.String getSexa()
Return the position in J2000 sexagesimal coord


setSelected

public void setSelected(boolean flag)
Select or unselect the object

Parameters:
flag -


Copyright © 2009 UDS/CNRS