mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 04:36:43 +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 javax.swing.*;
|
||||||
|
|
||||||
|
import docking.util.AnimationUtils;
|
||||||
import generic.theme.GIcon;
|
import generic.theme.GIcon;
|
||||||
import ghidra.feature.vt.gui.filters.AncillaryFilterDialogComponentProvider;
|
import ghidra.feature.vt.gui.filters.AncillaryFilterDialogComponentProvider;
|
||||||
|
|
||||||
@@ -49,6 +50,11 @@ public class FilterIconFlashTimer<T> extends Timer implements ActionListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent event) {
|
public void actionPerformed(ActionEvent event) {
|
||||||
|
if (!AnimationUtils.isAnimationEnabled()) {
|
||||||
|
stop();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!filterDialog.isFiltered()) {
|
if (!filterDialog.isFiltered()) {
|
||||||
stop();
|
stop();
|
||||||
return; // no filter applied
|
return; // no filter applied
|
||||||
|
|||||||
@@ -396,6 +396,14 @@ public class StatusBar extends JPanel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void start() {
|
||||||
|
if (!AnimationUtils.isAnimationEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
super.start();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stop() {
|
public void stop() {
|
||||||
super.stop();
|
super.stop();
|
||||||
|
|||||||
@@ -23,9 +23,10 @@ import javax.swing.event.DocumentEvent;
|
|||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
|
|
||||||
import docking.DockingUtils;
|
import docking.DockingUtils;
|
||||||
|
import docking.util.AnimationUtils;
|
||||||
import generic.theme.GColor;
|
import generic.theme.GColor;
|
||||||
import generic.theme.GThemeDefaults.Colors;
|
import generic.theme.GThemeDefaults.Colors;
|
||||||
import ghidra.util.SystemUtilities;
|
import ghidra.util.Swing;
|
||||||
import ghidra.util.datastruct.WeakDataStructureFactory;
|
import ghidra.util.datastruct.WeakDataStructureFactory;
|
||||||
import ghidra.util.datastruct.WeakSet;
|
import ghidra.util.datastruct.WeakSet;
|
||||||
import ghidra.util.layout.AbstractLayoutManager;
|
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,
|
// 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!
|
// it requires an AWT lock. If called from a non-Swing thread, deadlocks!
|
||||||
SystemUtilities.runIfSwingOrPostSwingLater(() -> {
|
Swing.runIfSwingOrRunLater(() -> {
|
||||||
if (showFilter) {
|
if (showFilter) {
|
||||||
clearLabel.showFilterButton();
|
clearLabel.showFilterButton();
|
||||||
}
|
}
|
||||||
@@ -467,6 +468,11 @@ public class FilterTextField extends JPanel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent event) {
|
public void actionPerformed(ActionEvent event) {
|
||||||
|
if (!AnimationUtils.isAnimationEnabled()) {
|
||||||
|
stop();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (flashCount < MAX_FLASH_COUNT) {
|
if (flashCount < MAX_FLASH_COUNT) {
|
||||||
contrastColors();
|
contrastColors();
|
||||||
flashCount++;
|
flashCount++;
|
||||||
|
|||||||
Reference in New Issue
Block a user