/** @param ev event with changes */ public void vetoableChange(PropertyChangeEvent ev) throws PropertyVetoException { if (ev.getPropertyName().equals("systemName")) { final String ov = (String) ev.getOldValue(); final String nv = (String) ev.getNewValue(); if (names.get(nv) != null) { throw new PropertyVetoException("system name already exists: " + ov + " -> " + nv, ev); // NOI18N } } } };
protected void setter(ConfigModel.Property target, Object value) throws Exception { if (!writeLock) { throw new PropertyVetoException("Instance of " + getImplementation() + " named '" + getKey() + "' is not locked for writing when changing attribute " + target.xmlName() + ", you must use transaction semantics to access it.", null); } _setter(target, value); }
throw new PropertyVetoException("Instance of " + getImplementation() + " named '" + getKey() + "' is not locked for writing when invoking method " + method.getName() + " you must use transaction semantics to access it.", null);
@Override public Date getSelectableDate(Date date) throws PropertyVetoException { if (date == null) { // one place to interrupt the update spiral throw new PropertyVetoException("date not selectable", null); } return date; } }
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { if (ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName())) { Node[] nodes = (Node[])evt.getNewValue(); if (nodes.length > 1) { throw new PropertyVetoException("", evt); // we do not allow multiple selection // NOI18N } } }
public void vetoableChange( PropertyChangeEvent evt ) throws PropertyVetoException { 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); } } };
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { if (ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName())) { Node[] nodes = (Node[]) evt.getNewValue(); if (nodes.length > 1) { throw new PropertyVetoException("", evt); // we do not allow multiple selection // NOI18N } } }
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { if (ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName())) { Node[] nodes = (Node[])evt.getNewValue(); if (nodes.length > 1) { throw new PropertyVetoException("", evt); // we do not allow multiple selection // NOI18N } } }
public void vetoableChange( PropertyChangeEvent evt ) throws PropertyVetoException { 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); } } };
@Override public void vetoableChange(java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoException { if (evt.getPropertyName().equals(ExplorerManager.PROP_SELECTED_NODES)) { // issue 11928 check if selecetion mode will be broken Node[] nodes = (Node[])evt.getNewValue(); if (isSelectionModeBroken(nodes)) { throw new PropertyVetoException("selection mode " + " broken by " + Arrays.asList(nodes), evt); // NOI18N } } } }
public void vetoableChange(java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoException { if (evt.getPropertyName().equals(ExplorerManager.PROP_SELECTED_NODES)) { // issue 11928 check if selecetion mode will be broken Node[] nodes = (Node[])evt.getNewValue(); if (isSelectionModeBroken(nodes)) { throw new PropertyVetoException("selection mode " + " broken by " + Arrays.asList(nodes), evt); // NOI18N } } } }
public synchronized void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { throw new PropertyVetoException("Why? Just for testing!", evt); } }
/** * A palette can not be activated (selected). */ public void setSelected(boolean _b) throws PropertyVetoException { if(_b) { moveToFront(); throw new PropertyVetoException("Palette",null); } }
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { if(JInternalFrame.IS_CLOSED_PROPERTY.equals(evt.getPropertyName()) && Boolean.TRUE.equals(evt.getNewValue())) { // i18n[DriversListInternalFrame.error.ctrlF4key=Probably closed by the ctrl F4 key. See BasicDesktopPaneUi.CloseAction] throw new PropertyVetoException(s_stringMgr.getString("DriversListInternalFrame.error.ctrlF4key"), evt); } } });
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { if (ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName())) { Node[] newNodes = (Node[]) evt.getNewValue(); if (!selectionAccept(newNodes)) { throw new PropertyVetoException("", evt); // NOI18N } } }
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { if(JInternalFrame.IS_CLOSED_PROPERTY.equals(evt.getPropertyName()) && Boolean.TRUE.equals(evt.getNewValue())) { nowVisible(true); // i18n[AliasesListInternalFrame.error.ctrlF4key=Probably closed by the ctrl F4 key. See BasicDesktopPaneUi.CloseAction] throw new PropertyVetoException(s_stringMgr.getString("AliasesListInternalFrame.error.ctrlF4key"), evt); } } });
@Override public void vetoableChange(PropertyChangeEvent event) throws PropertyVetoException { if("size".equals(event.getPropertyName()) && ((Integer)event.getNewValue()).intValue() > 13) { throw new PropertyVetoException("Feet too big!", event); } } }
protected void setter(ConfigModel.Property target, Object value) throws Exception { if (!writeLock) { throw new PropertyVetoException("Instance of " + getImplementation() + " named '" + getKey() + "' is not locked for writing when changing attribute " + target.xmlName() + ", you must use transaction semantics to access it.", null); } _setter(target, value); }
protected void setter(ConfigModel.Property target, Object value) throws Exception { if (!writeLock) { throw new PropertyVetoException("Instance of " + typeName() + " named '" + getKey() + "' is not locked for writing when changing attribute " + target.xmlName() + ", you must use transaction semantics to access it.", null); } _setter(target, value); }
protected void setter(ConfigModel.Property target, Object value) throws Exception { if (!writeLock) { throw new PropertyVetoException("Instance of " + typeName() + " named '" + getKey() + "' is not locked for writing when changing attribute " + target.xmlName() + ", you must use transaction semantics to access it.", null); } _setter(target, value); }