Examples of ValidationEvent


Examples of com.wix.gui.utils.ValidationEvent

            }
        });
       
        try
        {
          fireValidationEvent(new ValidationEvent(InstallProgressPanel.this, false, false, false, false));
         
          t.start();
         
          if (InstallationWizard.CURRENT_OS == InstallationWizard.OS_WIN)
          {
            WindowsInstallerExec windowsInstallerExec = new WindowsInstallerExec(
                installationWizard.getConfig().getString("win.product.guid"),
                installationWizard.getJavaHome(),
                installationWizard.getInstallDir(),
                !installationWizard.areStartMenuShortcutsEnabled(),
                !installationWizard.areDesktopShortcutsEnabled(),
                installationWizard.getNotAssociatedExtensions());
           
            windowsInstallerExec.install();
           
            windowsInstallerExec.dispose();
           
            t.stop();
          }
          else if (InstallationWizard.CURRENT_OS == InstallationWizard.OS_UNIX)
          {
            UnixInstallerExec unixInstallerExec = new UnixInstallerExec(
                installationWizard.getJavaHome(),
                installationWizard.getInstallDir(),
                installationWizard.getDesktopFolder(),
                installationWizard.areDesktopShortcutsEnabled());
           
            unixInstallerExec.install();
           
            unixInstallerExec.dispose();
           
            t.stop();
          }
          else
          {
            t.stop();
           
            throw new AssertionError("Bad OS");
          }
         
          progressBar.setValue(progressBar.getMaximum());
         
          label       .setText(translator.getString("installprogress.success.label"));
          detailsLabel.setText(translator.getString("installprogress.success.details"));
         
          wasCompleted = true;
        }
        catch(final JixException e)
        {
          t.stop();
         
          progressBar.setValue(0);
         
          try
          {
            label       .setText(translator.getString("installprogress.failed.label"));
            detailsLabel.setText(translator.getString("installprogress.failed.details"));
          }
          catch (JixException e1)
          {
            e1.printStackTrace();
          }
         
          detailsButtonPanel.add(detailsButton);
          detailsButton.addActionListener(new ActionListener()
          {
            public void actionPerformed(ActionEvent arg0)
            {
              ErrorDetailsDialog errorDetailsDialog = new ErrorDetailsDialog(e);
              errorDetailsDialog.openDialog();
              errorDetailsDialog.dispose();
              return;
            }
          });
         
          updateUI();
        }
        catch(IOException e)
        {
          t.stop();
         
          progressBar.setValue(0);
         
          ErrorDetailsDialog errorDetailsDialog = new ErrorDetailsDialog(new JixException(e));
          errorDetailsDialog.setVisible(true);
          errorDetailsDialog.dispose();
        }
       
        fireValidationEvent(new ValidationEvent(InstallProgressPanel.this, true, false, false));
      }
    });

    fireValidationEvent(false);
  }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

            // assume this exception is not from application.
            // (e.g., when a marshaller aborts the processing, this exception
            //        will be thrown)
            throw (SAXException)e;
       
        ValidationEvent ve = new PrintConversionEventImpl(
            ValidationEvent.ERROR, e.getMessage(),
            new ValidationEventLocatorImpl(caller), e );
        serializer.reportError(ve);
    }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

     * Reports that the type of an object in a property is unexpected. 
     */
    public static void handleTypeMismatchError( XMLSerializer serializer,
            Object parentObject, String fieldName, Object childObject ) throws AbortSerializationException {
       
         ValidationEvent ve = new ValidationEventImpl(
            ValidationEvent.ERROR, // maybe it should be a fatal error.
            Messages.format(Messages.ERR_TYPE_MISMATCH,
                getUserFriendlyTypeName(parentObject),
                fieldName,
                getUserFriendlyTypeName(childObject) ),
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

        eventHandler = validationEventHandler;
    }

    public void warning(SAXParseException exception) throws SAXException {
        ValidationEventLocator eventLocator = new ValidationEventLocatorImpl(exception);
        ValidationEvent event = new ValidationEventImpl(ValidationEvent.WARNING, null, eventLocator, exception);
        if (!eventHandler.handleEvent(event)) {
            throw exception;
        }
    }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

        }
    }

    public void error(SAXParseException exception) throws SAXException {
        ValidationEventLocator eventLocator = new ValidationEventLocatorImpl(exception);
        ValidationEvent event = new ValidationEventImpl(ValidationEvent.ERROR, null, eventLocator, exception);
        if (!eventHandler.handleEvent(event)) {
            throw exception;
        }
    }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

        }
    }

    public void fatalError(SAXParseException exception) throws SAXException {
        ValidationEventLocator eventLocator = new ValidationEventLocatorImpl(exception);
        ValidationEvent event = new ValidationEventImpl(ValidationEvent.FATAL_ERROR, null, eventLocator, exception);
        if (!eventHandler.handleEvent(event)) {
            throw exception;
        }
    }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

            // assume this exception is not from application.
            // (e.g., when a marshaller aborts the processing, this exception
            //        will be thrown)
            throw (SAXException)e;
       
        ValidationEvent ve = new PrintConversionEventImpl(
            ValidationEvent.ERROR, e.getMessage(),
            new ValidationEventLocatorImpl(caller), e );
        serializer.reportError(ve);
    }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

     * Reports that the type of an object in a property is unexpected. 
     */
    public static void handleTypeMismatchError( XMLSerializer serializer,
            Object parentObject, String fieldName, Object childObject ) throws AbortSerializationException {
       
         ValidationEvent ve = new ValidationEventImpl(
            ValidationEvent.ERROR, // maybe it should be a fatal error.
            Messages.format(Messages.ERR_TYPE_MISMATCH,
                getUserFriendlyTypeName(parentObject),
                fieldName,
                getUserFriendlyTypeName(childObject) ),
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

        String message = e.getMessage();
        if(message==null) {
            message = e.toString();
        }
       
        ValidationEvent ve = new PrintConversionEventImpl(
            ValidationEvent.ERROR, message,
            new ValidationEventLocatorImpl(caller), e );
        serializer.reportError(ve);
    }
View Full Code Here

Examples of javax.xml.bind.ValidationEvent

     * Reports that the type of an object in a property is unexpected. 
     */
    public static void handleTypeMismatchError( XMLSerializer serializer,
            Object parentObject, String fieldName, Object childObject ) throws AbortSerializationException {
       
         ValidationEvent ve = new ValidationEventImpl(
            ValidationEvent.ERROR, // maybe it should be a fatal error.
            Messages.format(Messages.ERR_TYPE_MISMATCH,
                getUserFriendlyTypeName(parentObject),
                fieldName,
                getUserFriendlyTypeName(childObject) ),
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.