Last change
on this file since 994 was 994, checked in by davidb, 8 years ago |
Added new Java classes for widgets
|
File size:
804 bytes
|
Line | |
---|
1 | package org.expeditee.items.widgets;
|
---|
2 |
|
---|
3 | import java.awt.event.ActionEvent;
|
---|
4 | import java.awt.event.ActionListener;
|
---|
5 | import java.io.File;
|
---|
6 | import java.net.URL;
|
---|
7 |
|
---|
8 | import org.expeditee.gui.DisplayIO;
|
---|
9 | import org.expeditee.items.Text;
|
---|
10 |
|
---|
11 | //Creates a button that when pressed, restores the previous action
|
---|
12 | public class Undo extends ButtonWidget{
|
---|
13 |
|
---|
14 | public Undo(Text source, String[] args){
|
---|
15 |
|
---|
16 | super(120, "org/expeditee/assets/images/undo.svg", source, args);
|
---|
17 |
|
---|
18 | clicked.addActionListener(new ActionListener() {
|
---|
19 | public void actionPerformed(ActionEvent e) {
|
---|
20 |
|
---|
21 | DisplayIO.getCurrentFrame().undo();
|
---|
22 | }
|
---|
23 | });
|
---|
24 | }
|
---|
25 |
|
---|
26 | @Override
|
---|
27 | protected String[] getArgs() {
|
---|
28 | // TODO Auto-generated method stub
|
---|
29 | return null;
|
---|
30 | }
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.