Class HtmlTrainCommon

    • Constructor Detail

      • HtmlTrainCommon

        public HtmlTrainCommon​(java.util.Locale locale,
                               Train train)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • pickupUtilityCars

        public java.lang.String pickupUtilityCars​(java.util.List<Car> cars,
                                                  Car car,
                                                  boolean isManifest)
      • setoutUtilityCars

        protected java.lang.String setoutUtilityCars​(java.util.List<Car> cars,
                                                     Car car,
                                                     boolean isManifest)
      • pickUpCar

        protected java.lang.String pickUpCar​(Car car,
                                             java.lang.String[] format)
      • pickUpCar

        protected java.lang.String pickUpCar​(Car car,
                                             int count,
                                             java.lang.String[] format)
      • dropCar

        protected java.lang.String dropCar​(Car car,
                                           java.lang.String[] format,
                                           boolean isLocal)
      • dropCar

        protected java.lang.String dropCar​(Car car,
                                           int count,
                                           java.lang.String[] format,
                                           boolean isLocal)
      • dropEngine

        public java.lang.String dropEngine​(Engine engine)
        Description copied from class: TrainCommon
        Returns the drop string for a loco. Useful for frames like the train conductor and yardmaster.
        Overrides:
        dropEngine in class TrainCommon
        Parameters:
        engine - The Engine.
        Returns:
        engine drop string
      • pickupEngine

        public java.lang.String pickupEngine​(Engine engine)
        Description copied from class: TrainCommon
        Returns the pick up string for a loco. Useful for frames like the train conductor and yardmaster.
        Overrides:
        pickupEngine in class TrainCommon
        Parameters:
        engine - The Engine.
        Returns:
        engine pick up string
      • getCarAttribute

        protected java.lang.String getCarAttribute​(Car car,
                                                   java.lang.String attribute,
                                                   boolean isPickup,
                                                   boolean isLocal)
      • getEngineAttribute

        protected java.lang.String getEngineAttribute​(Engine engine,
                                                      java.lang.String attribute,
                                                      boolean isPickup)
      • convertToHTMLColor

        public static java.lang.String convertToHTMLColor​(java.lang.String text)
        Parameters:
        text - Text with color tags needing conversion. See TrainCommon.formatColorString(String text, Color color) Also converts line feeds to HTLM
        Returns:
        HTML text with style color option