/*
* Swing Explorer. Tool for developers exploring Java/Swing-based application internals.
* Copyright (C) 2008, Maxim Zakharenkov
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* $Header: /cvs/swingexplorer/src/org/swingexplorer/RichAction.java,v 1.3 2008/03/07 11:46:50 maxz1 Exp $
*/
package org.swingexplorer;
import java.awt.Image;
import java.awt.Toolkit;
import java.net.URL;
import javax.swing.AbstractAction;
import javax.swing.Icon;
import javax.swing.ImageIcon;
/**
*
* @author Maxim Zakharenkov
*/
public abstract class RichAction extends AbstractAction {
protected Launcher application;
public void setName(String name) {
putValue(NAME, name);
}
public void setTooltip(String tooltip) {
putValue(SHORT_DESCRIPTION, tooltip);
}
public void setIcon(Icon ico) {
putValue(SMALL_ICON, ico);
}
public void setIcon(String iconResource) {
setIcon(GuiUtils.getImageIcon(Icons.BASE_PATH + iconResource));
}
public void setApplication(Launcher app) {
application = app;
}
public Launcher getApplication() {
return application;
}
}
/*
* $Log: RichAction.java,v $
* Revision 1.3 2008/03/07 11:46:50 maxz1
* Added thread violation monitor and EDT hang monitor. Changed L & F.
*
* Revision 1.2 2008/02/06 08:36:08 maxz1
* Changed license header
*
* Revision 1.1 2007/06/27 19:41:37 maxz1
* new
*
*/
|