dmolony-DiskBrowser/src/com/bytezone/diskbrowser/gui/RefreshTreeAction.java

40 lines
1.5 KiB
Java
Raw Permalink Normal View History

2020-02-08 22:20:08 +00:00
package com.bytezone.diskbrowser.gui;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import javax.swing.Action;
import javax.swing.KeyStroke;
2020-06-26 04:39:05 +00:00
import com.bytezone.diskbrowser.utilities.DefaultAction;
2020-02-08 22:20:08 +00:00
// -----------------------------------------------------------------------------------//
class RefreshTreeAction extends DefaultAction
// -----------------------------------------------------------------------------------//
{
CatalogPanel owner;
// ---------------------------------------------------------------------------------//
public RefreshTreeAction (CatalogPanel owner)
// ---------------------------------------------------------------------------------//
{
super ("Refresh current tree", "Makes newly added/modified disks available",
"/com/bytezone/diskbrowser/icons/");
// putValue (Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke ("alt R"));
putValue (Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke (KeyEvent.VK_F5, 0));
// putValue (Action.MNEMONIC_KEY, KeyEvent.VK_R);
putValue (Action.MNEMONIC_KEY, KeyEvent.VK_F5);
this.owner = owner;
setIcon (Action.SMALL_ICON, "arrow_refresh.png");
setIcon (Action.LARGE_ICON_KEY, "arrow_refresh_32.png");
}
// ---------------------------------------------------------------------------------//
@Override
public void actionPerformed (ActionEvent e)
// ---------------------------------------------------------------------------------//
{
owner.refreshTree ();
}
2015-06-01 09:35:51 +00:00
}