Пример #1
0
  public void removeFile(int index) {
    if (_resources != null && selectFile(index)) {
      _file.detach();
      _file = null;
      _dom.setChanged(true);
    }

    ResourcesListener.checkResources(_dom, _parent);
  }
Пример #2
0
  public void applyFile(String file, String id, String os, String type) {
    if (_resources == null) _resources = ResourcesListener.getResourcesElement(_dom, _parent);

    Utils.setAttribute("file", file, _file);
    Utils.setAttribute("id", id, _file);
    Utils.setAttribute("os", os, _file);
    Utils.setAttribute("type", type, _file);

    if (_isNewFile) _resources.addContent(_file);

    _isNewFile = false;
    _dom.setChanged(true);
  }