to.tetramorph.starbase.lib
クラス Caption

java.lang.Object
  上位を拡張 to.tetramorph.starbase.lib.Caption

public class Caption
extends Object

WardBalloonで表示する天体やアスペクトの短い説明文を、AspectやBodyオブジェクト などから生成するstaticメソッド群。


メソッドの概要
static String getAspectCaption(Aspect a)
          シングルチャートにおけるアスペクトの説明文を返す。
static String getAspectCaption(Aspect a, String[] groups)
          NPT三重円におけるアスペクトの説明文を返す。
static String getAspectSymbolCaption(Aspect a)
          アスペクトシンボルの名前と角度を返す。
static String getAspectSymbolCaption(int aid)
          アスペクトシンボルの名前と角度を返す。
static String getBodyCaption(Body b)
          シングルチャートにおける天体の内容の説明文(日本語)を返す。
static String getBodyCaption(Body b, String[] groups)
          NPT三重円における天体の説明文を返す。
static String getSabianCaption(Body p, int lang)
          吹き出し用にHTML書式のサビアンメッセージを返す。
static String getSabianCaption(Body p, int lang, String[] groups)
          吹き出し用にHTML書式のサビアンメッセージを返す。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

getAspectCaption

public static String getAspectCaption(Aspect a)
シングルチャートにおけるアスペクトの説明文を返す。グループ名はつかない。 サンプル → " 火星−太陽 (60゚)誤差 2゚"


getAspectCaption

public static String getAspectCaption(Aspect a,
                                      String[] groups)
NPT三重円におけるアスペクトの説明文を返す。 引数aが火星と太陽のスクエアのアスペクトを表していて、また火星のgroupは0、 太陽のgroupは2でアスペクトの誤差が2.86で、引数groups[]が { "N","P","T" } のときのサンプル → " N火星−T太陽 スクエア(90゚)誤差 2゚"。

パラメータ:
a - アスペクトオブジェクト
groups - 各天体のグループ名を格納した配列。nullの場合、グループ名は 除外される。

getAspectSymbolCaption

public static String getAspectSymbolCaption(int aid)
アスペクトシンボルの名前と角度を返す。 "コンジャクション (0゚)"等

パラメータ:
aid - Constで定義されるアスペクトID

getAspectSymbolCaption

public static String getAspectSymbolCaption(Aspect a)
アスペクトシンボルの名前と角度を返す。アラビックパーツ用。 "コンジャンクション(0゚) 誤差 1゚"等。

パラメータ:
a - アスペクト

getBodyCaption

public static String getBodyCaption(Body b)
シングルチャートにおける天体の内容の説明文(日本語)を返す。 サンプル → "1室 火星 水瓶12.04 逆行"


getBodyCaption

public static String getBodyCaption(Body b,
                                    String[] groups)
NPT三重円における天体の説明文を返す。 天体IDが範囲外のとき、天体名は""とする。 サンプル → "1室 N火星 水瓶12.04 逆行"

パラメータ:
groups - {"N","P","T"}などを指定する。

getSabianCaption

public static String getSabianCaption(Body p,
                                      int lang,
                                      String[] groups)
吹き出し用にHTML書式のサビアンメッセージを返す。
星座名・度数が文頭につき、その後メッセージが続く。
英語モードのときは英語の星座名がつく。

パラメータ:
p - 天体位置が入っている感受点オブジェクト
lang - Sabian.JPまたはSabian.ENで日本語/英語の切替
groups - Body#groupに応じてN,P,T等の識別文字を配列で指定する。

getSabianCaption

public static String getSabianCaption(Body p,
                                      int lang)
吹き出し用にHTML書式のサビアンメッセージを返す。
星座名・度数が文頭につき、その後メッセージが続く。
英語モードのときは英語の星座名がつく。

パラメータ:
p - 天体位置が入っている感受点オブジェクト
lang - Sabian.JPまたはSabian.ENで日本語/英語の切替