package com.hoya.games.sp;
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DecimalFormat;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.Timer;
public final class g extends JDialog
implements h, ActionListener
{
private static DecimalFormat d = new DecimalFormat("###,###,###,###.-");
static int a = 100;
Timer b;
private JPanel e;
private JPanel f;
private JButton g;
private JLabel h;
private JLabel i;
private GridBagLayout j;
Frame c;
private JLabel k;
private JLabel l;
private JLabel m;
public g(Frame paramFrame)
{
super(paramFrame, "", false);
this.b = new Timer(33, this);
this.e = new JPanel();
this.f = new JPanel();
this.g = new JButton();
this.h = new JLabel();
this.i = new JLabel();
this.j = new GridBagLayout();
this.k = new JLabel();
this.l = new JLabel();
this.m = new JLabel();
this.c = paramFrame;
try
{
a();
return;
}
catch (Exception localException2)
{
Exception localException1;
(localException1 = localException2).printStackTrace();
}
}
private void a()
throws Exception
{
Font localFont = new Font("Dialog", 0, 14);
setDefaultCloseOperation(0);
this.g.addActionListener(this);
this.g.setText("OK");
this.i.setForeground(Color.yellow);
this.h.setFont(localFont);
this.i.setFont(localFont);
this.k.setFont(localFont);
this.l.setFont(localFont);
this.m.setFont(localFont);
this.h.setForeground(Color.yellow);
this.h.setHorizontalAlignment(4);
this.h.setText("BONUS :");
this.i.setText((a / lx.aV) + "");
this.e.setLayout(this.j);
this.e.setBackground(Color.black);
this.f.setBackground(Color.black);
this.k.setForeground(Color.yellow);
this.l.setForeground(Color.yellow);
this.l.setHorizontalAlignment(4);
this.l.setText("Rp :");
this.m.setForeground(Color.yellow);
this.m.setText("0");
getContentPane().add(this.e, "Center");
getContentPane().add(this.f, "South");
this.f.add(this.g);
this.e.add(this.h, new GridBagConstraints(0, 0, 1, 1, 2.0D, 0D, 17, 2, new Insets(20, 10, 0, 5), 0, 0));
this.e.add(this.i, new GridBagConstraints(1, 0, 1, 1, 1D, 0D, 17, 2, new Insets(20, 0, 0, 20), 0, 0));
this.e.add(this.k, new GridBagConstraints(0, 1, 2, 1, 3.0D, 0D, 10, 2, new Insets(10, 20, 0, 20), 0, 0));
this.e.add(this.l, new GridBagConstraints(0, 2, 1, 1, 2.0D, 0D, 17, 2, new Insets(10, 10, 20, 5), 0, 0));
this.e.add(this.m, new GridBagConstraints(1, 2, 1, 1, 0D, 0D, 17, 0, new Insets(10, 0, 20, 5), 0, 0));
}
public final void a(String paramString, int paramInt)
{
this.h.setText("BONUS :");
this.k.setText(paramString);
a = paramInt;
this.i.setText((paramInt / lx.aV) + "");
this.m.setText(d.format(paramInt * 100));
pack();
xl.a(this, this.c);
setVisible(true);
}
public final void actionPerformed(ActionEvent paramActionEvent)
{
if (paramActionEvent.getSource().equals(this.g))
{
if (!(this.b.isRunning()))
{
lx.h("start-----");
this.b.start();
return;
}
this.b.stop();
if (a > 0)
{
lx.s += a;
a = 0;
j.f.repaint();
}
}
if (a > 13 * lx.aV)
{
a -= 13 * lx.aV;
lx.s += 13 * lx.aV;
j.f.repaint();
this.i.setText((a / lx.aV) + "");
return;
}
if (a > 0)
{
a -= 1;
lx.s += 1;
j.f.repaint();
this.i.setText((a / lx.aV) + "");
return;
}
this.b.stop();
((this.i.setText((a / lx.aV) + "")) ? this : this).setVisible(false);
}
}