📄 q.java
字号:
package com.hoya.games.sp;
import com.hoya.common.a;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.PrintStream;
import javax.swing.JComponent;
import javax.swing.Timer;
public class q extends JComponent
implements h, ActionListener
{
int r;
FontMetrics s;
Dimension b;
public int t;
public Font u;
public Font c;
public Font d;
public Font a_;
public int v;
public int w;
public static int[] C;
public static int b_ = 55;
public static a D = a.a();
public Timer E;
public static int aH = 0;
public static int aL = -1;
public long aM;
public Color c_;
int J;
int K;
public q()
{
this.E = new Timer(20, this);
this.aM = 0L;
this.c_ = new Color(31, 26, 78);
addMouseListener(new s(this));
this.u = new Font("Dialog", 1, 20);
this.c = new Font("Dialog", 0, 14);
this.d = new Font("Dialog", 1, 18);
this.a_ = new Font("Dialog", 1, 18);
a(2);
}
public final void a(Graphics paramGraphics)
{
if ((lx.e) && (lx.aL))
{
paramGraphics.setFont(T);
paramGraphics.setColor(Color.red);
paramGraphics.drawString("JP:" + lx.aM + " " + aL, 5, 100);
paramGraphics.drawString("double:" + lx.S, 5, 177);
paramGraphics.drawString("state:" + lx.p, 5, 187);
paramGraphics.drawString(lx.h, 0, (int)(O[this.t].getHeight() - b_ - this.w / 2 - 5.0D));
paramGraphics.drawString("waitShowCard:" + lx.N, 0, (int)(O[this.t].getHeight() - b_ - this.w / 2 - 20.0D));
paramGraphics.drawString("waitDoubleResponse:" + lx.V, 150, (int)(O[this.t].getHeight() - b_ - this.w / 2 - 20.0D));
}
}
public void actionPerformed(ActionEvent paramActionEvent)
{
}
public void paintComponent(Graphics paramGraphics)
{
Graphics2D localGraphics2D;
super.paintComponent(paramGraphics);
paramGraphics.setFont(this.u);
(localGraphics2D = (Graphics2D)paramGraphics).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
localGraphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
this.s = paramGraphics.getFontMetrics();
this.r = this.s.stringWidth("A");
paramGraphics.setColor(this.c_);
paramGraphics.fill3DRect(0, 0, getWidth(), getHeight(), true);
}
public final void a(Graphics paramGraphics, String paramString, int paramInt1, int paramInt2, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3)
{
paramInt1 = (int)(paramInt1 * b_());
if (!(paramBoolean1))
paramInt1 -= this.v * paramString.length();
if (lx.aS != 3)
{
if (lx.aS == 4)
return;
a(paramGraphics, paramString, paramInt1, paramInt2, paramBoolean2, paramBoolean3);
}
}
public final void a(Graphics paramGraphics, String paramString, int paramInt1, int paramInt2, boolean paramBoolean)
{
a(paramGraphics, paramString, paramInt1, paramInt2, paramBoolean, false, true);
}
public final void a(Graphics paramGraphics, String paramString, int paramInt1, int paramInt2)
{
a(paramGraphics, paramString, paramInt1, paramInt2, true, false, true);
}
public final void a(Graphics paramGraphics, String paramString, int paramInt1, int paramInt2, boolean paramBoolean1, boolean paramBoolean2)
{
char[] arrayOfChar = new char[paramString.length()];
paramString.getChars(0, paramString.length(), arrayOfChar, 0);
for (int i = 0; i < arrayOfChar.length; ++i)
{
Color localColor;
if (paramBoolean1)
{
localColor = paramGraphics.getColor();
paramGraphics.setColor(Color.blue);
paramGraphics.fillRect(paramInt1 + i * this.v, paramInt2 - this.s.getDescent() / 2, (int)(this.s.stringWidth("A") * 1.2D), this.w);
paramGraphics.setColor(localColor);
}
if (paramBoolean2)
{
localColor = paramGraphics.getColor();
paramGraphics.setColor(Color.black);
paramGraphics.drawString("" + arrayOfChar[i], paramInt1 + i * this.v + (this.r - this.s.stringWidth("" + arrayOfChar[i])) / 2 + 2, paramInt2 + this.s.getAscent() - this.s.getDescent() + 2);
paramGraphics.setColor(localColor);
}
paramGraphics.drawString("" + arrayOfChar[i], paramInt1 + i * this.v + (this.r - this.s.stringWidth("" + arrayOfChar[i])) / 2, paramInt2 + this.s.getAscent() - this.s.getDescent());
}
}
public static double b_()
{
return (1D * (lx.j.getSize().getWidth() - 7.0D) / 793.0D);
}
public static double c_()
{
if (lx.j != null)
return (1D * (lx.j.getSize().getHeight() - 54.0D) / 565.0D);
return 0D;
}
public final void a(int paramInt)
{
a("in setPanelSize(" + paramInt + ")");
x.a();
this.t = paramInt;
this.u = X[paramInt];
this.c = j_[paramInt];
this.d = A[paramInt];
this.a_ = I[paramInt];
this.v = P[paramInt];
this.w = Q[paramInt];
if (lx.aS == 4)
{
this.v += 2;
this.w += 2;
}
this.b = O[paramInt];
C = new int[81];
int i = 0;
if (i <= 80)
{
if (lx.aS == 3)
C[i] = (((paramInt == 0) ? -5 : -10) + this.w * i);
if (lx.aS == 4)
C[i] = (((paramInt == 1) ? -18 : (paramInt == 0) ? -5 : -20) + this.w * i);
C[i] = ((i == 11) ? this.w * i - 23 : (paramInt == 1) ? this.w * i - 20 : (i == 11) ? this.w * i : 5 + this.w * i);
}
x.a();
this.J = ((int)(x.f[0].y * c_()) + C[11]);
this.K = ((int)(x.f[1].y * c_()) + C[11] + (int)(x.i * c_()));
if (this.s != null)
{
a("fontMetrics height:" + this.s.getHeight());
a("fontMetrics ascent:" + this.s.getAscent());
a("fontMetrics Descent:" + this.s.getDescent());
}
a("font height:" + this.w);
}
public void a(String paramString)
{
}
private static void b(String paramString)
{
if (lx.aJ)
System.out.println(paramString);
}
static void a(q paramq, String paramString)
{
b(paramString);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -