mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-20 06:35:19 +08:00
GP-6805 - Added checks for animation option
This commit is contained in:
+6
@@ -20,6 +20,7 @@ import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
import docking.util.AnimationUtils;
|
||||
import generic.theme.GIcon;
|
||||
import ghidra.feature.vt.gui.filters.AncillaryFilterDialogComponentProvider;
|
||||
|
||||
@@ -49,6 +50,11 @@ public class FilterIconFlashTimer<T> extends Timer implements ActionListener {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
if (!AnimationUtils.isAnimationEnabled()) {
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!filterDialog.isFiltered()) {
|
||||
stop();
|
||||
return; // no filter applied
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -396,6 +396,14 @@ public class StatusBar extends JPanel {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
if (!AnimationUtils.isAnimationEnabled()) {
|
||||
return;
|
||||
}
|
||||
super.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
super.stop();
|
||||
|
||||
@@ -23,9 +23,10 @@ import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
|
||||
import docking.DockingUtils;
|
||||
import docking.util.AnimationUtils;
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import ghidra.util.SystemUtilities;
|
||||
import ghidra.util.Swing;
|
||||
import ghidra.util.datastruct.WeakDataStructureFactory;
|
||||
import ghidra.util.datastruct.WeakSet;
|
||||
import ghidra.util.layout.AbstractLayoutManager;
|
||||
@@ -372,7 +373,7 @@ public class FilterTextField extends JPanel {
|
||||
|
||||
// Note: this must be run on the Swing thread. When the filter button shows itself,
|
||||
// it requires an AWT lock. If called from a non-Swing thread, deadlocks!
|
||||
SystemUtilities.runIfSwingOrPostSwingLater(() -> {
|
||||
Swing.runIfSwingOrRunLater(() -> {
|
||||
if (showFilter) {
|
||||
clearLabel.showFilterButton();
|
||||
}
|
||||
@@ -467,6 +468,11 @@ public class FilterTextField extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
if (!AnimationUtils.isAnimationEnabled()) {
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (flashCount < MAX_FLASH_COUNT) {
|
||||
contrastColors();
|
||||
flashCount++;
|
||||
|
||||
Reference in New Issue
Block a user