List of usage examples for javax.swing JFrame setDefaultLookAndFeelDecorated
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)
JFrame
s should have their Window decorations (such as borders, widgets to close the window, title...) provided by the current look and feel. From source file:ffx.ui.MainPanel.java
/** * <p>//from www . j a va2 s . c om * help</p> */ public void help() { String helpHS = "ffx/help/jhelpset.hs"; ClassLoader cl = getClass().getClassLoader(); HelpSet hs = null; try { URL hsURL = HelpSet.findHelpSet(cl, helpHS); hs = new HelpSet(null, hsURL); } catch (Exception e) { logger.warning("HelpSet not found: " + e); return; } JHelp jhelp = new JHelp(hs); JFrame helpFrame = new JFrame(); JFrame.setDefaultLookAndFeelDecorated(true); helpFrame.add(jhelp); helpFrame.setTitle("Force Field X Help"); helpFrame.setSize(jhelp.getPreferredSize()); helpFrame.setVisible(true); jhelp.setCurrentID("ForceFieldXBook"); helpFrame.toFront(); }
From source file:fedroot.dacs.swingdemo.DacsClientFrame.java
/** * Create and display the DACS Username Frame. For thread safety, * this method should be invoked from the * event-dispatching thread.//w w w . j a va 2s . co m */ private void createAndShowDacsNatFrame() { // use the tiddly window decorations. JFrame.setDefaultLookAndFeelDecorated(true); // Create and set up the window. DacsNatFrame natFrame = new DacsNatFrame(this.dacsClientContext); natFrame.setSize(750, 200); natFrame.setVisible(true); }
From source file:dk.dma.epd.shore.EPDShore.java
/** * Creates and shows the GUI//from ww w . j a va2 s .c o m */ private void createAndShowGUI() { // Set the look and feel. initLookAndFeel(); // Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(false); // Create and set up the main window mainFrame = new MainFrame(); mainFrame.setVisible(true); // Create the system tray systemTray = new SystemTrayCommon(); beanHandler.add(systemTray); // Create the notification center notificationCenter = new NotificationCenter(getMainFrame()); beanHandler.add(notificationCenter); }
From source file:TextComponentDemo.java
/** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. *//*from w ww . ja va2 s . com*/ private static void createAndShowGUI() { //Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(true); //Create and set up the window. final TextComponentDemo frame = new TextComponentDemo(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Display the window. frame.pack(); frame.setVisible(true); }
From source file:com.nikonhacker.gui.EmulatorUI.java
/** * Create the GUI and show it. For thread safety, * this method should be invoked from the * event-dispatching thread./* w w w. ja va 2 s .c om*/ */ private static void createAndShowGUI() { // Choose to keep Java-style for main window decorations. JFrame.setDefaultLookAndFeelDecorated(true); // Create and set up the window. EmulatorUI frame = new EmulatorUI(); // Display the window. frame.setVisible(true); }
From source file:dk.dma.epd.ship.EPDShip.java
void createAndShowGUI() { // Set the look and feel. initLookAndFeel();/*from w ww . j a v a 2 s . com*/ // Make sure we have nice window decorations. JFrame.setDefaultLookAndFeelDecorated(false); // Create and set up the main window mainFrame = new MainFrame(optionalTitle); mainFrame.setVisible(true); // Create the system tray systemTray = new SystemTrayCommon(); mapHandler.add(systemTray); // Create the notification center notificationCenter = new NotificationCenter(getMainFrame()); mapHandler.add(notificationCenter); // Create keybinding shortcuts makeKeyBindings(); }
From source file:edu.ku.brc.specify.BackupAndRestoreApp.java
/** * Tries to do the login, if doAutoLogin is set to true it will try without displaying a dialog * and if the login fails then it will display the dialog * @param userName single signon username (for application) * @param password single signon password (for application) * @param usrPwdProvider the provider//from w ww . j a v a 2s .c o m * @param engageUPPrefs indicates whether the username and password should be loaded and remembered by local prefs * @param doAutoLogin whether to try to automatically log the user in * @param doAutoClose whether it should automatically close the window when it is logged in successfully * @param useDialog use a Dialog or a Frame * @param listener a listener for when it is logged in or fails * @param iconName name of icon to use * @param title name * @param appName name * @param appIconName application icon name * @param helpContext help context for Help button on dialog */ public static DatabaseLoginPanel doLogin(final boolean engageUPPrefs, final MasterPasswordProviderIFace usrPwdProvider, final boolean doAutoClose, final DatabaseLoginListener listener, final String iconName, final String title, final String appName, final String appIconName, final String helpContext) //frame's icon name { ImageIcon icon = IconManager.getIcon("AppIcon", IconManager.IconSize.Std32); if (StringUtils.isNotEmpty(appIconName)) { ImageIcon imgIcon = IconManager.getIcon(appIconName); if (imgIcon != null) { icon = imgIcon; } } // else class DBListener implements DatabaseLoginListener { protected JFrame frame; protected DatabaseLoginListener frameDBListener; protected boolean doAutoCloseOfListener; public DBListener(JFrame frame, DatabaseLoginListener frameDBListener, boolean doAutoCloseOfListener) { this.frame = frame; this.frameDBListener = frameDBListener; this.doAutoCloseOfListener = doAutoCloseOfListener; } public void loggedIn(final Window window, final String databaseName, final String userNameArg) { log.debug("UIHelper.doLogin[DBListener]"); if (doAutoCloseOfListener) { frame.setVisible(false); } frameDBListener.loggedIn(window, databaseName, userNameArg); } public void cancelled() { frame.setVisible(false); frameDBListener.cancelled(); } } JFrame.setDefaultLookAndFeelDecorated(false); JFrame frame = new JFrame(title); DatabaseLoginPanel panel = new DatabaseLoginPanel(null, null, false, usrPwdProvider, new DBListener(frame, listener, doAutoClose), false, false, title, appName, iconName, helpContext); panel.setAutoClose(doAutoClose); panel.setWindow(frame); frame.setContentPane(panel); frame.setIconImage(icon.getImage()); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.pack(); UIHelper.centerAndShow(frame); return panel; }
From source file:com.github.lindenb.jvarkit.tools.bamviewgui.BamFileRef.java
@Override public Collection<Throwable> call() throws Exception { JFrame.setDefaultLookAndFeelDecorated(true); JDialog.setDefaultLookAndFeelDecorated(true); List<BamFileRef> bams = new ArrayList<BamFileRef>(); final List<String> args = getInputFiles(); List<File> IN = new ArrayList<File>(); if (args.isEmpty()) { LOG.info("NO BAM provided; Opening dialog"); JFileChooser chooser = new JFileChooser(); chooser.setFileFilter(new FileFilter() { @Override/* w w w . j av a 2 s.c om*/ public String getDescription() { return "Indexed BAM files."; } @Override public boolean accept(File f) { if (f.isDirectory()) return true; return acceptBam(f); }; }); chooser.setMultiSelectionEnabled(true); if (chooser.showOpenDialog(null) != JFileChooser.APPROVE_OPTION) { return wrapException("user pressed cancel"); } File fs[] = chooser.getSelectedFiles(); if (fs != null) IN.addAll(Arrays.asList(chooser.getSelectedFiles())); } else { for (String arg : args) { File filename = new File(arg); if (!acceptBam(filename)) { return wrapException( "Cannot use " + filename + " as input Bam. bad extenstion ? index missing ?"); } IN.add(filename); } } for (File in : IN) { try { bams.add(create(in)); } catch (Exception err) { return wrapException(err); } } if (bams.isEmpty()) { return wrapException("No Bam file"); } LOG.info("showing BAM frame"); final BamFrame frame = new BamFrame(bams); frame.igvIP = super.IGV_HOST; frame.igvPort = super.IGV_PORT; try { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); frame.setBounds(50, 50, screen.width - 100, screen.height - 100); frame.setVisible(true); } }); } catch (Exception err) { err.printStackTrace(); System.exit(-1); } return RETURN_OK; }
From source file:ffx.ui.MainPanel.java
/** * <p>//from w w w . ja va 2s . c o m * initialize</p> */ public void initialize() { if (init) { return; } init = true; String dir = System.getProperty("user.dir", FileSystemView.getFileSystemView().getDefaultDirectory().getAbsolutePath()); setCWD(new File(dir)); locale = new FFXLocale("en", "US"); JDialog splashScreen = null; ClassLoader loader = getClass().getClassLoader(); if (!GraphicsEnvironment.isHeadless()) { // Splash Screen JFrame.setDefaultLookAndFeelDecorated(true); splashScreen = new JDialog(frame, false); ImageIcon logo = new ImageIcon(loader.getResource("ffx/ui/icons/splash.png")); JLabel ffxLabel = new JLabel(logo); ffxLabel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED)); Container contentpane = splashScreen.getContentPane(); contentpane.setLayout(new BorderLayout()); contentpane.add(ffxLabel, BorderLayout.CENTER); splashScreen.setUndecorated(true); splashScreen.pack(); Dimension screenDimension = getToolkit().getScreenSize(); Dimension splashDimension = splashScreen.getSize(); splashScreen.setLocation((screenDimension.width - splashDimension.width) / 2, (screenDimension.height - splashDimension.height) / 2); splashScreen.setResizable(false); splashScreen.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); splashScreen.setVisible(true); // Make all pop-up Menus Heavyweight so they play nicely with Java3D JPopupMenu.setDefaultLightWeightPopupEnabled(false); } // Create the Root Node dataRoot = new MSRoot(); Border bb = BorderFactory.createEtchedBorder(EtchedBorder.RAISED); statusLabel = new JLabel(" "); JLabel stepLabel = new JLabel(" "); stepLabel.setHorizontalAlignment(JLabel.RIGHT); JLabel energyLabel = new JLabel(" "); energyLabel.setHorizontalAlignment(JLabel.RIGHT); JPanel statusPanel = new JPanel(new GridLayout(1, 3)); statusPanel.setBorder(bb); statusPanel.add(statusLabel); statusPanel.add(stepLabel); statusPanel.add(energyLabel); if (!GraphicsEnvironment.isHeadless()) { GraphicsConfigTemplate3D template3D = new GraphicsConfigTemplate3D(); template3D.setDoubleBuffer(GraphicsConfigTemplate.PREFERRED); GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice() .getBestConfiguration(template3D); graphicsCanvas = new GraphicsCanvas(gc, this); graphicsPanel = new GraphicsPanel(graphicsCanvas, statusPanel); } // Initialize various Panels hierarchy = new Hierarchy(this); hierarchy.setStatus(statusLabel, stepLabel, energyLabel); keywordPanel = new KeywordPanel(this); modelingPanel = new ModelingPanel(this); JPanel treePane = new JPanel(new BorderLayout()); JScrollPane scrollPane = new JScrollPane(hierarchy, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); treePane.add(scrollPane, BorderLayout.CENTER); tabbedPane = new JTabbedPane(); ImageIcon graphicsIcon = new ImageIcon(loader.getResource("ffx/ui/icons/monitor.png")); ImageIcon keywordIcon = new ImageIcon(loader.getResource("ffx/ui/icons/key.png")); ImageIcon modelingIcon = new ImageIcon(loader.getResource("ffx/ui/icons/cog.png")); tabbedPane.addTab(locale.getValue("Graphics"), graphicsIcon, graphicsPanel); tabbedPane.addTab(locale.getValue("KeywordEditor"), keywordIcon, keywordPanel); tabbedPane.addTab(locale.getValue("ModelingCommands"), modelingIcon, modelingPanel); tabbedPane.addChangeListener(this); splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, false, treePane, tabbedPane); /* splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, false, treePane, graphicsPanel); */ splitPane.setResizeWeight(0.25); splitPane.setOneTouchExpandable(true); setLayout(new BorderLayout()); add(splitPane, BorderLayout.CENTER); if (!GraphicsEnvironment.isHeadless()) { mainMenu = new MainMenu(this); add(mainMenu.getToolBar(), BorderLayout.NORTH); getModelingShell(); loadPrefs(); SwingUtilities.updateComponentTreeUI(SwingUtilities.getRoot(this)); splashScreen.dispose(); } }
From source file:com.lfv.lanzius.application.Controller.java
public synchronized void start() { try {/*from ww w .j av a 2 s . com*/ long t = System.currentTimeMillis(); while (!semStopFinished && (System.currentTimeMillis() < (t + TIMEOUT_STARTSTOP))) wait(100); } catch (InterruptedException ex) { } if (state == CLIENT_STATE_CONNECTED) { view = null; audioRecorder = null; log.info("Starting session"); radioState = RADIO_STATE_IDLE; phoneState = PHONE_STATE_IDLE; phoneActive = false; radioEncoding = false; radioDecoding = false; radioDecodingList.clear(); log.debug("Downloading data model for terminal " + properties.getTerminalId() + " from http://" + properties.getServerAddress() + ":" + properties.getServerHttpPort()); // Get configuration document from server String url = "http://" + properties.getServerAddress() + ":" + properties.getServerHttpPort() + "/xml/info?terminal=" + properties.getTerminalId(); try { SAXBuilder builder = new SAXBuilder(); if (Config.CLIENT_SERVERLESS) model = builder.build(new java.io.File("data/development/client_inforequest.xml")); else model = builder.build(new URL(url)); } catch (Exception ex) { log.error("Failed to get or parse the configuration document from " + url.toString(), ex); log.debug("Waiting for start session packet from server"); ex.printStackTrace(); return; } if (!validateModel()) { log.error("Invalid data model, validation failed!"); log.debug("Waiting for start session packet from server"); return; } // Document is valid state = CLIENT_STATE_STARTED; log.debug("Data model passed validation test"); // Add extra nodes model.getRootElement().addContent(new Element("TalkButton")); model.getRootElement().addContent(new Element("HookButton")); Element e1 = new Element("Settings"); Element e2 = new Element("Name"); e2.setText("SETTINGS"); e1.addContent(e2); e1.setAttribute("hfac", "0.4"); model.getRootElement().addContent(e1); // Inactivate all phone peers initially Iterator iter1 = model.getRootElement().getChild("RoleSetup").getChildren().iterator(); while (iter1.hasNext()) { Element er = (Element) iter1.next(); Iterator iter2 = er.getChild("PhonePeers").getChildren().iterator(); while (iter2.hasNext()) { Element err = (Element) iter2.next(); err.setAttribute("active", "false"); } } // Clear encoder = null; distributor = null; decoderPhone = null; decoderForward = null; monitorEncoder = null; monitorDistributor = null; // Get codec type String codec = DomTools.getChildText(model.getRootElement(), "Codec", "null", true); // Encoder if (codec.startsWith("jspeex")) { // Parse out the quality from the string "jspeex:<quality 1-10>" int quality = 6; int idx = codec.indexOf(':'); if (idx > 0) { try { quality = Integer.parseInt(codec.substring(idx + 1)); } catch (Exception ex) { log.warn("Parse error in string " + codec + ", should be \"jspeex:<quality 1-10>\", defaulting to 6!"); } if (quality < 1 || quality > 10) { log.warn("Out of range error in string " + codec + ", should be \"jspeex:<quality 1-10>\", defaulting to 6!"); quality = 6; } } encoder = new JSpeexEncoder(inputMixer, quality); monitorEncoder = new JSpeexEncoder(inputMixer, quality); } else { encoder = new NullEncoder(inputMixer); monitorEncoder = new NullEncoder(inputMixer); } // Main distributor distributor = new Distributor(properties.getTerminalId(), bundle, networkManager.getSender()); encoder.setPacketDistributor(distributor); // Monitor distributor monitorDistributor = new Distributor(properties.getTerminalId(), bundle, networkManager.getSender()); monitorEncoder.setPacketDistributor(monitorDistributor); // Start encoders AudioFormat audioFormats[] = encoder.getSupportedAudioFormats(); int usedAudioFormat = -1; // Find which audio format to use for (int i = 0; i < audioFormats.length; i++) { try { encoder.startModule(i); log.debug("Using input audio format " + audioFormats[i]); usedAudioFormat = i; break; } catch (Exception ex) { log.warn("Could not open the input device for format " + audioFormats[i] + "!"); } } if (usedAudioFormat < 0) { log.error("Unable to start, the input sound device is unavailable!"); stop(false, false); return; } MixingDataLine monitorDataLine = null; if (usedAudioFormat > 0) { log.warn("Unable to open the monitor data line, supports mono only!"); monitorEncoder = null; monitorDistributor = null; } else { // Create a mixing data line for the monitor monitorDataLine = new MixingDataLine(); try { // Start monitor encoder with the same format as the main encoder monitorEncoder.startModule(monitorDataLine, 0); } catch (Exception ex) { log.warn("Unable to open the monitor data line, monitoring has been disabled!", ex); monitorDataLine = null; monitorEncoder = null; monitorDistributor = null; } } // Pass a monitor channel to the encoder if (monitorDataLine != null) { encoder.setMonitorChannel(monitorDataLine.getMixerChannel()); } // Create decoders and packet dispatchers if (codec.startsWith("jspeex")) { decoderPhone = new JSpeexDecoder(outputMixer, CHANNEL_PHONE); decoderForward = new JSpeexDecoder(outputMixer, CHANNEL_FORWARD); } else { decoderPhone = new NullDecoder(outputMixer, CHANNEL_PHONE); decoderForward = new NullDecoder(outputMixer, CHANNEL_FORWARD); } // Add decoders as packet receiver handlers packetReceiver.addDataPacketDispatcher(CHANNEL_PHONE, decoderPhone); packetReceiver.addDataPacketDispatcher(CHANNEL_FORWARD, decoderForward); // Pass monitor channel to decoders if (monitorDataLine != null) { decoderPhone.setMonitorChannel(monitorDataLine.getMixerChannel()); decoderForward.setMonitorChannel(monitorDataLine.getMixerChannel()); } Iterator iter = model.getRootElement().getChild("ChannelSetup").getChildren().iterator(); while (iter.hasNext()) { Element ec = (Element) iter.next(); int channelId = DomTools.getAttributeInt(ec, "id", 0, true); if (channelId > 0) { AudioDecoder decoder; if (codec.startsWith("jspeex")) { decoder = new JSpeexDecoder(outputMixer, channelId); } else { decoder = new NullDecoder(outputMixer, channelId); } // Add decoder as packet receiver handler packetReceiver.addDataPacketDispatcher(channelId, decoder); // Pass monitor channel to decoder if (monitorDataLine != null) { decoder.setMonitorChannel(monitorDataLine.getMixerChannel()); } } } // Go through the decoders and create output lines for them audioFormats = null; usedAudioFormat = -1; iter = packetReceiver.getDataPacketDispatcherCollection().iterator(); while (iter.hasNext()) { AudioDecoder decoder = (AudioDecoder) iter.next(); // First iteration, find which audio format to use if (usedAudioFormat < 0) { audioFormats = decoder.getSupportedAudioFormats(); for (int i = 0; i < audioFormats.length; i++) { try { decoder.startModule(i); log.debug("Using output audio format " + audioFormats[i]); usedAudioFormat = i; break; } catch (Exception ex) { log.warn("Could not open the output device for format " + audioFormats[i] + "!"); } } if (usedAudioFormat < 0) { log.error("Unable to start, the output sound device is unavailable!"); stop(false, false); return; } } // The format to use is known, just start the module else { try { decoder.startModule(usedAudioFormat); } catch (LineUnavailableException ex) { log.error("Could not open the output device for format " + audioFormats[usedAudioFormat] + "!"); stop(false, false); return; } } // Add listeners for all radio // Also add to volume list if (decoder.getDecoderId() > CHANNEL_RADIO_START) { decoder.addListener(this); volumeRadioList.add(decoder); } } // Create a recorder audioRecorder = new AudioRecorder(audioFormats[usedAudioFormat], true); // Join channels Collection<Integer> c = new LinkedList<Integer>(); // Common bundle.addChannel(new ClientChannel(CHANNEL_COMMON)); c.add(CHANNEL_COMMON); iter = model.getRootElement().getChild("ChannelSetup").getChildren().iterator(); while (iter.hasNext()) { Element ec = (Element) iter.next(); int channelId = DomTools.getAttributeInt(ec, "id", 0, true); if (channelId > 0) { ClientChannel channel = new ClientChannel(channelId); bundle.addChannel(channel); c.add(channelId); // Also store the channel element.. channel.setElement(ec); // ..and the decoder for fast access AudioDecoder decoder = (AudioDecoder) packetReceiver.getDataPacketDispatcher(channelId); channel.setDecoder(decoder); // finally, add the recorder if the channel has recordable="true" if (DomTools.getAttributeBoolean(ec, "recordable", false, false)) { decoder.setAudioRecorder(audioRecorder); decoder.addListener(audioRecorder); // to get stop events for injecting silence } } } networkManager.sessionConnect(c); // Immediately open all channels with state rxtx or rx iter = bundle.getChannelCollection().iterator(); while (iter.hasNext()) { ClientChannel channel = (ClientChannel) iter.next(); if (!DomTools.getAttributeString(channel.getElement(), "state", "off", false).equals("off")) { packetReceiver.openChannel(channel.getId()); } } // Force all settings Settings settings = Settings.getInstance(); settingsValueChanged(Settings.ID_MASTER_VOLUME, settings.getMasterVolume()); settingsValueChanged(Settings.ID_SIGNAL_VOLUME, settings.getSignalVolume()); settingsValueChanged(Settings.ID_CHPRIO_VOLUME, settings.getChprioVolume()); settingsValueChanged(Settings.ID_RAPASS_VOLUME, settings.getRapassVolume()); settingsValueChanged(Settings.ID_CHPRIO_CHOICE, settings.getChprioChoice()); settingsValueChanged(Settings.ID_WATONE_CHOICE, settings.getWatoneChoice()); // Create view String style = properties.getUserInterfaceStyle().toLowerCase(); if (!(style.equals("full") || style.equals("slim-phone") || style.equals("slim-horiz") || style.equals("slim-vert") || style.equals("none"))) { log.warn("Invalid user interface style (" + style + ") defaulting to full!"); style = "full"; properties.setUserInterfaceStyle(style); } if (!Config.CLIENT_SIZE_FULLSCREEN || !style.equals("full")) JFrame.setDefaultLookAndFeelDecorated(true); log.debug("Creating view with style: " + style); if (properties.getUserInterfaceStyle().equalsIgnoreCase("full")) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { view = new FullView(Controller.getInstance(), properties); view.setModel(model); view.setVisible(true); view.toFront(); if (peripheralLink != null) peripheralLink.setView(view); } }); } else if (properties.getUserInterfaceStyle().equalsIgnoreCase("none")) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { view = new FullView(Controller.getInstance(), properties); view.setModel(model); view.setVisible(false); view.toFront(); if (peripheralLink != null) peripheralLink.setView(view); } }); } else if (properties.getUserInterfaceStyle().equalsIgnoreCase("slim-phone")) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { view = new PhoneOnlyView(Controller.getInstance(), properties); view.setModel(model); view.setVisible(true); view.toFront(); if (peripheralLink != null) peripheralLink.setView(view); } }); } else { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { view = new SlimView(Controller.getInstance(), properties); view.setModel(model); view.setVisible(true); view.toFront(); if (peripheralLink != null) peripheralLink.setView(view); } }); } // Start the push to talk interfaces if (properties.getEventDeviceName().length() > 0) { eventSwitch.start(); } if (properties.getFootSwitchInterface().length() > 0) { if (footSwitch != null) { try { footSwitch.start(); } catch (UnsatisfiedLinkError err) { log.error("UnsatisfiedLinkError: " + err.getMessage()); log.warn("Missing ftsw library (ftsw.dll or libftsw.so)"); if (!properties.getFootSwitchInterface().equalsIgnoreCase("ftdi")) log.warn("Missing rxtxSerial library (rxtxSerial.dll or librxtxSerial.so)"); log.warn("The footswitch has been disabled!"); footSwitch = null; } catch (NoClassDefFoundError err) { log.warn("Missing ftsw library (ftsw.dll or libftsw.so)"); if (!properties.getFootSwitchInterface().equalsIgnoreCase("ftdi")) log.warn("Missing rxtxSerial library (rxtxSerial.dll or librxtxSerial.so)"); log.warn("The footswitch has been disabled!"); footSwitch = null; } catch (NoSuchPortException ex) { log.warn("The serial port " + properties.getFootSwitchInterface() + " does not exist, the footswitch has been disabled!"); footSwitch = null; } catch (PortInUseException ex) { log.warn("The serial port " + properties.getFootSwitchInterface() + " is already in use, the footswitch has been disabled!"); footSwitch = null; } } } sleep(25); dbgListThreads(); // The system is not allowed to be stopped immediately after start if (timer != null) { semStartFinished = false; timer.schedule(new TimerTask() { public void run() { Controller c = Controller.getInstance(); synchronized (c) { semStartFinished = true; c.notifyAll(); } } }, DELAY_STARTSTOP); } if (autoTesterEnabled && autoTester != null) { autoTester.startTester(model); } } }