本文整理匯總了Java中javax.swing.event.ChangeListener.stateChanged方法的典型用法代碼示例。如果您正苦於以下問題:Java ChangeListener.stateChanged方法的具體用法?Java ChangeListener.stateChanged怎麽用?Java ChangeListener.stateChanged使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.event.ChangeListener
的用法示例。
在下文中一共展示了ChangeListener.stateChanged方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: changeData
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
public void changeData(@NonNull TreeSet<String> privatePackages) {
synchronized (IMPL_LOCK) {
this.privatePackages = privatePackages;
}
ArrayList<ChangeListener> changes = new ArrayList<ChangeListener>();
synchronized (listeners) {
changes.addAll(listeners);
}
for (ChangeListener change : changes) {
change.stateChanged(new ChangeEvent(this));
}
}
示例2: setValid
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
protected void setValid (boolean valid, Message message) {
boolean oldValid = this.valid;
Message oldMessage = this.errMessage;
this.valid = valid;
this.errMessage = message;
if (oldValid != valid || oldMessage != null && !oldMessage.equals(message) || message != null && !message.equals(oldMessage)) {
ChangeEvent evt = new ChangeEvent(this);
ChangeListener[] lists;
synchronized (listeners) {
lists = listeners.toArray(new ChangeListener[listeners.size()]);
}
for (ChangeListener list : lists) {
list.stateChanged(evt);
}
}
}
示例3: fireChange
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
private void fireChange() {
List<ChangeListener> ls;
synchronized (listeners) {
if (listeners.isEmpty()) {
return;
}
ls = new ArrayList<ChangeListener>(listeners);
}
ChangeEvent ev = new ChangeEvent(this);
for (ChangeListener l : ls) {
l.stateChanged(ev);
}
}
示例4: fireChange
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
private void fireChange () {
ChangeListener[] _listeners;
synchronized (this) {
_listeners = this.listeners.toArray(new ChangeListener[this.listeners.size()]);
}
ChangeEvent event = new ChangeEvent (this);
for (ChangeListener l : _listeners) {
l.stateChanged (event);
}
}
示例5: stateChanged
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
/** Called when new file system is added to the pool.
* @param ev event describing the action
*/
@Override public void stateChanged(final ChangeEvent ev) {
ChangeListener l = (ChangeListener) super.get(ev);
if (l != null) {
l.stateChanged(ev);
}
}
示例6: fireStateChanged
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
private void fireStateChanged() {
ChangeEvent event = new ChangeEvent(this);
Iterator var2 = this.changeListeners.iterator();
while(var2.hasNext()) {
ChangeListener listener = (ChangeListener)var2.next();
try {
listener.stateChanged(event);
} catch (RuntimeException var5) {
LogService.getRoot().log(Level.WARNING, "com.rapidminer.gui.io.dataimport.AbstractWizardStep.changelistener_failed", var5);
}
}
}
示例7: fireChanged
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
void fireChanged() {
List<ChangeListener> lists = new ArrayList<ChangeListener>();
synchronized(listeners) {
lists.addAll(listeners);
}
for (ChangeListener listen : lists) {
listen.stateChanged(new ChangeEvent(this));
}
}
示例8: fireChangeEvent
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
protected final void fireChangeEvent() {
ChangeListener[] ls;
synchronized (listeners) {
ls = listeners.toArray(new ChangeListener[listeners.size()]);
}
ChangeEvent ev = new ChangeEvent(this);
for (ChangeListener l : ls) {
l.stateChanged(ev);
}
}
示例9: fireChangeEvent
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
/**
* Fires a state changed event for registered {@link ChangeListener}. Skips the
* {@link #fileChangeListener} to avoid new file type lookup when choosing a different file
* import type.
*/
private void fireChangeEvent() {
for (ChangeListener listener : changeListeners) {
if (listener == fileChangeListener) {
// skip local file change listener to avoid new file type lookup
continue;
}
try {
listener.stateChanged(new ChangeEvent(fileChooser));
} catch (RuntimeException e) {
// ignore
}
}
}
示例10: fireChange
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
private void fireChange() {
ChangeEvent e = new ChangeEvent(this);
List<ChangeListener> templist;
synchronized (this) {
templist = new ArrayList<ChangeListener> (listeners);
}
for (ChangeListener l: templist) {
l.stateChanged(e);
}
}
示例11: fireChangeEvent
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void fireChangeEvent() {
// copy necessary against concurrent modification exceptions
Vector<ChangeListener> targets;
synchronized (this) {
targets = (Vector<ChangeListener>) listeners.clone();
}
for (ChangeListener listener : targets) {
listener.stateChanged(changeEvent);
}
}
示例12: fireChange
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
private void fireChange() {
if (underConstruction) return;
List<ChangeListener> clone;
synchronized(listeners) {
clone = new ArrayList<ChangeListener>(listeners);
}
Iterator<ChangeListener> it = clone.iterator();
ChangeEvent event = new ChangeEvent(this);
while (it.hasNext()) {
ChangeListener listener = it.next();
listener.stateChanged(event);
}
}
示例13: fireStateChangeEvent
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
/** Fires a status change event to all listeners. */
private final void fireStateChangeEvent(StyledDocument document, boolean closing) {
if (listeners != null) {
EnhancedChangeEvent event = new EnhancedChangeEvent(this, document, closing);
ChangeListener[] ls;
synchronized (this) {
ls = listeners.toArray(new ChangeListener[listeners.size()]);
}
for (ChangeListener l : ls) {
l.stateChanged(event);
}
}
}
示例14: fireTemplateChanged
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
private void fireTemplateChanged(FileObject fo) {
ChangeEvent che = new ChangeEvent(fo);
ChangeListener[] ls;
synchronized (listeners) {
ls = listeners.toArray(new ChangeListener[] {});
}
for (ChangeListener chl : ls) {
chl.stateChanged(che);
}
}
示例15: fireChange
import javax.swing.event.ChangeListener; //導入方法依賴的package包/類
private void fireChange() {
ChangeEvent e = new ChangeEvent(this);
for (ChangeListener l : listeners) {
l.stateChanged(e);
}
}