@Override public void attachEnv(PropertyEnv propertyEnv) { //System.out.println(":::::::::::::::: attachEnv: propertyEnv = " + propertyEnv); propertyEnv.addVetoableChangeListener(this); propertyEnv.setState(PropertyEnv.STATE_NEEDS_VALIDATION); }
/** * This method is called by the property sheet to pass the environment to the property editor. * The typical use case is for the ExPropertyEditor to call env.getFeatureDescriptor().getValue * (String key) to retrieve any hints the Property object may supply regarding how * the property editor should behave(such as providing alternate text representations of * "true" and "false" for a Boolean property editor). * @param allows an object (suchDef as a Node.Property instance) to communicate hints to * property editor instances */ public void attachEnv(PropertyEnv env) { env.setState(PropertyEnv.STATE_NEEDS_VALIDATION); env.addVetoableChangeListener(new VetoableChangeListener() { public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { customEditorOKButtonPressed(); } }); }
@Override public void attachEnv(PropertyEnv env) { this.env = env; env.removeVetoableChangeListener(this); env.setState(PropertyEnv.STATE_NEEDS_VALIDATION); env.addVetoableChangeListener(this); }
public ChooseOneReferenceDataPanel(ChooseOneReferenceDataPropertyEditor propertyEditor, DesignProperty liveProperty) { super(propertyEditor, liveProperty); PropertyEnv propertyEnv = propertyEditor.getEnv(); if (propertyEnv != null) { propertyEnv.setState(PropertyEnv.STATE_NEEDS_VALIDATION); panelSubmissionListener = new PanelSubmissionListener(propertyEditor); propertyEnv.addVetoableChangeListener(panelSubmissionListener); this.propertyEditor = propertyEditor; } }
@Override public Component getCustomEditor() { env.setState(PropertyEnv.STATE_NEEDS_VALIDATION); env.addVetoableChangeListener(this); toolsManagerPanel = ToolsCustomizerPanelFactory.getCustomizerByName(getAsText()); return toolsManagerPanel; }
public Spud(Property prop, PropertyEditor editor, PropertyModel model, PropertyEnv env, Component customEditor, PropertyChangeListener envListener, VetoableChangeListener veto) { if (prop != null) { property = new WeakReference(property); } if (editor != null) { this.editor = new WeakReference(editor); } if (env != null) { this.env = new WeakReference(env); env.addPropertyChangeListener(WeakListeners.propertyChange(this, env)); env.addVetoableChangeListener(WeakListeners.vetoableChange(this, env)); } if (customEditor != null) { this.customEditor = new WeakReference(customEditor); } if (envListener != null) { this.envListener = new WeakReference(envListener); } if (veto != null) { this.venvListener = new WeakReference(veto); } if (model != null) { this.model = new WeakReference(model); model.addPropertyChangeListener(WeakListeners.propertyChange(this, editor)); } if (editor != null) { editor.addPropertyChangeListener(this); } }
/** * Create a new instance of PropertyPanelBase, for the property editor specified. * Property editors that extend {@link PropertyEditorBase} should pass themselves * as an argument to the constructor of their property panel when the panel is * created, in response to a call to {@link java.beans.PropertyEditor#getCustomEditor()}. */ public PropertyPanelBase(PropertyEditorBase propertyEditor) { PropertyEnv propertyEnv = propertyEditor.getEnv(); if (propertyEnv != null) { propertyEnv.setState(PropertyEnv.STATE_NEEDS_VALIDATION); panelSubmissionListener = new PanelSubmissionListener(propertyEditor); propertyEnv.addVetoableChangeListener(panelSubmissionListener); this.propertyEditor = propertyEditor; } }
public Spud(Property prop, PropertyEditor editor, PropertyModel model, PropertyEnv env, Component customEditor, PropertyChangeListener envListener, VetoableChangeListener veto) { if (prop != null) { property = new WeakReference(property); } if (editor != null) { this.editor = new WeakReference(editor); } if (env != null) { this.env = new WeakReference(env); env.addPropertyChangeListener(WeakListeners.propertyChange(this, env)); env.addVetoableChangeListener(WeakListeners.vetoableChange(this, env)); } if (customEditor != null) { this.customEditor = new WeakReference(customEditor); } if (envListener != null) { this.envListener = new WeakReference(envListener); } if (veto != null) { this.venvListener = new WeakReference(veto); } if (model != null) { this.model = new WeakReference(model); model.addPropertyChangeListener(WeakListeners.propertyChange(this, editor)); } if (editor != null) { editor.addPropertyChangeListener(this); } }
@Override public void attachEnv(PropertyEnv env) { this.env = env; env.setState(PropertyEnv.STATE_NEEDS_VALIDATION); env.addVetoableChangeListener(new VetoableChangeListener() { @Override public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException { /* User has pushed OK */ for (Entry entry : editor.isoValNew.entrySet()){ isoVal.put((Double) entry.getKey(), (Boolean) entry.getValue()); } } }); }
private void attachToEnv(PropertyEnv env) { if (attachedEnv == env) { return; } // System.err.println(" attachToEnv - " + env); env.addVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(findBeans(this)); }
private void attachToEnv(PropertyEnv env) { env.addPropertyChangeListener(getEnvListener()); env.addVetoableChangeListener(getEnvListener()); env.setBeans(EditorPropertyDisplayer.findBeans(this)); }
/** * Show the customizer dialog. If we're already online, show a meaningless message (I don't think * we can disable the property editor just because we're online). If we're offline, let the user * decide if they want to try and reconnect. If they do, do the same reconnect done via a build or * run action. * * @param dhconf The remote host configuration * @param propertyEnv A PropertyEnv where we can control the custom property editor */ public DevelopmentHostCustomizer(DevelopmentHostConfiguration dhconf, PropertyEditorSupport editor, PropertyEnv propertyEnv) { this.dhconf = dhconf; this.editor = editor; this.propertyEnv = propertyEnv; this.oldExecEnv = (dhconf == null) ? null : dhconf.getExecutionEnvironment(); this.selectedEnv = new AtomicReference<>(this.oldExecEnv); this.cacheManager = ToolsCacheManager.createInstance(true); this.setLayout(new BorderLayout()); component = ServerListUIEx.getServerListComponent(cacheManager, selectedEnv); add(component, BorderLayout.CENTER); propertyEnv.setState(PropertyEnv.STATE_NEEDS_VALIDATION); propertyEnv.addVetoableChangeListener(this); }
private void attachToEnv(PropertyEnv env) { if (attachedEnv == env) { return; } // System.err.println(" attachToEnv - " + env); env.addVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(findBeans(this)); }
private void attachToEnv(PropertyEnv env) { env.addPropertyChangeListener(getEnvListener()); env.addVetoableChangeListener(getEnvListener()); env.setBeans(EditorPropertyDisplayer.findBeans(this)); }
private void attachToEnv(PropertyEnv env) { env.addPropertyChangeListener(getEnvListener()); env.addVetoableChangeListener(getEnvListener()); env.setBeans(EditorPropertyDisplayer.findBeans(this)); }
public CompilerSetEditorCustomizer(PropertyEnv propertyEnv) { this.setLayout(new BorderLayout()); this.setBorder(new EmptyBorder(6,6,0,6)); tpc = ToolsPanelSupport.getToolsPanelComponent(hostConfiguration.getExecutionEnvironment(), getValue()); delegate = (VetoableChangeListener) tpc.getClientProperty(ToolsPanelSupport.OK_LISTENER_KEY); add(tpc, BorderLayout.CENTER); this.putClientProperty("title", NbBundle.getMessage(CompilerSetNodeProp.class, "CompilerSetEditorCustomizerTitile", hostConfiguration.getExecutionEnvironment().getDisplayName())); propertyEnv.setState(PropertyEnv.STATE_NEEDS_VALIDATION); propertyEnv.addVetoableChangeListener(CompilerSetEditorCustomizer.this); }
private void attachToEnv(PropertyEnv env) { if (attachedEnv == env) { return; } // System.err.println(" attachToEnv - " + env); env.addVetoableChangeListener(getEnvListener()); env.addPropertyChangeListener(getEnvListener()); env.setBeans(findBeans(this)); }