Skip to content

Commit

Permalink
chore(SearchResultsFrame): revert to f926ebe
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfBarkow committed Jun 9, 2024
1 parent 1d0bd0c commit 15e7714
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public void actionPerformed(ActionEvent evt) {
};
getRootPane().registerKeyboardAction(cancelAction, stroke, JComponent.WHEN_IN_FOCUSED_WINDOW);
addWindowListener(this);
// these codelines add an escape-listener to the dialog. so, when the user
// these code lines add an escape-listener to the dialog. so, when the user
// presses the escape-key, the same action is performed as if the user
// presses the cancel button...
stroke = KeyStroke.getKeyStroke(accKeys.getAcceleratorKey(AcceleratorKeys.MAINKEYS, "showSearchResultWindow"));
Expand All @@ -448,7 +448,7 @@ public void actionPerformed(ActionEvent evt) {
}
};
getRootPane().registerKeyboardAction(showSearchResultsAction, stroke, JComponent.WHEN_IN_FOCUSED_WINDOW);
// these codelines add an escape-listener to the dialog. so, when the user
// these code lines add an escape-listener to the dialog. so, when the user
// presses the escape-key, the same action is performed as if the user
// presses the cancel button...
stroke = KeyStroke.getKeyStroke(accKeys.getAcceleratorKey(AcceleratorKeys.MAINKEYS, "showNewEntryWindow"));
Expand All @@ -459,7 +459,7 @@ public void actionPerformed(ActionEvent evt) {
}
};
getRootPane().registerKeyboardAction(showNewEntryFrameAction, stroke, JComponent.WHEN_IN_FOCUSED_WINDOW);
// these codelines add an escape-listener to the dialog. so, when the user
// these code lines add an escape-listener to the dialog. so, when the user
// presses the escape-key, the same action is performed as if the user
// presses the cancel button...
stroke = KeyStroke.getKeyStroke(KeyEvent.VK_F10, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,34 @@

package de.danielluedecke.zettelkasten;

import de.danielluedecke.zettelkasten.data.SearchResultsFrameData;
import com.explodingpixels.macwidgets.BottomBar;
import com.explodingpixels.macwidgets.BottomBarSize;
import de.danielluedecke.zettelkasten.database.*;
import de.danielluedecke.zettelkasten.mac.MacSourceList;
import de.danielluedecke.zettelkasten.util.Tools;
import de.danielluedecke.zettelkasten.util.Constants;
import de.danielluedecke.zettelkasten.util.classes.DateComparer;
import de.danielluedecke.zettelkasten.util.classes.Comparer;
import com.explodingpixels.macwidgets.MacUtils;
import com.explodingpixels.macwidgets.MacWidgetFactory;
import com.explodingpixels.macwidgets.UnifiedToolBar;
import com.explodingpixels.widgets.TableUtils;
import com.explodingpixels.widgets.WindowUtils;
import de.danielluedecke.zettelkasten.database.BibTeX;
import de.danielluedecke.zettelkasten.mac.MacToolbarButton;
import de.danielluedecke.zettelkasten.mac.ZknMacWidgetFactory;
import de.danielluedecke.zettelkasten.settings.AcceleratorKeys;
import de.danielluedecke.zettelkasten.settings.Settings;
import de.danielluedecke.zettelkasten.tasks.TaskProgressDialog;
import de.danielluedecke.zettelkasten.util.ColorUtil;
import de.danielluedecke.zettelkasten.util.HtmlUbbUtil;
import de.danielluedecke.zettelkasten.util.PlatformUtil;
import java.awt.AWTKeyStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.GraphicsEnvironment;
import java.awt.IllegalComponentStateException;
import java.awt.KeyboardFocusManager;
import java.awt.event.ActionEvent;
Expand All @@ -56,7 +80,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

import javax.swing.AbstractAction;
import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;
Expand All @@ -78,36 +101,8 @@
import javax.swing.table.TableRowSorter;
import javax.swing.text.AttributeSet;
import javax.swing.text.html.HTML;

import org.jdesktop.application.Action;

import com.explodingpixels.macwidgets.BottomBar;
import com.explodingpixels.macwidgets.BottomBarSize;
import com.explodingpixels.macwidgets.MacUtils;
import com.explodingpixels.macwidgets.MacWidgetFactory;
import com.explodingpixels.macwidgets.UnifiedToolBar;
import com.explodingpixels.widgets.TableUtils;
import com.explodingpixels.widgets.WindowUtils;

import de.danielluedecke.zettelkasten.data.SearchResultsFrameData;
import de.danielluedecke.zettelkasten.database.BibTeX;
import de.danielluedecke.zettelkasten.database.Daten;
import de.danielluedecke.zettelkasten.database.DesktopData;
import de.danielluedecke.zettelkasten.database.SearchRequests;
import de.danielluedecke.zettelkasten.database.Synonyms;
import de.danielluedecke.zettelkasten.mac.MacSourceList;
import de.danielluedecke.zettelkasten.mac.MacToolbarButton;
import de.danielluedecke.zettelkasten.mac.ZknMacWidgetFactory;
import de.danielluedecke.zettelkasten.settings.AcceleratorKeys;
import de.danielluedecke.zettelkasten.settings.Settings;
import de.danielluedecke.zettelkasten.tasks.TaskProgressDialog;
import de.danielluedecke.zettelkasten.util.ColorUtil;
import de.danielluedecke.zettelkasten.util.Constants;
import de.danielluedecke.zettelkasten.util.HtmlUbbUtil;
import de.danielluedecke.zettelkasten.util.PlatformUtil;
import de.danielluedecke.zettelkasten.util.Tools;
import de.danielluedecke.zettelkasten.util.classes.Comparer;
import de.danielluedecke.zettelkasten.util.classes.DateComparer;
import org.jdesktop.application.Application;

/**
*
Expand Down Expand Up @@ -2186,15 +2181,14 @@ else if (returnValue.startsWith("#rateentry")) {
/**
* This class sets up a selection listener for the tables. each table which
* shall react on selections, e.g. by showing an entry, gets this
* selection listener in the method {@link #initSelectionListeners()
* selectionlistener in the method {@link #initSelectionListeners()
* initSelectionListeners()}.
*/
public class SelectionListener implements ListSelectionListener {
JTable table;

// It is necessary to keep the table since it is not possible
// to determine the table from the event's source
// NB. See TableEventSourceExample
SelectionListener(JTable table) {
this.table = table;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ public static String[] replaceSynonymsWithKeywords(Synonyms synonymsObj, String[
* This method sets the locale descriptions for the standard-actions cut, copy
* and paste - which are in English by default.
*
* @param actionMap the class's actionmap
* @param actionMap the class's action map
*/
public static void initLocaleForDefaultActions(javax.swing.ActionMap actionMap) {
String[] actions = new String[] { "cut", "copy", "paste" };
Expand Down

0 comments on commit 15e7714

Please sign in to comment.