Examples of UIMessage


Examples of javax.faces.component.UIMessage

  }

  public void encodeEnd(FacesContext facesContext,
      UIComponent uiComponent) throws IOException {

    UIMessage component = (UIMessage) uiComponent;

    String clientId = ComponentUtil.findClientIdFor(component, facesContext);

    Iterator iterator = facesContext.getMessages(clientId);
View Full Code Here

Examples of javax.faces.component.UIMessage

     *
     *  @return  The newly created <code>UIMessage</code>.
     */
    public UIComponent create(FacesContext context, LayoutComponent descriptor, UIComponent parent) {
  // Create the UIComponent
  UIMessage comp = new UIMessage();

  // This needs to be done here (before setOptions) so that $...{...}
  // expressions can be resolved... may want to defer these?
  if (parent != null) {
      addChild(context, descriptor, parent, comp);
View Full Code Here

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

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

            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

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

                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

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

     */
    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

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

            }
            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

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

            }
            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

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

                                                }
                                        } 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

Examples of org.jboss.seam.mail.ui.UIMessage

          @Override
          protected void invokeApplication() throws Exception
          {
             UIAttachment attachment = new UIAttachment();
             attachment.setFileName("filename.pdf");
             UIMessage message = new UIMessage();
             attachment.setParent(message);
             message.setMailSession(MailSession.instance());
             DocumentData doc = new ByteArrayDocumentData("filename", new DocumentData.DocumentType("pdf", "application/pdf"), new byte[] {});
             attachment.setValue(doc);
             attachment.encodeEnd(FacesContext.getCurrentInstance());
            
             // verify we built the message
             Assert.assertEquals(message.getAttachments().size(), 1);
             MimeBodyPart bodyPart = message.getAttachments().get(0);
             Assert.assertEquals(bodyPart.getFileName(), "filename.pdf");
             Assert.assertEquals(bodyPart.getDisposition(),"attachment");
          }
       }.run();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.