Example usage for java.awt Cursor DEFAULT_CURSOR

List of usage examples for java.awt Cursor DEFAULT_CURSOR

Introduction

In this page you can find the example usage for java.awt Cursor DEFAULT_CURSOR.

Prototype

int DEFAULT_CURSOR

To view the source code for java.awt Cursor DEFAULT_CURSOR.

Click Source Link

Document

The default cursor type (gets set if no cursor is defined).

Usage

From source file:simMPLS.ui.simulator.JVentanaHija.java

/** Este mtodo se ejecuta cuando se mueve el ratn dentro del rea de simulacin ,
 * en la pantalla de simulacin. Entre otras cosas, cambia el cursor del ratn al pasar
 * sobre un elemento, permite mostrar mens emergentes coherentes con el contexto
 * de donde se encuentra el ratn, etctera.
 * This method is executed when the rapn moves into the area of simulation, on screen 
 * simulation. Among other things, changes the mouse cursor to pass * on an item, can display pop mens consistent with the context 
 * of where the mouse, etcetera is.//from  ww w .  j av a 2 s  .c  o m
 * @since 1.0
 * @param evt El evento que hace que se dispare este mtodo.
 */
private void ratonSobrePanelSimulacion(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ratonSobrePanelSimulacion
    TTopology topo = escenario.getTopology();
    TTopologyElement et = topo.obtenerElementoEnPosicion(evt.getPoint());
    if (et != null) {
        this.setCursor(new Cursor(Cursor.HAND_CURSOR));
        if (et.getElementType() == TTopologyElement.NODO) {
            TNode nt = (TNode) et;
            if (nt.getPorts().isArtificiallyCongested()) {
                panelSimulacion.setToolTipText(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                        .getString("JVentanaHija.Congestion")
                        + nt.getPorts().getCongestionLevel()
                        + java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                                .getString("JVentanaHija.POrcentaje")
                        + java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                                .getString("VentanaHija.paraDejarDeCongestionar"));
            } else {
                panelSimulacion.setToolTipText(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                        .getString("JVentanaHija.Congestion")
                        + nt.getPorts().getCongestionLevel()
                        + java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                                .getString("JVentanaHija.POrcentaje")
                        + java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                                .getString("VentanaHija.paraCongestionar"));
            }
        } else if (et.getElementType() == TTopologyElement.LINK) {
            TLink ent = (TLink) et;
            if (ent.isBroken()) {
                panelSimulacion.setToolTipText(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                        .getString("JVentanaHija.EnlaceRoto"));
            } else {
                panelSimulacion.setToolTipText(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                        .getString("JVentanaHija.EnlaceFuncionando"));
            }
        }
    } else {
        this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        this.panelSimulacion.setToolTipText(null);
        if (!this.panelSimulacion.obtenerMostrarLeyenda()) {
            this.panelSimulacion.setToolTipText(java.util.ResourceBundle
                    .getBundle("simMPLS/lenguajes/lenguajes").getString("JVentanaHija.VerLeyenda"));
        } else {
            this.panelSimulacion.setToolTipText(java.util.ResourceBundle
                    .getBundle("simMPLS/lenguajes/lenguajes").getString("JVentanaHija.OcultarLeyenda"));
        }
    }
}

From source file:simMPLS.ui.simulator.JVentanaHija.java

/** Este mtodo se ejecuta cuando se mueve el ratn dentro del rea de diseo,
 * en la pantalla de Diseo. Entre otras cosas, cambia el cursor del ratn al pasar
 * sobre un elemento, permite mostrar mens emergentes coherentes con el contexto
 * de donde se encuentra el ratn, etctera.
 * @since 1.0//from w w w .j a  v a2s .  c  o m
 * @param evt Evento que hace que se dispare este mtodo.
 */
private void ratonSobrePanelDisenio(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ratonSobrePanelDisenio
    TTopology topo = escenario.getTopology();
    TTopologyElement et = topo.obtenerElementoEnPosicion(evt.getPoint());
    if (et != null) {
        this.setCursor(new Cursor(Cursor.HAND_CURSOR));
        if (et.getElementType() == TTopologyElement.NODO) {
            TNode nt = (TNode) et;
            panelDisenio.setToolTipText(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                    .getString("JVentanaHija.PanelDisenio.IP") + nt.getIPAddress());
        } else if (et.getElementType() == TTopologyElement.LINK) {
            TLink ent = (TLink) et;
            panelDisenio.setToolTipText(java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                    .getString("JVentanaHija.panelDisenio.Retardo") + ent.obtenerDelay()
                    + java.util.ResourceBundle.getBundle("simMPLS/lenguajes/lenguajes")
                            .getString("JVentanaHija.panelDisenio.ns"));
        }
    } else {
        this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        panelDisenio.setToolTipText(null);
    }
}

From source file:edu.harvard.i2b2.patientSet.ui.PatientSetJPanel.java

@SuppressWarnings("rawtypes")
public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equalsIgnoreCase("Rename ...")) {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) jTree1.getSelectionPath().getLastPathComponent();
        if (node.getUserObject().getClass().getSimpleName().equalsIgnoreCase("QueryMasterData")) {

            QueryMasterData ndata = (QueryMasterData) node.getUserObject();
            Object inputValue = JOptionPane.showInputDialog(this, "Rename this query to: ",
                    "Rename Query Dialog", JOptionPane.PLAIN_MESSAGE, null, null,
                    ndata.name().substring(0, ndata.name().indexOf("[") - 1));

            if (inputValue != null) {
                String newQueryName = (String) inputValue;
                String requestXml = ndata.writeRenameQueryXML(newQueryName);

                setCursor(new Cursor(Cursor.WAIT_CURSOR));

                String response = null;
                if (System.getProperty("webServiceMethod").equals("SOAP")) {
                    // TO DO
                    // response =
                    // QueryListNamesClient.sendQueryRequestSOAP(requestXml);
                } else {
                    response = QueryListNamesClient.sendQueryRequestREST(requestXml, true);
                }/*from w w w  . j  av  a 2  s. c o m*/

                if (response.equalsIgnoreCase("CellDown")) {
                    final JPanel parent = this;
                    java.awt.EventQueue.invokeLater(new Runnable() {
                        public void run() {
                            JOptionPane.showMessageDialog(parent,
                                    "Trouble with connection to the remote server, "
                                            + "this is often a network error, please try again",
                                    "Network Error", JOptionPane.INFORMATION_MESSAGE);
                        }
                    });
                    setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                    return;
                }

                if (response != null) {
                    JAXBUtil jaxbUtil = PatientSetJAXBUtil.getJAXBUtil();

                    try {
                        JAXBElement jaxbElement = jaxbUtil.unMashallFromString(response);
                        ResponseMessageType messageType = (ResponseMessageType) jaxbElement.getValue();
                        StatusType statusType = messageType.getResponseHeader().getResultStatus().getStatus();
                        String status = statusType.getType();

                        if (status.equalsIgnoreCase("DONE")) {
                            // XMLGregorianCalendar cldr =
                            // //queryMasterType.getCreateDate();
                            Calendar cldr = Calendar.getInstance(Locale.getDefault());
                            ndata.name(newQueryName + " [" + addZero(cldr.get(Calendar.MONTH) + 1) + "-"
                                    + addZero(cldr.get(Calendar.DAY_OF_MONTH)) + "-"
                                    + addZero(cldr.get(Calendar.YEAR)) + " ]" + " [" + ndata.userId() + "]");
                            // ndata.name(newQueryName + " [" +
                            // ndata.userId()
                            // + "]");
                            node.setUserObject(ndata);
                            // DefaultMutableTreeNode parent =
                            // (DefaultMutableTreeNode) node.getParent();

                            jTree1.repaint();
                        }
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                }
            }
        } else if (node.getUserObject().getClass().getSimpleName().equalsIgnoreCase("QueryResultData")) {

            QueryResultData rdata = (QueryResultData) node.getUserObject();
            // if(!rdata.type().equalsIgnoreCase("PatientSet")) {
            // return;
            // }

            Object inputValue1 = JOptionPane.showInputDialog(this, "Rename this to: ", "Renaming Dialog",
                    JOptionPane.PLAIN_MESSAGE, null, null, rdata.name());
            // .substring(0, rdata.name().lastIndexOf("[") - 1));

            if (inputValue1 != null) {
                String newQueryName = (String) inputValue1;
                String requestXml = rdata.writeRenameQueryXML(newQueryName);

                setCursor(new Cursor(Cursor.WAIT_CURSOR));

                String response = null;
                if (System.getProperty("webServiceMethod").equals("SOAP")) {
                    // TO DO
                    // response =
                    // QueryListNamesClient.sendQueryRequestSOAP(requestXml);
                } else {
                    response = QueryListNamesClient.sendQueryRequestREST(requestXml, true);
                }

                if (response.equalsIgnoreCase("CellDown")) {
                    final JPanel parent = this;
                    java.awt.EventQueue.invokeLater(new Runnable() {
                        public void run() {
                            JOptionPane.showMessageDialog(parent,
                                    "Trouble with connection to the remote server, "
                                            + "this is often a network error, please try again",
                                    "Network Error", JOptionPane.INFORMATION_MESSAGE);

                        }
                    });
                    setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                    return;
                }

                if (response != null) {
                    JAXBUtil jaxbUtil = PatientSetJAXBUtil.getJAXBUtil();

                    try {
                        JAXBElement jaxbElement = jaxbUtil.unMashallFromString(response);
                        ResponseMessageType messageType = (ResponseMessageType) jaxbElement.getValue();
                        StatusType statusType = messageType.getResponseHeader().getResultStatus().getStatus();
                        String status = statusType.getType();

                        if (status.equalsIgnoreCase("DONE")) {
                            rdata.name(newQueryName);// + " [" +
                            // rdata.userId()
                            // + "]");
                            node.setUserObject(rdata);
                            // DefaultMutableTreeNode parent =
                            // (DefaultMutableTreeNode) node.getParent();

                            jTree1.repaint();
                        } else {
                            final String tmp = response;
                            final JPanel parent = this;
                            java.awt.EventQueue.invokeLater(new Runnable() {
                                public void run() {
                                    JOptionPane.showMessageDialog(parent,
                                            "Error message delivered from the remote server, "
                                                    + "you may wish to retry your last action",
                                            "Server Error", JOptionPane.INFORMATION_MESSAGE);
                                    log.error(tmp);
                                    setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                                }

                            });

                            return;
                        }
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                }
            }
        }
        setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    } else if (e.getActionCommand().equalsIgnoreCase("Cancel")) {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) jTree1.getSelectionPath().getLastPathComponent();
        if (node.getUserObject().getClass().getSimpleName().equalsIgnoreCase("QueryMasterData")) {
            DefaultMutableTreeNode node1 = (DefaultMutableTreeNode) node.getFirstChild();
            if (node1.getUserObject().getClass().getSimpleName().equalsIgnoreCase("QueryMasterData")) {
                final JPanel parent = this;
                java.awt.EventQueue.invokeLater(new Runnable() {
                    public void run() {
                        JOptionPane.showMessageDialog(parent, "Please expand this node then try to cancel it.",
                                "Message", JOptionPane.INFORMATION_MESSAGE);

                    }
                });
                return;
            }
            QueryInstanceData rdata = (QueryInstanceData) node1.getUserObject();

            String requestXml = rdata.writeCancelQueryXML();

            setCursor(new Cursor(Cursor.WAIT_CURSOR));

            String response = null;
            if (System.getProperty("webServiceMethod").equals("SOAP")) {
                // TO DO
                // response =
                // QueryListNamesClient.sendQueryRequestSOAP(requestXml);
            } else {
                response = QueryListNamesClient.sendQueryRequestREST(requestXml, true);
            }

            if (response.equalsIgnoreCase("CellDown")) {
                final JPanel parent = this;
                java.awt.EventQueue.invokeLater(new Runnable() {
                    public void run() {
                        JOptionPane.showMessageDialog(parent,
                                "Trouble with connection to the remote server, "
                                        + "this is often a network error, please try again",
                                "Network Error", JOptionPane.INFORMATION_MESSAGE);

                    }
                });
                setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                return;
            }

            if (response != null) {
                JAXBUtil jaxbUtil = PatientSetJAXBUtil.getJAXBUtil();

                try {
                    JAXBElement jaxbElement = jaxbUtil.unMashallFromString(response);
                    ResponseMessageType messageType = (ResponseMessageType) jaxbElement.getValue();
                    StatusType statusType = messageType.getResponseHeader().getResultStatus().getStatus();
                    String status = statusType.getType();
                    final JPanel parent = this;
                    if (status.equalsIgnoreCase("DONE")) {
                        java.awt.EventQueue.invokeLater(new Runnable() {
                            public void run() {
                                JOptionPane.showMessageDialog(parent, "The query is finished.", "Message",
                                        JOptionPane.INFORMATION_MESSAGE);
                                // log.error(tmp);
                                setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                            }

                        });
                        rdata.name(rdata.name().substring(0, rdata.name().indexOf("-")));// + " [" +
                        // rdata
                        // .userId()
                        // + "]");
                        node.setUserObject(rdata);
                        // DefaultMutableTreeNode parent =
                        // (DefaultMutableTreeNode) node.getParent();

                        jTree1.repaint();
                    } else {
                        final String tmp = response;
                        // final JPanel parent = this;
                        java.awt.EventQueue.invokeLater(new Runnable() {
                            public void run() {
                                JOptionPane.showMessageDialog(parent,
                                        "Error message delivered from the remote server, "
                                                + "you may wish to retry your last action",
                                        "Server Error", JOptionPane.INFORMATION_MESSAGE);
                                log.error(tmp);
                                setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                            }

                        });

                        return;
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                // }
            }
        } else if (node.getUserObject().getClass().getSimpleName().equalsIgnoreCase("QueryInstanceData")) {

            QueryInstanceData rdata = (QueryInstanceData) node.getUserObject();

            String requestXml = rdata.writeCancelQueryXML();

            setCursor(new Cursor(Cursor.WAIT_CURSOR));

            String response = null;
            if (System.getProperty("webServiceMethod").equals("SOAP")) {
                // TO DO
                // response =
                // QueryListNamesClient.sendQueryRequestSOAP(requestXml);
            } else {
                response = QueryListNamesClient.sendQueryRequestREST(requestXml, true);
            }

            if (response.equalsIgnoreCase("CellDown")) {
                final JPanel parent = this;
                java.awt.EventQueue.invokeLater(new Runnable() {
                    public void run() {
                        JOptionPane.showMessageDialog(parent,
                                "Trouble with connection to the remote server, "
                                        + "this is often a network error, please try again",
                                "Network Error", JOptionPane.INFORMATION_MESSAGE);

                    }
                });
                setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                return;
            }

            if (response != null) {
                JAXBUtil jaxbUtil = PatientSetJAXBUtil.getJAXBUtil();

                try {
                    JAXBElement jaxbElement = jaxbUtil.unMashallFromString(response);
                    ResponseMessageType messageType = (ResponseMessageType) jaxbElement.getValue();
                    StatusType statusType = messageType.getResponseHeader().getResultStatus().getStatus();
                    String status = statusType.getType();
                    final JPanel parent = this;
                    if (status.equalsIgnoreCase("DONE")) {
                        java.awt.EventQueue.invokeLater(new Runnable() {
                            public void run() {
                                JOptionPane.showMessageDialog(parent, "The query is finished.", "Message",
                                        JOptionPane.INFORMATION_MESSAGE);
                                // log.error(tmp);
                                setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                            }

                        });
                        rdata.name(rdata.name().substring(0, rdata.name().indexOf("-")));// + " [" +
                        // rdata
                        // .userId()
                        // + "]");
                        node.setUserObject(rdata);
                        // DefaultMutableTreeNode parent =
                        // (DefaultMutableTreeNode) node.getParent();

                        jTree1.repaint();
                    } else {
                        final String tmp = response;
                        // final JPanel parent = this;
                        java.awt.EventQueue.invokeLater(new Runnable() {
                            public void run() {
                                JOptionPane.showMessageDialog(parent,
                                        "Error message delivered from the remote server, "
                                                + "you may wish to retry your last action",
                                        "Server Error", JOptionPane.INFORMATION_MESSAGE);
                                log.error(tmp);
                                setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                            }

                        });

                        return;
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                // }
            }
        } else {
            final JPanel parent = this;
            java.awt.EventQueue.invokeLater(new Runnable() {

                public void run() {
                    JOptionPane.showMessageDialog(parent, "Cancel action is not supported on this level",
                            "Message", JOptionPane.INFORMATION_MESSAGE);
                    setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                }

            });
        }
        setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    } else if (e.getActionCommand().equalsIgnoreCase("Delete")) {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) jTree1.getSelectionPath().getLastPathComponent();
        QueryMasterData ndata = (QueryMasterData) node.getUserObject();
        Object selectedValue = JOptionPane.showConfirmDialog(this, "Delete Query \"" + ndata.name() + "\"?",
                "Delete Query Dialog", JOptionPane.YES_NO_OPTION);
        if (selectedValue.equals(JOptionPane.YES_OPTION)) {
            System.out.println("delete " + ndata.name());
            String requestXml = ndata.writeDeleteQueryXML();
            // System.out.println(requestXml);

            setCursor(new Cursor(Cursor.WAIT_CURSOR));

            String response = null;
            if (System.getProperty("webServiceMethod").equals("SOAP")) {
                // TO DO
                // response =
                // QueryListNamesClient.sendQueryRequestSOAP(requestXml);
            } else {
                response = QueryListNamesClient.sendQueryRequestREST(requestXml, true);
            }

            if (response.equalsIgnoreCase("CellDown")) {
                final JPanel parent = this;
                java.awt.EventQueue.invokeLater(new Runnable() {
                    public void run() {
                        JOptionPane.showMessageDialog(parent,
                                "Trouble with connection to the remote server, "
                                        + "this is often a network error, please try again",
                                "Network Error", JOptionPane.INFORMATION_MESSAGE);
                    }
                });
                setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                return;
            }

            if (response != null) {
                JAXBUtil jaxbUtil = PatientSetJAXBUtil.getJAXBUtil();

                try {
                    JAXBElement jaxbElement = jaxbUtil.unMashallFromString(response);
                    ResponseMessageType messageType = (ResponseMessageType) jaxbElement.getValue();
                    StatusType statusType = messageType.getResponseHeader().getResultStatus().getStatus();
                    String status = statusType.getType();

                    if (status.equalsIgnoreCase("DONE")) {
                        treeModel.removeNodeFromParent(node);

                        // jTree1.repaint();
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
            setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        }
    } else if (e.getActionCommand().equalsIgnoreCase("Refresh All")) {
        String status = "";
        if (isManager) {
            status = loadPreviousQueries(true);
        } else {
            status = loadPreviousQueries(false);
        }
        loadPatientSets();
        if (status.equalsIgnoreCase("")) {
            reset(200, false, false);
        } else if (status.equalsIgnoreCase("CellDown")) {
            final JPanel parent = this;
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JOptionPane.showMessageDialog(parent,
                            "Trouble with connection to the remote server, "
                                    + "this is often a network error, please try again",
                            "Network Error", JOptionPane.INFORMATION_MESSAGE);
                }
            });
        }
    }
}

From source file:com.mirth.connect.client.ui.browsers.message.MessageBrowser.java

private void formatCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {
    int row = getSelectedMessageIndex();

    if (row >= 0) {
        this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

        MessageBrowserTableNode messageNode = (MessageBrowserTableNode) messageTreeTable.getPathForRow(row)
                .getLastPathComponent();
        Long messageId = messageNode.getMessageId();
        Integer metaDataId = messageNode.getMetaDataId();

        Message message = messageCache.get(messageId);
        ConnectorMessage connectorMessage;

        connectorMessage = message.getConnectorMessages().get(metaDataId);

        updateDescriptionMessages(connectorMessage);

        this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    }/*  www .j a  v  a2  s .c o m*/
}

From source file:simMPLS.ui.simulator.JVentanaHija.java

/** Este mtodo se llama automticamente cuando el ratn sale del icono de
 * detener en la pantalla de simulacin./*from w ww . ja  va 2 s. c  o m*/
 * @since 1.0
 * @param evt El evento que hace que se dispare este mtodo.
 */
private void ratonSaleDelIconoPausar(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ratonSaleDelIconoPausar
    iconoPausar.setIcon(dispensadorDeImagenes.obtenerIcono(TImagesBroker.BOTON_PAUSA));
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}

From source file:simMPLS.ui.simulator.JVentanaHija.java

/** Este mtodo se llama automticamente cuando el ratn sale del icono de finalizar
 * en la pantalla de simulacin.//from www .  j  av a  2 s  .c om
 * @since 1.0
 * @param evt Evento que hace que se dispare este mtodo.
 */
private void ratonSaleDelIconoFinalizar(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ratonSaleDelIconoFinalizar
    iconoFinalizar.setIcon(dispensadorDeImagenes.obtenerIcono(TImagesBroker.BOTON_PARAR));
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}

From source file:stainingestimation.StainingEstimation.java

@Override
public void updateOptionsToTMAspot(TMAspot visible_TMAspot, List<TMAspot> selected_TMAspots) {
    if (isShowing()) {
        this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        updateOptionsToTMAspot(visible_TMAspot);
        this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    }/*  w w w.  j a va 2s .  c  o m*/
}

From source file:org.domainmath.gui.MainFrame.java

private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
    this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
    MainFrame.octavePanel.start();//from   w w w .  j  a v  a2  s  . co m

    DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM,
            Locale.getDefault());

    String t = "# -- " + formatter.format(new Date()) + " -- #";

    histArea.append(t + "\n");

    String path = Character.toString('"') + System.getProperty("user.dir") + File.separator + "scripts"
            + Character.toString('"');

    MainFrame.octavePanel.evaluate("addpath(genpath(" + path + "));savepath();");
    MainFrame.octavePanel.evaluate("DomainMath_OctavePaths('" + parent_root + "DomainMath_OctavePaths.dat');");

    MainFrame.octavePanel
            .evaluate("DomainMath_OctavePackages('" + parent_root + "DomainMath_OctavePackages.dat');");
    MainFrame.octavePanel
            .evaluate("DomainMath_OctaveVariables('" + parent_root + "DomainMath_OctaveVariables.dat',whos);");
    // MainFrame.workspace.reload();
    MainFrame.octavePanel
            .evaluate("DomainMath_OctaveConfig('" + parent_root + "DomainMath_OctaveConfig.dat');");

    String f = System.getProperty("user.dir") + File.separator + "cache" + File.separator + "pkg_list.xml";
    MainFrame.octavePanel.evaluate("DomainMath_PkgContents('" + f + "');");

    loadLayout();
    MainFrame.reloadWorkspace();
    loadPackageAuto();
    setDirComboContent();
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    new ModuleLoader().load(this, false);
    DMILogger.msg("DMI is Ready.");
}

From source file:simMPLS.ui.simulator.JVentanaHija.java

/** Este mtodo se llama automticamente cuando el ratn sale del icono de comenzar
 * en la pantalla de simulacin.//  w w w  .j av  a 2 s .c  om
 * @since 1.0
 * @param evt Evento que hace que se dispare este mtodo.
 */
private void ratonSaleDelIconoReanudar(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ratonSaleDelIconoReanudar
    iconoReanudar.setIcon(dispensadorDeImagenes.obtenerIcono(TImagesBroker.BOTON_COMENZAR));
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}

From source file:simMPLS.ui.simulator.JVentanaHija.java

/** Este mtodo se llama automticamente cuando el ratn sale del icono generar en la
 * pantalla de simulacin./*from w ww .j ava 2s . co  m*/
 * @since 1.0
 * @param evt Evento que hace que se dispare este mtodo.
 */
private void ratonSaleDelIconoComenzar(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ratonSaleDelIconoComenzar
    iconoComenzar.setIcon(dispensadorDeImagenes.obtenerIcono(TImagesBroker.BOTON_GENERAR));
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}