@Override
  public final Element getState() {
    Element element = new Element(STATE);
    synchronized (myStateMap) {
      for (Map.Entry<String, CachedState> entry : myStateMap.entrySet()) {
        String key = entry.getKey();
        if (key != null) {
          CachedState state = entry.getValue();
          Element child = new Element(STATE);
          if (state.myLocation != null) {
            JDOMUtil.setLocation(child, state.myLocation);
          }
          if (state.mySize != null) {
            JDOMUtil.setSize(child, state.mySize);
          }
          if (state.myMaximized) {
            child.setAttribute(MAXIMIZED, Boolean.toString(true));
          }
          if (state.myFullScreen) {
            child.setAttribute(FULL_SCREEN, Boolean.toString(true));
          }
          if (state.myScreen != null) {
            child.addContent(JDOMUtil.setBounds(new Element(SCREEN), state.myScreen));
          }
          child.setAttribute(KEY, key);
          child.setAttribute(TIMESTAMP, Long.toString(state.myTimeStamp));
          element.addContent(child);
        }
      }
    }
    return element;
  }
@Override
  public final Element getState()