Package net.sf.jiga.xtended.ui

Examples of net.sf.jiga.xtended.ui.UIMessage


                JTable table = new JTable(row, v);
                table.getColumn("property").setCellRenderer(JXAenvUtils2._getNewToolTipTableCellRenderer());
                table.getColumn("property value").setCellRenderer(JXAenvUtils2._getNewToolTipTableCellRenderer());
                JScrollPane sp = new JScrollPane(table);
                sp.setPreferredSize(new Dimension(300, 150));
                new UIMessage(false, sp, null);
            }
        });
        menu.add(menuItem);
        menuItem = new JMenuItem(new AbstractAction("Customize") {
View Full Code Here


            for (StackTraceElement ste : throwable.getCause().getStackTrace()) {
                stack_c += "\n" + ste;
            }
        }
        String msg = "an unexpected exception has been caught : " + throwable.getClass().getName() + " : " + throwable.getMessage() + " \n\r" + stack + " \n in Thread " + thread.getName() + ((throwable.getCause() instanceof Throwable) ? (" caused by : " + throwable.getCause().getClass().getName() + " : " + throwable.getCause().getMessage() + "\n\r" + stack_c) : "");
        currentMessage = new UIMessage(
                modal,
                previousMessage += msg,
                null,
                UIMessage.ERROR_TYPE);
    }
View Full Code Here

                for (StringBuffer helpLine : ModelAnimBrowser.help) {
                    msg += "<br>" + helpLine;
                }
                msg += "</html>";
                menu.setVisible(false);
                new UIMessage(false, new JLabel(msg), null);
            }
        });
        menu.add(new AbstractAction("reset collision Def (green)") {

            public void actionPerformed(ActionEvent e) {
View Full Code Here

     */
    public Object loadResource() {
        Object returnVal = null;
        boolean validModel = true;
        if (model instanceof XtendedModel) {
            new UIMessage(true, new JLabel("WARNING ! XtendedModel's (.mcx) are not allowed to be used in a Java2D context, only OpenGL/LWJGL context can use them."), null, UIMessage.ERROR_TYPE);
            returnVal = validModel = false;
        }
        if (validModel && UIMessage.showConfirmDialog(this, "Do you wish to browse the current imported model " + (model.isLoaded() ? "" : "and load it (it is currently not loaded in cache and that can take a while) ") + "?", "imported model found", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION) {
            if (isResourceLoaded()) {
                clearResource();
View Full Code Here

            }
            String stackTrace = "";
            for (StackTraceElement ste : ex2.getStackTrace()) {
                stackTrace += "\n" + ste.toString();
            }
            new UIMessage(true, mc3.getClass().getName() + " may not be stored to " + filename + " ! error: " + ex2.getMessage() + stackTrace, null, UIMessage.ERROR_TYPE);
            interrupt_ = true;
        } finally {
            UIMessage.kill(wait);
            /*
             * the model should have been stored so we try to recover it from path
             */
            mc3 = _importModel(temp.getPath());
            if (mc3 instanceof Model) {
                if (temp instanceof File) {
                    try {
                        RandomAccessFile rafTemp = new RandomAccessFile(temp, "r");
                        RandomAccessFile raf = new RandomAccessFile(filename, "rw");
                        raf.setLength(temp.length());
                        byte[] b = new byte[512];
                        int rBytes = 0;
                        while ((rBytes = rafTemp.read(b)) != -1) {
                            raf.write(b, 0, rBytes);
                        }
                        raf.close();
                        rafTemp.close();
                        new UIMessage(true, mc3.getClass().getName() + "'s been successfully stored to " + filename + " !", null, UIMessage.MODEL_TYPE);
                    } catch (IOException ex) {
                        if (DebugMap._getInstance().isDebuggerEnabled(Model.class)) {
                            ex.printStackTrace();
                        }
                        new UIMessage(true, mc3.getClass().getName() + " may not be stored to " + filename + " ! error: " + ex.getMessage(), null, UIMessage.ERROR_TYPE);
                        return false;
                    }
                }
            } else {
                return false;
View Full Code Here

            }
            t = ex;
        } finally {
            UIMessage.kill(wait);
            if (mc3 instanceof Model) {
                new UIMessage(true, "Model fully loaded ! " + mc3, null, UIMessage.MODEL_TYPE);
                return mc3;
            } else {
                new UIMessage(true, "Error on loading ! " + filename + " -" + t, null, UIMessage.ERROR_TYPE);
                return null;
            }
        }
    }
View Full Code Here

                                                }
                                        } catch (IllegalArgumentException ex) {
                                                if (DebugMap._getInstance().isDebugLevelEnabled(DBUG_RENDER)) {
                                                        ex.printStackTrace();
                                                }
                                                new UIMessage(true, ex, null);
                                        } finally {
                                                /*
                                                 * fix for mac os x
                                                 */
                                                setPreferredSize(new Dimension(displayMode.getWidth(), displayMode.getHeight()));
                                                frame.setSize(getPreferredSize());
                                                frame.setResizable(false);
                                                frame.pack();
                                                frame.setExtendedState(frame.MAXIMIZED_BOTH);
                                        }
                                } else {
                                        try {
                                                org.lwjgl.opengl.Display.setFullscreen(true);
                                        } catch (LWJGLException ex) {
                                                if (DebugMap._getInstance().isDebugLevelEnabled(DBUG_RENDER)) {
                                                        ex.printStackTrace();
                                                }
                                                new UIMessage(true, ex, null);
                                        }
                                }
                        }
                }
                resume();
View Full Code Here

TOP

Related Classes of net.sf.jiga.xtended.ui.UIMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.