/* ----------------------------------------
 * Origin  : GFI INFORMATIQUE 
 * Project : CDPP Propagation Tool 
 * ----------------------------------------
 * History 
 * Version : V2.12
 * DM-ID : Redmine#10626 : 04/04/2025 : Speed profile Chart
 * ----------------------------------------
 */
package fr.tlse.irap.pt.client.controller.tools.radial;


import fr.tlse.irap.pt.client.component.DialogComponent;
import fr.tlse.irap.pt.client.controller.RootController;
import fr.tlse.irap.tool.radial.Radial;

public class SpeedChartDialogBox {

    private static SpeedChartComponent spcController;

    public static SpeedChartComponent getSpeedChartComponent() {
        if (spcController == null) {
            spcController = new SpeedChartComponent();
            new DialogComponent(spcController, RootController.stage, "Speed chart");
        }
        spcController.getDialog().toFront();
        return spcController;
    }

    /**
     * Show Speed chart interface initialized with date
     *
     * @param pRadial
     */
    public static void show(Radial pRsec) {
        getSpeedChartComponent().initComponentWith(pRsec );
    }

}
