📄 paper.jad
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 17/3/2005 12:40:48
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: Paper.java
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.io.PrintStream;
import java.util.*;
import javax.sound.sampled.*;
import javax.swing.*;
class Paper extends JDialog
{
public Paper(String s, Frame frame, boolean flag, Point point, Color color1)
{
super(frame);
f = frame;
content = s;
color = color1;
setUndecorated(true);
(new EasyMove()).install(this);
area = new JTextArea(s);
area.setOpaque(false);
area.setEditable(false);
area.setBackground(color1);
Container container = getContentPane();
container.setBackground(color1);
if(color1.getRGB() == yellow.getRGB())
icon = new ImageIcon(getClass().getResource("images/4MYellow.jpg"));
else
icon = new ImageIcon(getClass().getResource("images/4MPink.jpg"));
container.add(area);
JLabel jlabel = new JLabel(icon);
container.add(jlabel, "North");
if(point == null)
{
Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
int i = (int)(dimension.getWidth() / 4D + (Math.random() * dimension.getWidth()) / 3D);
int j = (int)(dimension.getHeight() / 4D + (Math.random() * dimension.getHeight()) / 3D);
point = new Point(i, j);
}
setLocation(point);
pack();
if(flag)
show();
addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent mouseevent)
{
PostIt postit = (PostIt)getOwner();
DefaultListModel defaultlistmodel = postit.getListModel();
int k = defaultlistmodel.indexOf(Paper.this);
if(k != -1)
postit.setIndex(k);
}
});
}
public void editContent(String s)
{
content = s;
area.setText(s);
pack();
}
public String toString()
{
return content;
}
public void setTime(Date date1)
{
if(date1 == null)
return;
date = date1;
if(timer != null)
timer.cancel();
timer = new Timer(true);
timer.schedule(new TimerTask() {
public void run()
{
toFront();
JTextArea jtextarea = new JTextArea(area.getText());
jtextarea.setBackground(area.getBackground());
jtextarea.setEditable(false);
Paper.clip.setFramePosition(0);
Paper.clip.start();
JOptionPane.showMessageDialog(null, jtextarea, "ATTENTION!", 1);
date = null;
timer = null;
Paper.clip.stop();
}
}, date1);
}
public Color getColor()
{
return color;
}
public Date getDate()
{
return date;
}
static Class _mthclass$(String s)
{
return Class.forName(s);
ClassNotFoundException classnotfoundexception;
classnotfoundexception;
throw new NoClassDefFoundError(classnotfoundexception.getMessage());
}
private String content;
private JTextArea area;
private ImageIcon icon;
private Timer timer;
private Date date;
private Frame f;
private Color color;
private final Color yellow = new Color(255, 255, 150);
private final Color pink = new Color(255, 192, 192);
static Clip clip;
static
{
if(clip == null)
{
Object obj = null;
try
{
java.net.URL url = ClassLoader.getSystemResource("sounds/Notify.wav");
AudioInputStream audioinputstream = AudioSystem.getAudioInputStream(url);
javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax.sound.sampled.Clip.class, audioinputstream.getFormat());
clip = (Clip)AudioSystem.getLine(info);
clip.open(audioinputstream);
}
catch(IOException ioexception)
{
System.out.println("I don't care~");
}
catch(UnsupportedAudioFileException unsupportedaudiofileexception)
{
System.out.println("I don't care~");
}
catch(LineUnavailableException lineunavailableexception)
{
System.out.println("I don't care~");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -