Java 8 PropertyVetoException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 PropertyVetoException class.

This code example shows how to use the following methods:getMessage
			reloadServiceDesc(configMgr, config, adminName, clientName);
		} catch (PropertyVetoException e) {
			if (getLogger().isLoggable(Level.WARNING)) {
				String msg = "Failed to update config bean for admin.clientName="
						+ adminName + "." + clientName
						+ ": " + e + (e.getMessage() == null ? "" : "('" + e.getMessage() + "')") 
						+ " "; 
				getLogger().log(Level.WARNING, msg, e);
			} 
			throw e;
		} catch (Throwable e) {
			String msg = null;
			if (getLogger().isLoggable(Level.WARNING)) {
				msg = "Failed to update config bean for admin.clientName="
						+ adminName + "." + clientName
						+ ": " + e + (e.getMessage() == null ? "" : "('" + e.getMessage() + "')") 
						+ " "; 
				getLogger().log(Level.WARNING, msg, e);
			} 
			try { 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:sleep, printStackTrace
 
        // Try selecting the bottommost frame 
        try { 
            iframe2.setSelected(true);
        } catch (PropertyVetoException ex) {
            ex.printStackTrace();
        } 
 
        // Click the title bar of the internal frame 
        Point lLoc = iframe2.getLocationOnScreen();
        System.err.println("lLoc: " + lLoc);
        robot.mouseMove(lLoc.x + 10, lLoc.y + 10);
        Util.waitForIdle(robot);
 
        robot.mousePress(InputEvent.BUTTON1_MASK);
        robot.mouseRelease(InputEvent.BUTTON1_MASK);
        Util.waitForIdle(robot);
 
 
        if (failed) {

5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getMessage
        fileList1.setVisible(true);
        this.getTool().getInternalFrame().getDesktopPane().add(fileList1);
        try { 
            fileList1.setSelected(true);
        } catch (PropertyVetoException ex1) {
            System.out.println(ex1.getMessage());
        } 
 
//        try { 
//            setValue(fileList1.getFilevector().toArray()); 
//        } catch (NullPointerException npe) { 
//        } 
    } 
 
 
    public Object getArgument() throws InstantiationException {
        if (value == null) { 
            return null; 
        } 
        try { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		{ 
		    Object val = evt.getNewValue();
		    if ( "jndiName".equals( evt.getPropertyName() ) )
			{ 
			    if (! (val instanceof Name || val instanceof String) )
				throw new PropertyVetoException("jndiName must be a String or a javax.naming.Name", evt);
			} 
		} 
	    }; 
	this.addVetoableChangeListener( l );
 
	PropertyChangeListener pcl = new PropertyChangeListener()
	    { 
		public void propertyChange( PropertyChangeEvent evt )
		{ cachedInner = null; }
	    }; 
	this.addPropertyChangeListener( pcl );
    } 
 
    //MT: called only from inner(), effectively synchrtonized 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	} 
	 
	public void setLevel(int level) throws PropertyVetoException
	{ 
		if(level<=0)
			throw new PropertyVetoException(
				"Must be > 0", 
				new PropertyChangeEvent(this, null, null, null));
		this.level = level;
	} 
 
	public void setTriangle(int triangle) throws PropertyVetoException
	{ 
		if(level<=0)
			throw new PropertyVetoException(
				"Must be > 0", 
				new PropertyChangeEvent(this, null, null, null));
 
		this.triangle = triangle;
	} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		public void vetoableChange(PropertyChangeEvent evt) 
			throws PropertyVetoException
		{ 
			BeanPropertyInfo i = BaseConfigBean.getBeanPropertyInfo(evt);
			if (i != m_propertyInfo) {
				throw new PropertyVetoException(
						evt.getPropertyName()+" cannot be changed.", evt);					
			} 
			long newValue = ((Long)evt.getNewValue()).longValue();
			if (newValue < 0 || newValue < KEEP_ALIVE_TIME_IN_SEC_THRESHOLD) {
				throw new PropertyVetoException(
					evt.getPropertyName()+" cannot be smaller than "+ KEEP_ALIVE_TIME_IN_SEC_THRESHOLD,
					evt);
			} 
		} 
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
			this.schemaGenerator = new SchemaGenerator(dataSourceConfigs);
 
		} 
		catch (PropertyVetoException e)
		{ 
			e.printStackTrace();
		} 
	} 
 
	/** 
	 * Are tables valid. 
	 * @return true, if successful 
	 */ 
	private boolean areTablesValid() 
	{ 
		for (String table : _tableNames)
		{ 
			if (!MysqlUtils.isValidTable(_database, table))
			{ 
				System.out.println("This table [" + table + "] doesn't appear to be valid table or view, please retry");
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        } 
 
        public void vetoableChange(PropertyChangeEvent event) throws PropertyVetoException {
            this.odd = !this.odd;
            if (this.veto)
                throw new PropertyVetoException("disable all changes", event);
        } 
    } 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
			} catch (ServiceException e1) {
				getLogger().log(Level.WARNING, msg + e1.toString());
				throw new PropertyVetoException(msg, evt);
			} 
			getLogger().log(Level.WARNING, msg + e.toString());
			throw new PropertyVetoException(msg, evt);
		} 
	} 
 
	public void propertyChange(PropertyChangeEvent evt) {
		// TODO: how can we group multiple changes, so that we reload 
		// ServiceDesc only once 
		PropertyChangeHistory changeHistory = getBean().createChangeHistory(evt);
		changeHistory.updateStart();
 
		try { 
			setValuesForUpdate(evt);
			changeHistory.updateSuccess();
		} catch (Throwable e) {
			logFailure(changeHistory, getAdminName(), e);
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:printStackTrace
						{ 
						setMaximum(true); 
						} 
					catch (PropertyVetoException e)
						{ 
						e.printStackTrace();
						} 
				else 
					pane.bringMaximumToTop();
				} 
			} 
		} 
	} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 PropertyVetoException Methods: