Click here to Skip to main content
15,893,564 members
Articles / Programming Languages / Java / Java SE

Free "tail -f" Tool for all Platforms: Tail for Windows, Tail for Linux and Tail for Mac

Rate me:
Please Sign up or sign in to vote.
2.08/5 (8 votes)
19 Jul 2006CPOL3 min read 56K   1.1K   24  
MakeLogic Tail is a freeware similar to " tail -f " of Linux. It is Tail for Windows, Tail for Linux and Tail for Mac
/******************************************************************************
 
Copyright (C) 2006  MakeLogic

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA


Date		: 14th December 2005
Authors		: MakeLogic

Design		: Ujjwal
Developer	: Dharma

********************************************************************************/

package com.makeLogic.utils;


import java.awt.Container;
import java.awt.Component;

import java.beans.PropertyVetoException;

import java.io.FileNotFoundException;
import java.io.IOException;

import java.io.File;
import java.io.DataOutputStream;
import java.io.FileOutputStream;

import java.util.Hashtable;
import java.util.Vector;

import javax.swing.JEditorPane;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JViewport;

import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;

import com.makeLogic.TailInternalFrame;

import com.makeLogic.utils.MLInternalFrame;
import com.makeLogic.utils.FileMenu;

/**
 * This Class contains all the methods which are necessary 
 * to execute when the closing event of the JInternalFrame(file) fires.<br>
 * It takes care of saving the file if it is not saved , etc,,.
 * 
 */

public class InternalFrameClosingHandler extends InternalFrameAdapter
{
	//..Declarations
	Container container;
	Hashtable internalFramesOpenFileNames;
	MLInternalFrame internalFrame;

	//.. constructer for InternalFrameClosing Handler

	public InternalFrameClosingHandler()
	{
		Trace.enter("InternalFrameClosingHandler.InternalFrameClosingHandler");
		Trace.exit("InternalFrameClosingHandler.InternalFrameClosingHandler");
	}

	public InternalFrameClosingHandler(Container container, Hashtable internalFramesOpenFileNames, MLInternalFrame internalFrame)
	 {

		Trace.enter("InternalFrameClosingHandler.InternalFrameClosingHandler");
		
		//..container
			this.container = container;
		//..Hashtable
			this.internalFramesOpenFileNames = internalFramesOpenFileNames;
		//..MLInternalFrame
			this.internalFrame = internalFrame;

		Trace.exit("InternalFrameClosingHandler.InternalFrameClosingHandler");
	 }

	public void internalFrameClosing(InternalFrameEvent e)
	{

		Trace.enter("InternalFrameClosingHandler.internalFrameClosing");
		
		//...Create a method that writes information into the conf file
		//...Call that method from here

		//..updates the conf File
		FileMenu.updateConfFile();

		//..now update the RecentFilesMenuToo
		FileMenu.updateRecentFilesMenu(FileMenu.recentFilesMenuItem);

		//..Decrease the no of closed windows by 1
		TailInternalFrame.openFrameCount--;

		Trace.exit("InternalFrameClosingHandler.internalFrameClosing");

	}//..InternalFrameClosing method ends here

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
India India
Founder of MakeLogic - A Mobile Solutions and XML Web Services Company. B-Tech engineer from India's reputed IITs.

Designed and Authored products like MicroGraphs, MakeLogic VersionManager and MakeLogic Device Broker. Pls see http://www.makelogic.com

MakeLogic is a strategic business partner of Microsoft, Sun, IBM, HP and Citrix.

Contact : madanuuk@makelogic.com OR +91 - 40 - 55322433

Comments and Discussions