示例#1
0
  @Override
  public void onDataUpdate(Object newData) {
    FakeWardData newFakeWardData = (FakeWardData) newData;

    if (fakeWardData.getX() != newFakeWardData.getX()
        || fakeWardData.getY() != newFakeWardData.getY())
      setLocation(newFakeWardData.getX(), newFakeWardData.getY());

    if (fakeWardData.isValid() != newFakeWardData.isValid()) updateData(newFakeWardData);

    fakeWardData = newFakeWardData;
  }
示例#2
0
  public FakeWardItem(FakeWardData fakeWardData, UIItemRenderingHints hints) {
    super(fakeWardData.getX(), fakeWardData.getY(), hints);

    this.fakeWardData = fakeWardData;

    getElement()
        .setClassName("ward ward-" + fakeWardData.getType().replace("_", "-")); // $NON-NLS-1$
    getElement().setAttribute("unselectable", "on"); // $NON-NLS-1$ //$NON-NLS-2$

    getElement().setInnerHTML("<div class=\"setupMask\"></div>");

    updateData(fakeWardData);
  }