Documentation of 'com.mhuss.AstroLib.DarkCal' Java class
DarkCal
com.mhuss.AstroLib

Class DarkCal



  • public class DarkCal
    extends java.lang.Object
    A command-line program to determine the darkest hours for a given location & month. This is meant to be an aid for planning your observing.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DarkCal(boolean html)
      Constructor (HTML switch only)
      DarkCal(java.io.PrintWriter pw, boolean html)
      Constructor (PrintWriter and HTML switch)
      DarkCal(java.io.PrintWriter pw, boolean html, boolean printable)
      Constructor (PrintWriter, HTML switch, and printable switch)
    • Constructor Detail

      • DarkCal

        public DarkCal(boolean html)
        Constructor (HTML switch only)
        Parameters:
        html - true to produce HTML formatted output, plain text otherwise
      • DarkCal

        public DarkCal(java.io.PrintWriter pw,
                       boolean html)
        Constructor (PrintWriter and HTML switch)
        Parameters:
        pw - java.io.PrintWriter instance to use for output
        html - true to produce HTML formatted output, plain text otherwise
      • DarkCal

        public DarkCal(java.io.PrintWriter pw,
                       boolean html,
                       boolean printable)
        Constructor (PrintWriter, HTML switch, and printable switch)
        Parameters:
        pw - java.io.PrintWriter instance to use for output
        html - true to produce HTML formatted output, plain text otherwise
        printable - true to produce HTML in a more printer-friendly format
    • Method Detail

      • setOptLink

        public void setOptLink(java.lang.String s)
        Set the optional return link URL. It only makes sense to use this function when the HTML output option is enabled.
        Parameters:
        s - The URL of the return link to insert into the HTML
      • printData

        public void printData(DarkCalData dcd)
        Print out the data
        Parameters:
        dcd - The DarkCalData instance to use
      • calcAndPrint

        public void calcAndPrint(DarkCalInput dci)
        Calculate the DarkCalData values and print them out.
        Parameters:
        dci - Month, year, and location to use
      • print

        public void print(DarkCalInput dci)
        Read the DarkCalData values and print them out.
        Parameters:
        dci - Month, year, and location to use
      • main

        public static void main(java.lang.String[] args)
        The main program entry point.

        usage: DarkCal <month> <year> [-d] [-h] [-t] [-u]
        -d = ignore daylight savings time
        -h = HTML table output
        -t = tab-delimited output
        -u = output time in UTC

        Notes:

        • This program requires a text configuration file called DarkCal.cfg. To produce a sample config file, with all possible options listed, run the program with no DarkCal.cfg file in the current directory or in C:\etc.
        • Command-line options override config file settings.
        • This program currently only supports the Gregorian calendar.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.