This project has retired. For details please refer to its
Attic page.
Workbench xref
1/*2 * Licensed to the Apache Software Foundation (ASF) under one3 * or more contributor license agreements. See the NOTICE file4 * distributed with this work for additional information5 * regarding copyright ownership. The ASF licenses this file6 * to you under the Apache License, Version 2.0 (the7 * "License"); you may not use this file except in compliance8 * with the License. You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing,13 * software distributed under the License is distributed on an14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY15 * KIND, either express or implied. See the License for the16 * specific language governing permissions and limitations17 * under the License.18 */19package org.apache.chemistry.opencmis.workbench;
2021import java.lang.reflect.InvocationTargetException;
22import java.net.Authenticator;
2324import javax.swing.JDialog;
25import javax.swing.JFrame;
26import javax.swing.UIManager;
27import javax.swing.UIManager.LookAndFeelInfo;
2829publicclassWorkbench {
3031publicWorkbench() throws InterruptedException, InvocationTargetException {
32// turn off existing Authenticators (-> Web Start)33 Authenticator.setDefault(null);
3435// set up Swing36try {
37boolean nimbus = false;
3839for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
40if ("Nimbus".equals(info.getName())) {
41 UIManager.setLookAndFeel(info.getClassName());
42 nimbus = true;
43break;
44 }
45 }
4647if (!nimbus) {
48 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
49 }
50 } catch (Exception e) {
51 e.printStackTrace();
52 }
5354 JFrame.setDefaultLookAndFeelDecorated(true);
55 JDialog.setDefaultLookAndFeelDecorated(true);
5657// show client frame58 javax.swing.SwingUtilities.invokeLater(new Runnable() {
59publicvoid run() {
60newClientFrame();
61 }
62 });
63 }
6465publicstaticvoid main(String[] args) throws Exception {
66newWorkbench();
67 }
68 }