⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d.java

📁 microtik tool to vie another router in a network
💻 JAVA
字号:
package com.hoya.games.sp;

import com.hoya.client.f;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.PrintStream;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JToggleButton;
import javax.swing.JViewport;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;

public final class d extends JDialog
  implements ActionListener, MouseListener
{
  public static final Color a = new Color(230, 224, 190);
  B b;
  JPanel c;
  JPanel d;
  JScrollPane e;
  JLabel f;
  JButton g;
  JButton h;
  JButton i;
  ButtonGroup j;
  JToggleButton k;
  JToggleButton l;
  JToggleButton m;
  JToggleButton n;
  JToggleButton o;
  JToggleButton p;
  GridBagLayout q;
  JPanel r;
  GridLayout s;
  JTable t;
  public z[] u;
  public String[] v;
  public long[] w;
  public boolean z;
  public static int A = 5000;

  public d(Frame paramFrame)
  {
    super(paramFrame, "", true);
    this.b = new B(this);
    this.c = new JPanel();
    this.d = new JPanel();
    this.e = new JScrollPane();
    this.f = new JLabel();
    this.g = new JButton();
    this.h = new JButton();
    this.i = new JButton();
    this.j = new ButtonGroup();
    this.k = new JToggleButton();
    this.l = new JToggleButton();
    this.m = new JToggleButton();
    this.n = new JToggleButton();
    this.o = new JToggleButton();
    this.p = new JToggleButton();
    this.q = new GridBagLayout();
    this.r = new JPanel();
    this.s = new GridLayout();
    new GridLayout();
    this.t = new JTable();
    this.u = new z[6];
    this.v = new String[6];
    this.w = new long[6];
    this.z = false;
    try
    {
      b();
      return;
    }
    catch (Exception localException2)
    {
      Exception localException1;
      (localException1 = localException2).printStackTrace();
    }
  }

  public d()
  {
    this(null);
  }

  public final void actionPerformed(ActionEvent paramActionEvent)
  {
    lx.as = System.currentTimeMillis();
    a("set lastActionTime");
    if (paramActionEvent.getSource() == this.i)
    {
      dispose();
      return;
    }
    if (paramActionEvent.getSource() == this.g)
    {
      a(lx.j.d);
      return;
    }
    if (paramActionEvent.getSource() == this.n)
    {
      lx.j.d = 0;
      a(lx.j.d);
      return;
    }
    if (paramActionEvent.getSource() == this.o)
    {
      lx.j.d = 1;
      a(lx.j.d);
      return;
    }
    if (paramActionEvent.getSource() == this.k)
    {
      lx.j.d = 2;
      a(lx.j.d);
      return;
    }
    if (paramActionEvent.getSource() == this.l)
    {
      lx.j.d = 3;
      a(lx.j.d);
      return;
    }
    if (paramActionEvent.getSource() == this.m)
    {
      lx.j.d = 4;
      a(lx.j.d);
      return;
    }
    if (paramActionEvent.getSource() == this.h)
    {
      String str1;
      int i1 = this.t.getSelectedRow();
      TableModel localTableModel = this.t.getModel();
      int i2 = Integer.parseInt(str1 = (String)((o)this.t.getModel().getValueAt(i1, 0)).b);
      String str2 = ((o)localTableModel.getValueAt(i1, 1)).b.toString();
      if (lx.q <= 0)
      {
        this.f.setText("No deposit !");
      }
      else if ((str2 != null) && (str2.trim().length() != 0))
      {
        this.f.setText("Table is in use.");
      }
      else
      {
        v.a = true;
        j.g.repaint();
        this.g.setEnabled(false);
        this.h.setEnabled(false);
        String str3 = i2 + "";
        lx.ab = 14;
        if (lx.G != 0)
          str3 = str3 + "," + lx.G + "," + lx.ab;
        lx.G = 0;
        lx.aA.a(2111, str3);
      }
      int i3 = 0;
      this.w[0] = 0L;
    }
  }

  public final void a(int paramInt)
  {
    if ((!(lx.D)) && (lx.q + lx.s < 1000))
    {
      a();
      this.f.setText("Minimal deposit 1000c");
      return;
    }
    this.h.setEnabled(false);
    this.e.getViewport().remove(this.t);
    if (lx.aS == 2)
    {
      if ((paramInt >= 0) && (paramInt <= 5))
        break label82;
      return;
    }
    if ((paramInt < 0) || (paramInt > 3))
      return;
    if ((System.currentTimeMillis() - this.w[paramInt] < A) && (!(this.z)))
    {
      label82: a("buttonIndex:" + paramInt);
      a("time0:" + this.w[paramInt]);
      a("now  :" + System.currentTimeMillis());
      a("time:" + (System.currentTimeMillis() - this.w[paramInt] < A));
      a("---waitTlmUpdate:" + this.z);
      a(this.u[paramInt]);
      setTitle(this.v[paramInt]);
      return;
    }
    if ((System.currentTimeMillis() - this.w[paramInt] > A) && (!(this.z)))
    {
      this.z = true;
      lx.aA.a(2061, "" + (paramInt + 1));
    }
  }

  private void b()
    throws Exception
  {
    UIManager.put("Table.focusCellHighlightBorder", new EmptyBorder(1, 1, 1, 1));
    setSize(800, 625);
    this.h.setEnabled(false);
    this.g.setMnemonic('R');
    this.h.setMnemonic('S');
    this.i.setMnemonic('C');
    this.j.add(this.n);
    this.j.add(this.o);
    this.j.add(this.k);
    this.j.add(this.l);
    this.j.add(this.m);
    this.j.add(this.p);
    this.n.addActionListener(this);
    this.o.addActionListener(this);
    this.k.addActionListener(this);
    this.l.addActionListener(this);
    this.m.addActionListener(this);
    this.n.setText("10c");
    this.o.setText("25c");
    this.k.setText("x1");
    this.l.setText("x2");
    this.m.setText("x4");
    this.n.setMnemonic('0');
    this.o.setMnemonic('5');
    this.k.setMnemonic('1');
    this.l.setMnemonic('2');
    this.m.setMnemonic('4');
    this.p.setSelected(true);
    this.g.addActionListener(this);
    this.h.addActionListener(this);
    this.i.addActionListener(this);
    this.r.setLayout(this.s);
    this.r.setBackground(Color.lightGray);
    this.c.setLayout(new BorderLayout());
    getContentPane().add(this.c, "Center");
    this.c.add(this.e, "Center");
    this.e.getViewport().setBackground(a);
    this.f.setText(" ");
    this.g.setText("Refresh");
    this.h.setText("Select");
    this.i.setText("Cancel");
    this.d.setLayout(this.q);
    getContentPane().add(this.d, "South");
    this.r.add(this.f);
    this.d.add(this.n, new GridBagConstraints(1, 0, 1, 1, 0D, 0D, 17, 2, new Insets(0, 5, 5, 0), 0, 0));
    this.d.add(this.o, new GridBagConstraints(2, 0, 1, 1, 0D, 0D, 17, 2, new Insets(0, 5, 5, 0), 0, 0));
    this.d.add(this.k, new GridBagConstraints(3, 0, 1, 1, 0D, 0D, 17, 2, new Insets(0, 5, 5, 0), 0, 0));
    this.d.add(this.l, new GridBagConstraints(4, 0, 1, 1, 0D, 0D, 17, 2, new Insets(0, 5, 5, 0), 0, 0));
    this.d.add(this.m, new GridBagConstraints(5, 0, 1, 1, 0D, 0D, 17, 2, new Insets(0, 5, 5, 0), 0, 0));
    this.d.add(this.g, new GridBagConstraints(7, 0, 1, 1, 1D, 0D, 17, 2, new Insets(0, 5, 5, 0), 0, 0));
    this.d.add(this.h, new GridBagConstraints(8, 0, 1, 1, 1D, 0D, 17, 2, new Insets(0, 5, 5, 0), 0, 0));
    this.d.add(this.i, new GridBagConstraints(9, 0, 1, 1, 1D, 0D, 17, 2, new Insets(0, 5, 5, 5), 0, 0));
    this.d.add(this.r, new GridBagConstraints(0, 0, 1, 1, 10.0D, 0D, 17, 2, new Insets(0, 5, 0, 5), 0, 0));
  }

  public final void a()
  {
    a("in emptyTable()");
    this.t = new JTable();
    this.e.getViewport().add(this.t);
  }

  public final void a(z paramz)
  {
    int i2;
    a("in refreshTable(),tml.rowCount:" + paramz.getRowCount());
    this.t = new JTable();
    this.t.setBackground(a);
    this.t.setAutoResizeMode(0);
    this.t.addMouseListener(this);
    this.t.setFont(new Font("Dialog", 1, 12));
    this.t.setShowGrid(false);
    this.t.getTableHeader().setVisible(false);
    this.t.getTableHeader().setBackground(this.t.getBackground());
    this.t.getTableHeader().setPreferredSize(new Dimension(0, 2));
    this.t.setAutoCreateColumnsFromModel(false);
    this.t.setModel(paramz);
    for (int i1 = 0; i1 < paramz.getColumnCount(); ++i1)
    {
      TableColumn localTableColumn;
      c localc = new c();
      int i3 = 30;
      if (i1 < 6)
      {
        localc.setHorizontalAlignment(z.a[i1].c);
        i3 = z.a[i1].b;
      }
      else
      {
        if (i1 == 6)
          i3 = 30;
        localc.setHorizontalAlignment(0);
      }
      (localTableColumn = new TableColumn(i1, i3, localc, null)).setMaxWidth(i3);
      localTableColumn.setMinWidth(i3);
      this.t.addColumn(localTableColumn);
    }
    if (paramz.getRowCount() > 0)
      if (lx.p == -1)
      {
        this.h.setEnabled(true);
        this.f.setText(" ");
      }
    ((goto 308) ? this : this).h.setEnabled(false);
    this.t.setSelectionMode(0);
    this.e.getViewport().add(this.t);
    if (this.t.getRowCount() > 0)
      this.t.setRowSelectionInterval(0, 0);
    else
      this.f.setText("No table, please choose other.");
    Dimension localDimension = Toolkit.getDefaultToolkit().getScreenSize();
    if ((i2 = this.t.getColumnModel().getTotalColumnWidth() + 20) > localDimension.width)
      i2 = localDimension.width;
    this.e.setPreferredSize(new Dimension(i2, this.e.getHeight()));
    this.t.setSelectionBackground(Color.lightGray);
  }

  public final void mouseClicked(MouseEvent paramMouseEvent)
  {
  }

  public final void mousePressed(MouseEvent paramMouseEvent)
  {
    lx.as = System.currentTimeMillis();
    a("set lastActionTime");
    if ((paramMouseEvent.getModifiers() & 0x4) != 0)
    {
      String str;
      int i1 = this.t.getSelectedRow();
      a("select index:" + i1 + ",table:" + this.t.getValueAt(i1, 0));
      int i2 = Integer.parseInt(str = (String)((o)this.t.getModel().getValueAt(i1, 0)).b);
      this.b.a();
      this.b.a(i2);
    }
  }

  public final void mouseReleased(MouseEvent paramMouseEvent)
  {
  }

  public final void mouseEntered(MouseEvent paramMouseEvent)
  {
  }

  public final void mouseExited(MouseEvent paramMouseEvent)
  {
  }

  private static void a(String paramString)
  {
    if (lx.aJ)
      System.out.println(paramString);
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -