热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.openide.util.ChangeSupport类的使用及代码示例

本文整理了Java中org.openide.util.ChangeSupport类的一些代码示例,展示了ChangeSupport类的具体用法

本文整理了Java中org.openide.util.ChangeSupport类的一些代码示例,展示了ChangeSupport类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ChangeSupport类的具体详情如下:
包路径:org.openide.util.ChangeSupport
类名称:ChangeSupport

ChangeSupport介绍

[英]A simple equivalent of java.beans.PropertyChangeSupport for ChangeListeners. This class is not serializable.
[中]

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-util

/**
* Fires a change event to all registered listeners.
*/
public void fireChange() {
if (listeners.isEmpty()) {
return;
}
fireChange(new ChangeEvent(source));
}

代码示例来源:origin: org.netbeans.api/org-openide-nodes

/** Add a listener to changes in the COOKIE set.
* @param l the listener to add
*/
public void addChangeListener(ChangeListener l) {
cs.addChangeListener(l);
}

代码示例来源:origin: org.netbeans.api/org-openide-nodes

/** Remove a listener to changes in the COOKIE set.
* @param l the listener to remove
*/
public void removeChangeListener(ChangeListener l) {
cs.removeChangeListener(l);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javafx2-project

@Override
public void addChangeListener(ChangeListener listener) {
cs.addChangeListener(listener);
assert cs.hasListeners();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javacard-spi

/**
* Detach a listener for changes in the set of cards
* @param cl
*/
public synchronized final void removeChangeListener(ChangeListener cl) {
supp.removeChangeListener(cl);
if (!supp.hasListeners()) {
removeNotify();
}
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-bugtracking

private ChangeSupport getChangeSupport() {
if(changeSupport == null) {
changeSupport = new ChangeSupport(this);
}
return changeSupport;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javacard-spi

/**
* Attach a listener for changes in the set of cards
* @param cl
*/
public synchronized final void addChangeListener(ChangeListener cl) {
boolean hadListeners = supp.hasListeners();
supp.addChangeListener(cl);
if (!hadListeners) {
addNotify();
}
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

public MakeSources(MakeProject project, MakeProjectHelper helper) {
this.project = project;
this.helper = helper;
helper.addMakeProjectListener(MakeSources.this);
changeSupport = new ChangeSupport(this);
}
private Sources delegate;

代码示例来源:origin: org.netbeans.api/org-openide-nodes

/** Fires change event
*/
final void fireChangeEvent() {
cs.fireChange();
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

@Override
public void addChangeListener(ChangeListener l) {
cs.addChangeListener(l);
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

@Override
public void removeChangeListener(ChangeListener l) {
cs.removeChangeListener(l);
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-bugtracking

/**
* Creates new form SchedulePickerImpl
*/
public SchedulingPickerImpl () {
support = new ChangeSupport(this);
initComponents();
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

public synchronized void setStatusText(String text) {
if (text.equals(this.text)) {
return;
}
this.text = text;
if (text.length() > 0) {
System.err.println("(" + text + ")"); // NOI18N
}
cs.fireChange();
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

public void addChangeListener(ChangeListener l) {
cs.addChangeListener(l);
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

public void removeChangeListener(ChangeListener l) {
cs.removeChangeListener(l);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project

public ConfigManager(ConfigProvider configProvider, String currentConfig) {
this.cOnfigProvider= configProvider;
changeSupport = new ChangeSupport(this);
cOnfigs= createEmptyConfigs();
configs.putAll(configProvider.getConfigs());
this.currentCOnfig= currentConfig;
List tmp = new ArrayList<>(Arrays.asList(configProvider.getConfigProperties()));
tmp.add(PROP_DISPLAY_NAME);
propertyNames = tmp.toArray(new String[tmp.size()]);
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

@Override
public void discardAllEdits() {
Enumeration cursor = edits.elements();
while (cursor.hasMoreElements()) {
UndoableEdit e = (UndoableEdit)cursor.nextElement();
e.die();
}
edits = new Vector();
indexOfNextAdd = 0;
cs.fireChange();
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

/** Registers ChangeListener to receive events.
* @param listener The listener to register. */
public final void addChangeListener(ChangeListener listener) {
cs.addChangeListener(listener);
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

/** Removes ChangeListener from the list of listeners.
* @param listener The listener to remove. */
public final void removeChangeListener(ChangeListener listener) {
cs.removeChangeListener(listener);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-team-ide

/**
* Creates new form DatePickerImpl
*/
public JXDatePickerImpl () {
this.support = new ChangeSupport(this);
initComponents();
datePicker.getEditor().addPropertyChangeListener(this);
}

推荐阅读
author-avatar
曉--伍_621
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有