Skip to content

Commit

Permalink
Change all apple.laf.AquaLookAndFeel to com.apple.laf.AquaLookAndFeel…
Browse files Browse the repository at this point in the history
…. Fixes netbeans-444. (apache#516)
  • Loading branch information
svenreimers authored and Geertjan Wielenga committed Apr 24, 2018
1 parent 08c8028 commit cb50f33
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core.startup/src/org/netbeans/core/startup/CLIOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public final int cli(String[] args) {
} else if ("Windows".equals(ui)) {
ui = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
} else if ("Aqua".equals(ui)) {
ui = "apple.laf.AquaLookAndFeel";
ui = "com.apple.laf.AquaLookAndFeel";
}
uiClass = Class.forName(ui);
} catch(ArrayIndexOutOfBoundsException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void testLafId2LafClass () {
if (Utilities.isMac()) {
new CLIOptions().cli(new String[] { "--laf", "Aqua" });
try {
assertEquals("Must be MacOS", CLIOptions.uiClass, Class.forName("apple.laf.AquaLookAndFeel"));
assertEquals("Must be MacOS", CLIOptions.uiClass, Class.forName("com.apple.laf.AquaLookAndFeel"));
} catch (ClassNotFoundException exc) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private LookAndFeelInfo getCurrentLaF() {
boolean isAqua = "Aqua".equals(UIManager.getLookAndFeel().getID()); //NOI18N
for( LookAndFeelInfo li : lafs ) {
if( currentLAFClassName.equals( li.getClassName() )
|| (isAqua && li.getClassName().contains("apple.laf.AquaLookAndFeel")) ) { //NOI18N
|| (isAqua && li.getClassName().contains("com.apple.laf.AquaLookAndFeel")) ) { //NOI18N
currentLaf = li;
break;
}
Expand All @@ -220,7 +220,7 @@ private LookAndFeelInfo getPreferredLaF() {
boolean isAqua = "Aqua".equals(UIManager.getLookAndFeel().getID()); //NOI18N
for( LookAndFeelInfo li : lafs ) {
if( lafClassName.equals( li.getClassName() )
|| (isAqua && li.getClassName().contains("apple.laf.AquaLookAndFeel")) ) { //NOI18N
|| (isAqua && li.getClassName().contains("com.apple.laf.AquaLookAndFeel")) ) { //NOI18N
currentLaf = li;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion ide/launcher/macosx/NetBeansLauncher/NBPreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ @implementation NBPreferences

#define DEFAULT_LOOKFEEL 0
#define LOOKFEEL_STRING @"--laf"
NSString *look_and_feels[]={@"apple.laf.AquaLookAndFeel",@"javax.swing.plaf.metal.MetalLookAndFeel"};
NSString *look_and_feels[]={@"com.apple.laf.AquaLookAndFeel",@"javax.swing.plaf.metal.MetalLookAndFeel"};

#define DEFAULT_USERDIR @""
#define USERDIR_STRING @"--userdir"
Expand Down
2 changes: 1 addition & 1 deletion nbi/engine/src/org/netbeans/installer/utils/UiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ public enum LookAndFeelType {
MOTIF("motif", "Motif", "com.sun.java.swing.plaf.motif.MotifLookAndFeel"),
GTK("gtk", "GTK", "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"),
METAL("metal", "Metal", "javax.swing.plaf.metal.MetalLookAndFeel"),
AQUA("aqua", "Aqua", "apple.laf.AquaLookAndFeel"),
AQUA("aqua", "Aqua", "com.apple.laf.AquaLookAndFeel"),
NIMBUS("nimbus", "Nimbus", "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"),
DEFAULT("default", null, null);

Expand Down
2 changes: 1 addition & 1 deletion o.n.swing.plaf/src/org/netbeans/swing/plaf/Startup.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private static String defaultLaF() {
if (isWindows()) {
uiClassName = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; //NOI18N
} else if (isMac()) {
uiClassName = "apple.laf.AquaLookAndFeel";
uiClassName = "com.apple.laf.AquaLookAndFeel";
} else if (shouldUseMetal()) {
uiClassName = "javax.swing.plaf.metal.MetalLookAndFeel"; //NOI18N
} else {
Expand Down
2 changes: 1 addition & 1 deletion o.n.upgrader/src/org/netbeans/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void setDefaultLookAndFeel () {
if (Utilities.isWindows()) {
uiClassName = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; //NOI18N
} else if (Utilities.isMac()) {
uiClassName = "apple.laf.AquaLookAndFeel"; //NOI18N
uiClassName = "com.apple.laf.AquaLookAndFeel"; //NOI18N
} else if (Utilities.isUnix()) {
uiClassName = "javax.swing.plaf.metal.MetalLookAndFeel"; //NOI18N
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ static int getSavedSortOrder() {
* cell and its text. The default is 2, or it can be customized via the
* UIManager integer key netbeans.ps.textMargin */
static int getTextMargin() {
if ("apple.laf.AquaLookAndFeel".equals(UIManager.getLookAndFeel().getClass().getName())) {
if ("com.apple.laf.AquaLookAndFeel".equals(UIManager.getLookAndFeel().getClass().getName())) {
return 0;
}

Expand Down

0 comments on commit cb50f33

Please sign in to comment.