private void setItemStatus() {
    if (parent == null) {
      return;
    }
    Transferable contents = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(instance);
    cliptext = "";
    if (contents == null)
      cliptext = "";
    else {
      try {
        cliptext = (String)contents.getTransferData(DataFlavor.stringFlavor);
      } catch (Exception exception) {
        exception.getStackTrace();
      }
    }
    this.cutButton.setEnabled(false);
    this.copyButton.setEnabled(false);
    this.pastButton.setEnabled(false);
    this.selectAllButton.setEnabled(false);
    if (parent.isEnabled()) {
      if (parent.isEditable()) {
        if (!ClientUtil.isNullObject(parent.getSelectedText())) {
          this.cutButton.setEnabled(true);
        }
        if (!ClientUtil.isNullObject(cliptext)) {
          this.pastButton.setEnabled(true);
        }
      }
      if (!ClientUtil.isNullObject(parent.getText())) {
        this.copyButton.setEnabled(true);
      }
      if (!ClientUtil.isNullObject(parent.getText()))
        this.selectAllButton.setEnabled(true);
    }
  }