Site hosted by Angelfire.com: Build your free website today!

import java.applet.*; import java.awt.*; import java.util.*; public class datahora extends Applet implements Runnable { Thread linha = null; boolean vivo = true; GregorianCalendar cal = null; Image buffImg = null; Font F = null, G = null; FontMetrics fF = null, fG = null; Date data = null; Color corFG = Color.white, corBG = Color.red, corBorda = Color.red; Dimension d; String mes[] = {"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"}; String diaSem[] = {"", "Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"}; String hoje = null, segundos = null, minutos = null, horas = null; boolean msg = true, borda = true; int sec = 0, min = 0, hou = 0, mon = 0, day = 0, dom = 0, yea = 0; public void init() { try { corBG = new Color(Integer.parseInt( getParameter("corFundo"), 16)); } catch (Exception _ex) { } try { corFG = new Color(Integer.parseInt( getParameter("corFonte"), 16)); } catch (Exception _ex) { } String fNome = "TimesRoman", s = null; int fEstilo = 0; int fTam = 16; s = getParameter("fonteCal"); if (s != null) fNome = s; try { fEstilo = (int)Integer.parseInt( getParameter("estiloCal")); } catch (Exception _ex) { } try { fTam = (int)Integer.parseInt( getParameter("tamCal")); } catch (Exception _ex) { } F = new Font(fNome, fEstilo, fTam); fF = getFontMetrics(F); fNome = "TimesRoman; fEstilo = 0; fTam = 12; s = getParameter("fonteMsg"); if (s != null) fNome = s; try { fEstilo = Integer.parseInt( getParameter("estiloMsg")); } catch (Exception _ex) { } try { fTam = Integer.parseInt( getParameter("tamMsg")); } catch (Exception _ex) { } G = new Font(fNome, fEstilo, fTam); fG = getFontMetrics(G); fNome = getParameter("recado"); if (fNome != null) msg = fNome.equalsIgnoreCase("true"); fNome = getParameter("borda"); if (fNome != null) { borda = true; try { corBorda = new Color(Integer.parseInt( fNome, 16)); } catch(Exception _ex) { } } else borda = false; d = getSize(); resize(d.width, d.height); cal = new GregorianCalendar( ); buffImg = createImage(d.width, d.height); } public void start() { if (linha == null) { linha = new Thread(this); linha.start(); } vivo = linha.isAlive( ); } public void run() { while (vivo) { Graphics g1 = buffImg.getGraphics; data = new Date( ); cal.setTime(data); sec = cal.get(Calendar.SECOND); min = cal.get(Calendar.MINUTE); hou = cal.get(Calendar.HOUR_OF_DAY); mon = cal.get(Calendar.MONTH); day = cal.get(Calendar.DAY_OF_WEEK); dom = cal.get(Calendar.DAY_OF_MONTH); yea = cal.get(Calendar.YEAR); if (sec < 10) segundos = "0" + sec; else segundos = String.valueOf(sec); if (min < 10) minutos = "0" + min; else minutos = String.valueOf(min); if (borda) { g1.setColor(corBorda); g1.fillRect(0, 0, d.width, d.height); g1.setColor(corBG); g1.fillRect(1, 1, d.width - 2, d.height - 2); } else { g1.setColor(corBG); g1.fillRect(0, 0, d.width, d.height); } g1.setColor(corFG); g1.setFont(F); hoje = diaSem[day] + ", " + dom + " de " + mes[mon] + " de " + yea + " " + hou + ":" + minutos + ":" + segundos; g1.drawString(hoje, (d.width - fF.stringWidth(hoje)) / 2, 32); g1.setFont(G); if (msg) { int i = hou; if (i == 0) i = 24; String s = "Olá, "; if (hou > 6 && hou < 12) s += "bom dia !"; if (hou >= 12 && hou < 20) s += "boa tarde !"; if (hou >= 20 && i < 24) s += "boa noite !"; if (hou > 0 && hou < 6) s += "bela madrugada !"; } repaint( ); try { linha.sleep(1000L); catch(InterruptedException _ex) { } } } public void update(Graphics g) { paint(g); } public void paint(Graphics g) { g.drawImage(buffImg, 0, 0, null); } public boolean mouseEnter(Event evt, int xx, int yy) { getAppletContext( ).showStatus( "Data e Hora © sobMedida by vickiSoft"); return true; } public boolean mouseExit(Event evt, int xx, int yy) { getAppletContext( ).showStatus(""); return true; } public void stop() { vivo = false; } } // fim da classe

1° Churrascão de Administração - Casa da Viviane (Vivi, para os íntimos) 15/05/04

2004_0515Image0022.jpg (461232 bytes)2004_0515Image0002.jpg (496047 bytes)2004_0515Image0003.jpg (507731 bytes)2004_0515Image0004.jpg (489241 bytes)2004_0515Image0005.jpg (501763 bytes)2004_0515Image0009.jpg (484188 bytes)2004_0515Image0010.jpg (485153 bytes)2004_0515Image0011.jpg (491035 bytes)2004_0515Image0012.jpg (485381 bytes)2004_0515Image0013.jpg (480585 bytes)2004_0515Image0014.jpg (492112 bytes)2004_0515Image0015.jpg (478556 bytes)2004_0515Image0016.jpg (460919 bytes)2004_0515Image0017.jpg (456083 bytes)2004_0515Image0018.jpg (475019 bytes)2004_0515Image0020.jpg (475740 bytes)2004_0515Image0021.jpg (473403 bytes)2004_0515Image0001.jpg (480683 bytes)