Skip to content

Commit

Permalink
copying a cases document to clipboard. close #1419.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Sep 29, 2023
1 parent c46af50 commit 4041554
Show file tree
Hide file tree
Showing 4 changed files with 842 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@
<Property name="useNullLayout" type="boolean" value="true"/>
</Layout>
<SubComponents>
<MenuItem class="javax.swing.JMenuItem" name="mnuCopyFilesToClipboard">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
<FontInfo relative="true">
<Font component="mnuCopyFilesToClipboard" property="font" relativeSize="true" size="0"/>
</FontInfo>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons16/editpaste.png"/>
</Property>
<Property name="text" type="java.lang.String" value="in Zwischenablage kopieren"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuCopyFilesToClipboardActionPerformed"/>
</Events>
</MenuItem>
<MenuItem class="javax.swing.JMenuItem" name="mnuOpenDocument">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.io.File;
import java.io.FileOutputStream;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.*;
Expand Down Expand Up @@ -1631,6 +1632,7 @@ private void initComponents() {
mnuEditReview = new javax.swing.JMenuItem();
mnuRemoveReview = new javax.swing.JMenuItem();
documentsPopup = new javax.swing.JPopupMenu();
mnuCopyFilesToClipboard = new javax.swing.JMenuItem();
mnuOpenDocument = new javax.swing.JMenuItem();
mnuOpenDocumentWith = new javax.swing.JMenu();
mnuOpenDocumentMicrosoftOffice = new javax.swing.JMenuItem();
Expand Down Expand Up @@ -1861,6 +1863,16 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
});
reviewsPopup.add(mnuRemoveReview);

mnuCopyFilesToClipboard.setFont(mnuCopyFilesToClipboard.getFont());
mnuCopyFilesToClipboard.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons16/editpaste.png"))); // NOI18N
mnuCopyFilesToClipboard.setText("in Zwischenablage kopieren");
mnuCopyFilesToClipboard.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
mnuCopyFilesToClipboardActionPerformed(evt);
}
});
documentsPopup.add(mnuCopyFilesToClipboard);

mnuOpenDocument.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/editcopy.png"))); // NOI18N
mnuOpenDocument.setText("öffnen");
mnuOpenDocument.addActionListener(new java.awt.event.ActionListener() {
Expand Down Expand Up @@ -5810,6 +5822,25 @@ private void cmdSendInstantMessageActionPerformed(java.awt.event.ActionEvent evt
dlg.setVisible(true);
}//GEN-LAST:event_cmdSendInstantMessageActionPerformed

private void mnuCopyFilesToClipboardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuCopyFilesToClipboardActionPerformed
try {
ArrayList<ArchiveFileDocumentsBean> selectedDocs = this.caseFolderPanel1.getSelectedDocuments();
if (selectedDocs.isEmpty()) {
return;
}

ThreadUtils.setWaitCursor(this);
ProgressIndicator pi = new ProgressIndicator(EditorsRegistry.getInstance().getMainWindow(), true);
pi.setShowCancelButton(true);
CopyDocumentsToClipboardAction a = new CopyDocumentsToClipboardAction(pi, this, selectedDocs);
a.start();

} catch (Exception ioe) {
log.error("Error copying documents to clipboard", ioe);
JOptionPane.showMessageDialog(this, "Fehler beim Kopieren in die Zwischenablage: " + ioe.getMessage(), com.jdimension.jlawyer.client.utils.DesktopUtils.POPUP_TITLE_ERROR, JOptionPane.ERROR_MESSAGE);
}
}//GEN-LAST:event_mnuCopyFilesToClipboardActionPerformed

private void updateDocumentHighlights(int highlightIndex) {
if(!this.readOnly) {
HighlightPicker hp = new HighlightPicker(EditorsRegistry.getInstance().getMainWindow(), true);
Expand Down Expand Up @@ -6268,6 +6299,7 @@ public void drop(DropTargetDropEvent dtde) {
private javax.swing.JLabel lblHeaderInfo;
protected javax.swing.JLabel lblPanelTitle;
private javax.swing.JMenuItem mnuCopyDocumentToOtherCase;
private javax.swing.JMenuItem mnuCopyFilesToClipboard;
private javax.swing.JMenuItem mnuCoverage;
private javax.swing.JMenuItem mnuDirectPrint;
private javax.swing.JMenuItem mnuDocumentHighlight1;
Expand Down
Loading

0 comments on commit 4041554

Please sign in to comment.