cds.aladin
Class Source

java.lang.Object
  extended by cds.aladin.Obj
      extended by cds.aladin.Position
          extended by cds.aladin.Source
All Implemented Interfaces:
java.util.Comparator

public class Source
extends Position
implements java.util.Comparator

Objet graphique correspondant a une source d'un catalogue

Version:
1.0 : (5 mai 99) Toilettage du code, 0.9 : (??) creation
Author:
Pierre Fernique [CDS]

Field Summary
 
Fields inherited from class cds.aladin.Obj
CIRCLE, CIRCLES, CROSS, dej, DOT, id, OVAL, PLUS, POINT, raj, RHOMB, SQUARE, TRIANGLE
 
Method Summary
 int compare(java.lang.Object a1, java.lang.Object b1)
           
 java.lang.String[] getNames()
          Retourne la liste des noms de chaque valeur
 java.lang.String getObjType()
          Retourne le type d'objet
 int getSize()
          Return the number of columns associated to this object
 java.lang.String[] getUCDs()
          Retourne la liste des UCDs pour chaque valeur
 java.lang.String[] getUnits()
          Retourne la liste des unités de chaque valeur
 java.lang.String[] getValues()
          Retourne un tableau de chaines contenant les valeurs de chaque champ
 int indexOf(java.lang.String key)
          Return the index of a column (Source object).
 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 setColumn(int index, java.lang.String name, java.lang.String datatype, java.lang.String unit, java.lang.String ucd, int width)
           
 void setIdxFootprint(int idxFootprint)
           
 void setShape(int shape)
          Set the drawing shape
 boolean setValue(int index, java.lang.String value)
          Modify the value of the specifical column
 
Methods inherited from class cds.aladin.Obj
getDistance, getRadius, getSexa, isSelected, setSelected
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Method Detail

getObjType

public java.lang.String getObjType()
Retourne le type d'objet

Overrides:
getObjType in class Obj

getValues

public java.lang.String[] getValues()
Retourne un tableau de chaines contenant les valeurs de chaque champ

Overrides:
getValues in class Obj
Returns:
String array containing each field value

setValue

public boolean setValue(int index,
                        java.lang.String value)
Modify the value of the specifical column

Overrides:
setValue in class Obj
Parameters:
index - column index eventually greater than the current dimension
value - new value
Returns:
true ok, false otherwise

setShape

public void setShape(int shape)
Set the drawing shape

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

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 and all other sources using the same legende will be size fixed.

Overrides:
setColumn in class Obj
Parameters:
index - number of column (0 is the first one)
name - new name or null for no modification
datatype - new datatype 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.

setColumn

public void setColumn(int index,
                      java.lang.String name,
                      java.lang.String datatype,
                      java.lang.String unit,
                      java.lang.String ucd,
                      int width)

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 ?).

Overrides:
indexOf in class Obj
Parameters:
key - name or ucd to find
Returns:
index of first column matching the key

getSize

public int getSize()
Return the number of columns associated to this object

Overrides:
getSize in class Obj

getNames

public java.lang.String[] getNames()
Retourne la liste des noms de chaque valeur

Overrides:
getNames in class Obj
Returns:
String array containing each names

getUnits

public java.lang.String[] getUnits()
Retourne la liste des unités de chaque valeur

Overrides:
getUnits in class Obj
Returns:
String array containing each unit

getUCDs

public java.lang.String[] getUCDs()
Retourne la liste des UCDs pour chaque valeur

Overrides:
getUCDs in class Obj
Returns:
String array containing each unit

setIdxFootprint

public void setIdxFootprint(int idxFootprint)
Parameters:
idxFootprint - valeur à donner à l'index du footprint associé

compare

public int compare(java.lang.Object a1,
                   java.lang.Object b1)
Specified by:
compare in interface java.util.Comparator


Copyright © 2009 UDS/CNRS