From 1762083c03f5f2523c134c12b9e120b5dc70abc8 Mon Sep 17 00:00:00 2001 From: j-dimension Date: Thu, 7 Dec 2023 23:20:26 +0100 Subject: [PATCH] select this folder only. close #1039 --- .../jlawyer/ui/folders/FolderListCell.form | 8 +++++++ .../jlawyer/ui/folders/FolderListCell.java | 23 +++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/ui/folders/FolderListCell.form b/j-lawyer-client/src/com/jdimension/jlawyer/ui/folders/FolderListCell.form index 2f277eaab..ed27dc096 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/ui/folders/FolderListCell.form +++ b/j-lawyer-client/src/com/jdimension/jlawyer/ui/folders/FolderListCell.form @@ -8,6 +8,14 @@ + + + + + + + + diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/ui/folders/FolderListCell.java b/j-lawyer-client/src/com/jdimension/jlawyer/ui/folders/FolderListCell.java index cfd3b0e56..8dd0ecea2 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/ui/folders/FolderListCell.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/ui/folders/FolderListCell.java @@ -699,7 +699,7 @@ You should also get your employer (if you work as a programmer) or school, */ public class FolderListCell extends javax.swing.JPanel implements DropTargetListener { - private static Logger log = Logger.getLogger(FolderListCell.class.getName()); + private static final Logger log = Logger.getLogger(FolderListCell.class.getName()); private CaseFolder folder = null; protected CaseFolder parentFolder = null; @@ -711,6 +711,10 @@ public class FolderListCell extends javax.swing.JPanel implements DropTargetList /** * Creates new form FolderCell + * @param parent + * @param level + * @param name + * @param readOnly */ public FolderListCell(FoldersListPanel parent, int level, String name, boolean readOnly) { initComponents(); @@ -790,6 +794,7 @@ public void addExpandedListener(MouseListener ml) { private void initComponents() { popFolder = new javax.swing.JPopupMenu(); + mnuSelectThisOnly = new javax.swing.JMenuItem(); mnuEdit = new javax.swing.JMenuItem(); mnuDelete = new javax.swing.JMenuItem(); mnuCreate = new javax.swing.JMenuItem(); @@ -798,6 +803,14 @@ private void initComponents() { lblExpanded = new javax.swing.JLabel(); txtFolderName = new javax.swing.JTextField(); + mnuSelectThisOnly.setText("nur diesen auswählen"); + mnuSelectThisOnly.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + mnuSelectThisOnlyActionPerformed(evt); + } + }); + popFolder.add(mnuSelectThisOnly); + mnuEdit.setText("umbenennen"); mnuEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -858,7 +871,6 @@ public void mouseClicked(java.awt.event.MouseEvent evt) { txtFolderName.setFont(txtFolderName.getFont().deriveFont(txtFolderName.getFont().getStyle() | java.awt.Font.BOLD)); txtFolderName.setText("jTextField1"); txtFolderName.setBorder(null); - txtFolderName.setOpaque(false); txtFolderName.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txtFolderNameMouseClicked(evt); @@ -987,6 +999,12 @@ private void txtFolderNameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIR this.parent.selectionChanged(); }//GEN-LAST:event_txtFolderNameMouseClicked + private void mnuSelectThisOnlyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuSelectThisOnlyActionPerformed + this.parent.selectAll(false); + setSelected(true); + this.parent.selectionChanged(); + }//GEN-LAST:event_mnuSelectThisOnlyActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton cmdMore; @@ -995,6 +1013,7 @@ private void txtFolderNameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIR private javax.swing.JMenuItem mnuCreate; private javax.swing.JMenuItem mnuDelete; private javax.swing.JMenuItem mnuEdit; + private javax.swing.JMenuItem mnuSelectThisOnly; private javax.swing.JPopupMenu popFolder; private javax.swing.JTextField txtFolderName; // End of variables declaration//GEN-END:variables