/*--------------------------------------------------------------------*/ /* PROJECT MAWAAQIT */ /* --------------------------------------------- */ /* Islamic Times Keeping for WWW Version 96.4 */ /*--------------------------------------------------------------------*/ /* SUBSYSTEM : Mawaaqit 96.4 for WWW Application */ /* FILE : prtimes.java */ /* AUTHOR : Ir. Khafid */ /* Company : 1. Institue of Astronomical and Physical Geosesy */ /* Technical University Munich, Germany */ /* Arcisstrasse 21 80290 Munich */ /* Phone : 089-21053184 Fax : 089-21053178 */ /* e-mail: khafid@force.iapg.verm.tu-muenchen.de */ /* 2. BAKOSURTANAL */ /* (Badan Koordinasi Survey dan Pemetaan Nasional)*/ /* National Coordination Agency for Surves Mapping*/ /* Jl. Raya Jakarta-Bogor Km. 46, Cibinong */ /* Bogor Indonesia. */ /* */ /* Written : 29 April 1996. */ /* ------------------------------------- */ /* */ /* OVERVIEW */ /* ======== */ /* Source file of Praying Times. */ /* Based on all the chosen inputs and parameters, the praying */ /* times are computed at any date, one month or one year. */ /* For one month and one year compuation the results will be */ /* displayed on a popup window which should be closed */ /* automatocally if a new computation will be done. */ /*--------------------------------------------------------------------*/ import java.awt.*; import java.applet.*; import java.util.*; import java.lang.*; public class prtimes extends prfunc { public void paint(Graphics gr) { Longitude= w.toDouble(CityLongitude.getText(),0); Latitude = w.toDouble(CityLatitude.getText(),0); TimeZone = w.toDouble(Timezone.getText(),1); Datum = w.getDate(inputDate.getText(),1); Month = w.getDate(inputDate.getText(),2); Year = w.getDate(inputDate.getText(),3); g.drawImage(BackGround,0,0,450,150,this); g.setColor(new Color(0,0,125)); g.fillRect(140,0,170,150); double jd = Value.JulianDatum(Year,Month,(double)Datum); DayDisplay.setText(" "+Name.Days[((int)(1+jd)%7)]); switch(Praying.getSelectedIndex()) { case 0 : if (window.isShowing()) window.hide(); OneDay(gr); break; case 1 : OneMonth(); break; case 2 : OneYear(); break; default: break; } gr.drawImage(offscreenImg,0,0,this); } } class myframe extends Frame { TextArea Results = new TextArea(); myframe(String title, String Texts, Color bgColor, Color frColor) { super(title); setBackground(bgColor); setForeground(frColor); setFont(new Font("Courier",Font.BOLD,11)); setLayout(new GridLayout(1,1)); add(Results); Results.insertText(Texts,0); } }