package jas2.swingstudio;
import jas2.util.*;
import java.util.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.Frame;
import java.awt.Component;
import jas2.hist.*;

public class RecentJobsMenu extends RecentItemsMenu
{
	public RecentJobsMenu() {
		super(length_Key);
	}
	public void addNotify() {
		super.addNotify();
		setEnabled(m_app.getLastJobs());
	}
	protected void itemSelected(String job)
	{
		m_app.openJob(new File(job));
	}
	protected String toDisplayFormat(String s)
	{
		if (! m_prop.getBoolean(includePath_Key, true))
		{
			int j;
			j = s.lastIndexOf(File.separator);
			if (j >= 0)
				return s.substring(j + 1, s.length());
		}
		return s;
	}
	private final JavaAnalysisStudio m_app = JavaAnalysisStudio.getApp();
	private final UserProperties m_prop = m_app.getUserProperties();
	static final String length_Key = "MaxJobsListLength";
	static final String includePath_Key = "InclPath-Jobs";
}

 

Ads help maintain this website.