mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-02-16 15:40:14 +00:00
GT-2376-b: fixing some bugs from internal users (gui shenanigans)
This commit is contained in:
parent
f57af0b730
commit
ea9e1c2dda
@ -329,7 +329,7 @@ public class TaskMonitorServiceTest extends AbstractGhidraHeadedIntegrationTest
|
||||
monitor1 = TaskMonitorService.getMonitor();
|
||||
assertTrue(monitor1 instanceof SecondaryTaskMonitor);
|
||||
|
||||
monitor1.reset();
|
||||
monitor1.release();
|
||||
|
||||
monitor1 = TaskMonitorService.getMonitor();
|
||||
assertTrue(monitor1 instanceof TaskDialog);
|
||||
|
@ -942,17 +942,18 @@ public class DialogComponentProvider
|
||||
}
|
||||
});
|
||||
|
||||
subStatusLabel = new JLabel();
|
||||
subStatusLabel = new JLabel(" ");
|
||||
subStatusLabel.setName("subStatusLabel");
|
||||
subStatusLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
subStatusLabel.setForeground(Color.blue);
|
||||
subStatusLabel.setFont(subStatusLabel.getFont().deriveFont(Font.ITALIC));
|
||||
subStatusLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
subStatusLabel.setFont(subStatusLabel.getFont().deriveFont(11.0f));
|
||||
subStatusLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 3, 5));
|
||||
subStatusLabel.setFont(subStatusLabel.getFont().deriveFont(9.0f));
|
||||
|
||||
// use a strut panel so the size of the message area does not change if we make
|
||||
// the message label not visible
|
||||
int height = statusLabel.getPreferredSize().height;
|
||||
int height =
|
||||
statusLabel.getPreferredSize().height + subStatusLabel.getPreferredSize().height + 5;
|
||||
|
||||
panel.add(Box.createVerticalStrut(height), BorderLayout.WEST);
|
||||
panel.add(statusLabel, BorderLayout.CENTER);
|
||||
|
@ -54,6 +54,6 @@ public class HourglassAnimationPanel extends JPanel {
|
||||
iconList.add(ResourceManager.loadImage("images/hourglass24_11.png"));
|
||||
AnimatedIcon progressIcon = new AnimatedIcon(iconList, 150, 0);
|
||||
|
||||
add (new JLabel(progressIcon), BorderLayout.CENTER);
|
||||
add(new JLabel(progressIcon), BorderLayout.NORTH);
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ public class SecondaryTaskMonitor implements TaskMonitor {
|
||||
public void setMessage(String message) {
|
||||
if (parentMonitor instanceof TaskDialog) {
|
||||
((TaskDialog) parentMonitor).setSecondaryMessage(message);
|
||||
return;
|
||||
}
|
||||
parentMonitor.setMessage(message);
|
||||
}
|
||||
|
@ -336,7 +336,6 @@ public class TaskDialog extends DialogComponentProvider implements TaskMonitor {
|
||||
SwingUtilities.invokeLater(closeDialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void reset() {
|
||||
taskDone = false;
|
||||
taskID.incrementAndGet();
|
||||
@ -476,5 +475,4 @@ public class TaskDialog extends DialogComponentProvider implements TaskMonitor {
|
||||
}
|
||||
return secondaryTaskMonitor;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -257,7 +257,6 @@ public class TaskMonitorComponent extends JPanel implements TaskMonitor {
|
||||
/**
|
||||
* Reset this monitor so that it can be reused
|
||||
*/
|
||||
@Override
|
||||
public synchronized void reset() {
|
||||
isCancelled = false;
|
||||
taskID.incrementAndGet();
|
||||
|
@ -112,7 +112,7 @@ public class DefaultLanguageService implements LanguageService, ChangeListener {
|
||||
return lang;
|
||||
}
|
||||
finally {
|
||||
monitor.setMessage("");
|
||||
monitor.release();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public interface TaskMonitor {
|
||||
* monitor being returned from the {@link TaskMonitorService} on the next
|
||||
* invocation.
|
||||
*/
|
||||
public default void reset() {
|
||||
public default void release() {
|
||||
synchronized (this) {
|
||||
setMessage("");
|
||||
setProgress(0);
|
||||
|
Loading…
Reference in New Issue
Block a user