Ejemplo n.º 1
0
  static {
    blockWidth = 40;
    blockHeight = 40;
    theAdd = new FenShu(Setting.pointSpace, Setting.blockWidth);
    // 居中
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    xOfMainFrame = ((int) screenSize.getWidth() - MainFrameTrueWidth) / 2;
    xOfLookingFrame = ((int) screenSize.getWidth() - LookingFrameWidth) / 2;
    yOfLookingFrame = ((int) screenSize.getHeight() - LookingFrameHeight) / 2;

    xOfO = MainFrameWidth / 2;
    yOfO = MainFrameHeight / 2;

    xMax = LocationChanger.toX(MainFrameWidth);
    xMin = LocationChanger.toX(0);
    yMax = LocationChanger.toY(0);
    yMin = LocationChanger.toY(MainFrameHeight);

    xIntMax = xMax.intValue();
    xIntMin = xMin.intValue();
    yIntMax = yMax.intValue();
    yIntMin = yMin.intValue();

    colorOfBack = ColorGetter.getColor("");
    colorOfBlock = ColorGetter.getColor("");
    colorOfXY = ColorGetter.getColor("");
    colorOfO = ColorGetter.getColor("");
    colorOfNum = ColorGetter.getColor("");
    colorOfFunciton = ColorGetter.getColor("ff0000");
  }
Ejemplo n.º 2
0
  public static void resetO(int x, int y) {
    xOfO = x;
    yOfO = y;

    xMax = LocationChanger.toX(MainFrameWidth);
    xMin = LocationChanger.toX(0);
    yMax = LocationChanger.toY(0);
    yMin = LocationChanger.toY(MainFrameHeight);

    xIntMax = xMax.intValue();
    xIntMin = xMin.intValue();
    yIntMax = yMax.intValue();
    yIntMin = yMin.intValue();
  }
Ejemplo n.º 3
0
  public static void reset(int add) {
    if (blockWidth >= 1 || add > 0) {
      blockWidth += add;
      if (blockWidth > 60) {
        for (int x = (blockWidth - 60) / 10; x > 0; x--) {
          if (add > 0) blockWidth++;
          else blockWidth--;
        }
      }
      System.out.println(blockWidth);
      blockHeight = blockWidth;
      theAdd = new FenShu(Setting.pointSpace, Setting.blockWidth);

      xMax = LocationChanger.toX(MainFrameWidth);
      xMin = LocationChanger.toX(0);
      yMax = LocationChanger.toY(0);
      yMin = LocationChanger.toY(MainFrameHeight);

      xIntMax = xMax.intValue();
      xIntMin = xMin.intValue();
      yIntMax = yMax.intValue();
      yIntMin = yMin.intValue();
    }
  }