1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00

Merge pull request #3459 from rishwanth1995/removedefaultfont

added setlookandfeel method to EDT
This commit is contained in:
Richard Cordovano
2018-02-27 17:09:34 -05:00
committed by GitHub

View File

@@ -23,6 +23,7 @@ import java.util.Map;
import java.util.TreeMap;
import java.util.logging.Level;
import javax.swing.BorderFactory;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.UnsupportedLookAndFeelException;
@@ -56,7 +57,9 @@ public class Installer extends ModuleInstall {
@Override
public void restored() {
super.restored();
setLookAndFeel();
SwingUtilities.invokeLater(() -> {
setLookAndFeel();
});
UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI");
UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder());
UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
@@ -69,7 +72,7 @@ public class Installer extends ModuleInstall {
public void uninstalled() {
super.uninstalled();
}
private void setLookAndFeel() {
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
setOSXLookAndFeel();
@@ -88,7 +91,7 @@ public class Installer extends ModuleInstall {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
logger.log(Level.WARNING, "Error setting OS-X look-and-feel", ex); //NON-NLS
}
}
// Store the keys that deal with menu items
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI",}; //NON-NLS