/*
  * getFloor() - Environment check. Checks both the currently active windows
  * and the bottom of the screen. Returns the border if on one. Controls the
  * current Floor/Ceiling attribute of each mascot.
  */
 public Border getFloor(boolean ignoreSeparator) {
   if (getIE().onTop(mascot.getAnchor())) {
     FloorCeiling fc = getIE().getTop(mascot.getAnchor());
     if (!checkLayering(fc.getArea())) {
       mascot.setCurFC(null);
       return NotOnVisibleBorder.INSTANCE;
     }
     if (currentWorkArea == null) currentWorkArea = impl.getWorkArea();
     // Don't let the mascot get footing on any window ceiling within 64px
     // of the top of the screen.
     if (fc.getY() >= currentWorkArea.getTop() + 64) {
       mascot.setCurFC(fc);
       return getIE().getTop(mascot.getAnchor());
     }
   }
   if (getWorkArea().getBottomBorder().isOn(mascot.getAnchor())) {
     if (!ignoreSeparator || isScreenTopBottom()) {
       mascot.setCurFC(null);
       return getWorkArea().getBottomBorder();
     }
   }
   mascot.setCurFC(null);
   return NotOnBorder.INSTANCE;
 }
  /**
   * マスコットを含むスクリーンを取得する
   *
   * @return
   */
  public Area getWorkArea() {
    if (numScreens == 1) {
      if (currentWorkArea == null) {
        currentWorkArea = impl.getWorkArea();
      }
      return currentWorkArea;
    }

    // if ( currentWorkArea!=null ) {
    // NOTE Windows マルチモニタ対応 Windowsのワークエリアはメインのスクリーンより小さい。
    // 現在のスクリーンがワークエリアを含んでおり、かつマスコットがワークエリアに含まれているならばワークエリアを優先する。
    // if ( currentWorkArea!=impl.getWorkArea() &&
    // currentWorkArea.toRectangle().contains(impl.getWorkArea().toRectangle()) ) {
    // if (impl.getWorkArea().contains(mascot.getAnchor().x, mascot.getAnchor().y)) {
    // currentWorkArea = impl.getWorkArea();
    // return currentWorkArea;
    // }
    // }

    // NOTE マルチモニタ対応 マスコットが複数のモニタに同時に含まれる場合があるが、
    // その場合は現在のモニタを優先する
    // if ( currentWorkArea.contains(mascot.getAnchor().x, mascot.getAnchor().y) ) {
    // return currentWorkArea;
    // }
    // }

    // まずワークエリアに含まれているか調べる
    // if (impl.getWorkArea().contains(mascot.getAnchor().x, mascot.getAnchor().y)) {
    // currentWorkArea = impl.getWorkArea();
    // return currentWorkArea;
    // }

    // 各モニタに含まれているか調べる
    if (currentWorkArea != null) {
      if (currentWorkArea.getTopBorder().isOn(mascot.getAnchor())) {
        return currentWorkArea;
      }
    }
    int cnt = 0;
    Area a = new Area();
    for (Area area : impl.getScreens()) {
      if (area.contains(mascot.getAnchor().x, mascot.getAnchor().y)) {
        cnt++;
        a = area;
      }
    }
    if (cnt == 1) {
      currentWorkArea = a;
      return currentWorkArea;
    } else if (cnt == 2) {
      Iterator<Area> iter = impl.getScreens().iterator();
      Area temp = iter.next();
      if (!mascot.isLookRight()) {
        currentWorkArea = temp;
        return currentWorkArea;
      } else {
        currentWorkArea = iter.next();
        return currentWorkArea;
      }
    }

    if (impl.getScreens().iterator().hasNext()) {
      currentWorkArea = impl.getScreens().iterator().next();
      return currentWorkArea;
    }

    currentWorkArea = impl.getWorkArea();
    return currentWorkArea;
  }