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

📄 p.java

📁 现在非常流行的手机网游的源码,可以下载来学习学习.
💻 JAVA
字号:
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;

public final class p extends n
{
  private byte b;
  private int i = 10;
  private int j = 5;
  private int k = 0;
  private int l = 0;
  private int m = 0;
  private boolean e = false;
  private int n = 211066;
  private int o = 15653280;
  private StringBuffer a = null;

  public p(int paramInt1, int paramInt2, int paramInt3, int paramInt4, byte paramByte, boolean paramBoolean)
  {
    super(paramInt1, paramInt2, paramInt3, paramInt4);
    if (paramBoolean)
    {
      this.d += 3;
      this.jdField_b_of_type_Int -= 6;
    }
    this.b = paramByte;
    if (this.b == 0)
      this.jdField_a_of_type_Int -= 1;
    else
      this.jdField_b_of_type_Int -= 1;
    if (this.b == 2)
      this.a = new StringBuffer();
    this.jdField_b_of_type_Boolean = false;
    this.e = paramBoolean;
  }

  public final void a(int paramInt)
  {
    if (this.b == 2)
      this.n = paramInt;
  }

  public final void a(Graphics paramGraphics)
  {
    paramGraphics.setColor(8349245);
    paramGraphics.drawRect(this.c, this.d, this.jdField_a_of_type_Int, this.jdField_b_of_type_Int);
    if (this.e)
    {
      al.a(paramGraphics, this.c - 3, this.d - 8, 3);
      al.a(paramGraphics, this.c - 3, this.d + this.jdField_b_of_type_Int, 6);
    }
    paramGraphics.setColor(11701844);
    switch (this.b)
    {
    case 0:
      paramGraphics.fillRect(this.c + 1, this.d + 1 + this.m, this.jdField_a_of_type_Int - 1, this.k - 1);
      return;
    case 1:
      paramGraphics.fillRect(this.c + 1 + this.m, this.d + 1, this.k - 1, this.jdField_b_of_type_Int - 1);
      return;
    case 2:
      paramGraphics.setColor(this.n);
      if (this.m != 0)
        paramGraphics.fillRect(this.c + 2, this.d + 2, this.m, this.jdField_b_of_type_Int - 3);
      paramGraphics.setColor(this.o);
      int i1 = n.jdField_a_of_type_JavaxMicroeditionLcduiFont.stringWidth(this.a.toString());
      paramGraphics.drawString(this.a.toString(), this.c + (this.jdField_a_of_type_Int - i1 >> 1), this.d - 1, 20);
    }
  }

  public final void b(int paramInt)
  {
    if (paramInt < 0)
      paramInt = 0;
    else if (paramInt > this.i)
      paramInt = this.i;
    this.l = paramInt;
    a();
  }

  public final void b(int paramInt1, int paramInt2)
  {
    this.i = paramInt1;
    this.j = paramInt2;
    if (this.b == 0)
      this.k = (this.jdField_b_of_type_Int * this.j / this.i);
    else
      this.k = (this.jdField_a_of_type_Int * this.j / this.i);
    a();
  }

  private void a()
  {
    switch (this.b)
    {
    case 0:
      this.m = (this.l * (this.jdField_b_of_type_Int - this.k) / (this.i - this.j));
      return;
    case 1:
      this.m = (this.l * (this.jdField_a_of_type_Int - this.k) / (this.i - this.j));
      return;
    case 2:
      this.m = (this.l * (this.jdField_a_of_type_Int - 3) / this.i);
      this.a.delete(0, this.a.length());
      this.a.append(this.l + "/" + this.i);
    }
  }

  public final void a(int paramInt1, int paramInt2)
  {
    super.a(paramInt1, paramInt2);
    if (this.e)
      this.d += 3;
  }
}

⌨️ 快捷键说明

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