private void startFormat(ReportEditor editor) {
   editor.getReportPanel().getGroupPanel().setCursor(CursorUtil.FORMAT_CURSOR);
   editor.getReportPanel().getGroupPanel().setCursorLocked(true);
   editor.getReportPanel().getGroupPanel().addMouseReleaseListener(this);
   editor.getReportPanel().getGroupPanel().addKeyTypedListener(this);
   editor.getReportPanel().getGroupPanel().requestFocus();
   editor.getReportPanel().addSelectionListener1(this);
   this.lastEditor = editor;
   this.selectionChanged = false;
 }
  private void endFormat() {
    if (lastEditor != null) {
      endFormat(lastEditor);

      if (lastEditor != null) {
        SelectionState state = lastEditor.getReportPanel().getPeerSelection().getState();
        this.enabled(state);
      }

      lastEditor = null;
    }
  }
 private void endFormat(ReportEditor editor) {
   editor.getReportPanel().getGroupPanel().removeMouseReleaseListener(this);
   editor.getReportPanel().getGroupPanel().removeKeyTypedListener(this);
   editor.getReportPanel().getGroupPanel().setCursorLocked(false);
 }