public void show(Tile tile) {
    if (tile.getStructure() != null && tile.getStructure() instanceof HasLevel) {
      this.tile = tile;
      this.structure = (HasLevel) tile.getStructure();
      this.setPopupPosition(tile.getAbsoluteLeft(), tile.getAbsoluteTop());
      levelBox.setValue(structure.getLevel());

      this.show();
      levelBox.setFocus(true);
      levelBox.selectAll();
    }
  }
  public void synchUI() {

    if (!initialized) { // do late
      initialize();
      initialized = true;
    }
    LogUtils.log(
        "sync:pos:"
            + PoseEditor.poseEditor.getRootPositionXRange()
            + ","
            + PoseEditor.poseEditor.getRootPositionYRange()
            + ","
            + PoseEditor.poseEditor.getCameraZ());

    // gif-panel
    backgroundCheck.setValue(isGifShowBackground());
    boneCheck.setValue(isGifShowBone());
    ikCheck.setValue(isGifShowIk());

    int screenshottype = getScreenshotBackgroundType();
    if (screenshottype == 0) {
      screenshotTransparentBt.setValue(true);
    } else if (screenshottype == 1) {
      screenshotColorBt.setValue(true);
      String scvalue = getScreenshotBackgroundValue();
      screenshotColorBox.setValue(scvalue);
    }

    lastBgImage = bgImage; // store for cancel
    lastBgLabel = bgImageLabel.getText();

    int bgType = storageControler.getValue(KEY_GIF_BG_TYPE, 1); // sadlly transparent not support
    String bgValue = storageControler.getValue(KEY_GIF_BG_VALUE, "#000000");

    LogUtils.log(bgType + "," + bgValue);

    if (bgType == 0) {
      transparentBt.setValue(true);
    } else if (bgType == 1) {
      colorBt.setValue(true);
      colorBox.setValue(bgValue);
    } else if (bgType == 2) {
      imageBt.setValue(true);
    }

    widthBox.setValue(Math.max(1, getGifWidth()));
    heightBox.setValue(Math.max(1, getGifHeight()));

    qualityBox.setValue(getGifQuality());
    speedBox.setValue(getGifSpeed());

    // keep value before set,if change value listener change others.
    int x = PoseEditor.poseEditor.getRootPositionXRange();
    int y = PoseEditor.poseEditor.getRootPositionYRange();
    int z = (int) (PoseEditor.poseEditor.getCameraZ() * 10);

    settingPositionXRange.setValue(x);
    settingPositionYRange.setValue(y);
    settingPositionZRange.setValue(z);

    lastRangeX = x;
    lastRangeY = y;
    lastRangeZ = z;

    updateCanvasSize();

    updatePreviewCanvas();
  }