mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Merge remote-tracking branch 'origin/GT-2376-b_adamopolous'
This commit is contained in:
commit
c7ec40d732
9 changed files with 63 additions and 23 deletions
|
@ -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);
|
||||
}
|
||||
|
@ -64,6 +65,17 @@ public class SecondaryTaskMonitor implements TaskMonitor {
|
|||
parentMonitor.setInitialized(init);
|
||||
}
|
||||
|
||||
/**
|
||||
* Secondary monitors should not be able to reset progress or revert back
|
||||
* to an uninitialized state; hence the override.
|
||||
*/
|
||||
@Override
|
||||
public void finished() {
|
||||
synchronized (this) {
|
||||
setMessage("");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelEnabled() {
|
||||
return parentMonitor.isCancelEnabled();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -256,7 +256,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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue