mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-20 04:29:02 +00:00
29 lines
764 B
Java
29 lines
764 B
Java
package com.bytezone.diskbrowser.gui;
|
|
|
|
import java.awt.event.ActionEvent;
|
|
import java.awt.event.KeyEvent;
|
|
|
|
import javax.swing.AbstractAction;
|
|
import javax.swing.Action;
|
|
import javax.swing.JMenuItem;
|
|
import javax.swing.KeyStroke;
|
|
|
|
public class ColourQuirksAction extends AbstractAction
|
|
{
|
|
private final DataPanel owner;
|
|
|
|
public ColourQuirksAction (DataPanel owner)
|
|
{
|
|
super ("Smear HGR");
|
|
putValue (Action.SHORT_DESCRIPTION, "Display pixels like a TV screen");
|
|
putValue (Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke ("alt Q"));
|
|
putValue (Action.MNEMONIC_KEY, KeyEvent.VK_Q);
|
|
this.owner = owner;
|
|
}
|
|
|
|
@Override
|
|
public void actionPerformed (ActionEvent e)
|
|
{
|
|
owner.setColourQuirks (((JMenuItem) e.getSource ()).isSelected ());
|
|
}
|
|
} |