All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lrgs.rtstat.RtStatPanel Maven / Gradle / Ivy

Go to download

A collection of software for aggregatting and processing environmental data such as from NOAA GOES satellites.

The newest version!
package lrgs.rtstat;

import java.io.*;
import java.net.*;

import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.text.html.*;
import javax.swing.text.DefaultCaret;

import ilex.util.EnvExpander;
import org.slf4j.LoggerFactory;

/**
This is the HTML panel in which the status snapshot is displayed.
*/
public class RtStatPanel
	extends JPanel
{
	private final static org.slf4j.Logger log = LoggerFactory.getLogger(RtStatPanel.class);
	BorderLayout borderLayout1 = new BorderLayout();
	TitledBorder titledBorder1;
	TitledBorder titledBorder2;
	JScrollPane scrollPane = new JScrollPane();
	JEditorPane htmlPanel = new JEditorPane();

	public RtStatPanel()
	{
		try
		{
			jbInit();
			htmlPanel.setDoubleBuffered(true);
		}
		catch (Exception ex)
		{
			log.error("Exception in RtStatPanel()",ex);
		}
		HTMLEditorKit hek = (HTMLEditorKit)htmlPanel.getEditorKit();
		HTMLDocument doc = (HTMLDocument)hek.createDefaultDocument();

		/*
	      Kludge to set the parsers document base so that it will be able
		  to find the icons sub directory.
		*/
		try 
		{ 
			String path = 
				EnvExpander.expand("$DECODES_INSTALL_DIR") + "/base.html";
			File base = new File(path);
			FileWriter fw = new FileWriter(base);
			fw.write("dummy lrgs status page\n");
			fw.close();

			StringBuffer sb = new StringBuffer("file://" + path);
			if (sb.charAt(7) != '/')
				sb.insert(7, '/');
			for(int i=7; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy