Skip to content

Commit 83f724d

Browse files
committed
Turned off the use of Quaqua in Mac OS (it is no longer being developed and has issues in Java 10).
1 parent e38b662 commit 83f724d

File tree

5 files changed

+57
-51
lines changed

5 files changed

+57
-51
lines changed

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
<property name="version" value="1.9"/>
321321
-->
322322
<property name="version" value="1.10.1"/>
323-
<property name="jvm_version" value="1.6+"/>
323+
<property name="jvm_version" value="1.7+"/>
324324

325325
<property name="version_number" value="1.10.1"/>
326326
<property name="copyright" value="Copyright 2002-2018"/>

release/Mac/lib/libquaqua64.dylib

-85.6 KB
Binary file not shown.

release/Mac/lib/libquaqua64.jnilib

-85.6 KB
Binary file not shown.

release/Mac/lib/quaqua.jar

-2.29 MB
Binary file not shown.

src/dr/app/beauti/BeautiApp.java

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -170,58 +170,64 @@ static public void main(String[] args) {
170170
System.setProperty("swing.aatext", "true");
171171

172172
System.setProperty("apple.awt.graphics.UseQuartz", "true");
173-
System.setProperty("apple.awt.antialiasing","true");
174-
System.setProperty("apple.awt.rendering","VALUE_RENDER_QUALITY");
175-
176-
System.setProperty("apple.laf.useScreenMenuBar","true");
177-
System.setProperty("apple.awt.draggableWindowBackground","true");
178-
System.setProperty("apple.awt.showGrowBox","true");
179-
180-
try {
181-
// set the Quaqua Look and Feel in the UIManager
182-
javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
183-
public void run() {
184-
try {
185-
System.setProperty(
186-
"Quaqua.design","Sierra"
187-
);
173+
System.setProperty("apple.awt.antialiasing", "true");
174+
System.setProperty("apple.awt.rendering", "VALUE_RENDER_QUALITY");
188175

189-
try {
190-
// We need to do this using dynamic class loading to avoid other platforms
191-
// having to link to this class. If the Quaqua library is not on the classpath
192-
// it simply won't be used.
193-
Class<?> qm = Class.forName("ch.randelshofer.quaqua.QuaquaManager");
194-
//
195-
// Method method = qm.getMethod("setIncludedUIs", Set.class);
196-
// Set<String> includes = new HashSet<String>();
197-
// includes.add("ColorChooser");
198-
// includes.add("FileChooser");
199-
// includes.add("Button");
200-
// includes.add("SplitPane");
201-
// includes.add("Table");
202-
// includes.add("Panel");
203-
// method.invoke(null, includes);
204-
205-
Method method = qm.getMethod("setExcludedUIs", Set.class);
206-
Set<String> excludes = new HashSet<String>();
207-
excludes.add("RootPane");
208-
// excludes.add("Table");
209-
excludes.add("TextField");
210-
method.invoke(null, excludes);
211-
212-
}
213-
catch (Throwable e) {
214-
}
176+
System.setProperty("apple.laf.useScreenMenuBar", "true");
177+
System.setProperty("apple.awt.draggableWindowBackground", "true");
178+
System.setProperty("apple.awt.showGrowBox", "true");
215179

216-
//set the Quaqua Look and Feel in the UIManager
217-
UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");
218-
lafLoaded = true;
219-
} catch (Exception e) {
220-
}
221-
}
222-
});
223-
} catch (Exception e) {
224-
}
180+
// int javaVersion = Integer.parseInt(System.getProperty("java.version").split("\\.")[0]);
181+
//
182+
// System.out.println("Java version: " + javaVersion);
183+
//
184+
//
185+
// if (javaVersion < 10) {
186+
// try {
187+
// // set the Quaqua Look and Feel in the UIManager
188+
// javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
189+
// public void run() {
190+
// try {
191+
// System.setProperty(
192+
// "Quaqua.design", "Sierra"
193+
// );
194+
//
195+
// try {
196+
// // We need to do this using dynamic class loading to avoid other platforms
197+
// // having to link to this class. If the Quaqua library is not on the classpath
198+
// // it simply won't be used.
199+
// Class<?> qm = Class.forName("ch.randelshofer.quaqua.QuaquaManager");
200+
//
201+
//// Method method = qm.getMethod("setIncludedUIs", Set.class);
202+
//// Set<String> includes = new HashSet<String>();
203+
////// includes.add("ColorChooser");
204+
////// includes.add("FileChooser");
205+
//// includes.add("Button");
206+
//// includes.add("SplitPane");
207+
//// includes.add("Table");
208+
//// includes.add("Panel");
209+
//// method.invoke(null, includes);
210+
//
211+
// Method method = qm.getMethod("setExcludedUIs", Set.class);
212+
// Set<String> excludes = new HashSet<String>();
213+
// excludes.add("RootPane");
214+
//// excludes.add("Table");
215+
// excludes.add("TextField");
216+
// method.invoke(null, excludes);
217+
//
218+
// } catch (Throwable e) {
219+
// }
220+
//
221+
// //set the Quaqua Look and Feel in the UIManager
222+
// UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");
223+
// lafLoaded = true;
224+
// } catch (Exception e) {
225+
// }
226+
// }
227+
// });
228+
// } catch (Exception e) {
229+
// }
230+
// }
225231

226232
UIManager.put("SystemFont", new Font("Lucida Grande", Font.PLAIN, 13));
227233
UIManager.put("SmallSystemFont", new Font("Lucida Grande", Font.PLAIN, 11));

0 commit comments

Comments
 (0)