本文整理了Java中java.awt.event.ActionEvent.setSource()
方法的一些代码示例,展示了ActionEvent.setSource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ActionEvent.setSource()
方法的具体详情如下:
包路径:java.awt.event.ActionEvent
类名称:ActionEvent
方法名:setSource
暂无
代码示例来源:origin: com.google.code.findbugs/findbugs
@Override
public void actionPerformed(ActionEvent e) {
e.setSource(tree);
selectPrevious.actionPerformed(e);
}
};
代码示例来源:origin: com.eas.platypus/platypus-js-forms
protected void fireActionPerformed(ActionEvent e) {
e.setSource(this);
actionListeners.stream().forEach((l) -> {
l.actionPerformed(e);
});
}
代码示例来源:origin: sdedit/sdedit
public void actionPerformed(ActionEvent e) {
e.setSource(this);
searcher.actionPerformed(e);
}
代码示例来源:origin: lycying/c2d-engine
@Override
public void actionPerformed(ActionEvent e) {
ActionListener[] listeners = this.getListeners(ActionListener.class);
// set the source to this
e.setSource(this);
// forward the event to the listeners on this class
for (ActionListener listener : listeners) {
listener.actionPerformed(e);
}
}
代码示例来源:origin: net.sf.cuf/cuf-swing
pEvent.setSource(this);
pEvent.setSource(mRealSource);
mRealSource= null;
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void actionPerformed(ActionEvent e) {
if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) {
//Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects
//that action events performed on trees actually come from
//trees
e.setSource(getTree());
treeAction.actionPerformed(e);
} else {
tableAction.actionPerformed(e);
}
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide
public void actionPerformed(ActionEvent e) {
if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) {
//Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects
//that action events performed on trees actually come from
//trees
e.setSource(getTree());
treeAction.actionPerformed(e);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
public void actionPerformed(ActionEvent e) {
if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) {
//Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects
//that action events performed on trees actually come from
//trees
e.setSource(getTree());
treeAction.actionPerformed(e);
}
}
代码示例来源:origin: org.jdesktop.bsaf/bsaf
/**
* This method implements this <tt>Action's</tt> behavior.
* <p>
* If there's a proxy Action then call its actionPerformed
* method. Otherwise, call the @Action method with parameter
* values provided by {@code getActionArgument()}. If anything goes wrong
* call {@code actionFailed()}.
*
* @param actionEvent @{inheritDoc}
* @see #setProxy
* @see #getActionArgument
* @see Task
*/
@Override
public void actionPerformed(ActionEvent actionEvent) {
javax.swing.Action proxy = getProxy();
if (proxy != null) {
actionEvent.setSource(getProxySource());
proxy.actionPerformed(actionEvent);
} else if (actionMethod != null) {
noProxyActionPerformed(actionEvent);
}
}
代码示例来源:origin: net.java.dev.appframework/appframework
/**
* This method implements this <tt>Action's</tt> behavior.
* <p>
* If there's a proxy Action then call its actionPerformed
* method. Otherwise, call the @Action method with parameter
* values provided by {@code getActionArgument()}. If anything goes wrong
* call {@code actionFailed()}.
*
* @param actionEvent @{inheritDoc}
* @see #setProxy
* @see #getActionArgument
* @see Task
*/
public void actionPerformed(ActionEvent actionEvent) {
javax.swing.Action proxy = getProxy();
if (proxy != null) {
actionEvent.setSource(getProxySource());
proxy.actionPerformed(actionEvent);
}
else if (actionMethod != null) {
noProxyActionPerformed(actionEvent);
}
}
代码示例来源:origin: com.fifesoft.rtext/fife.common
@Override
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
if (source instanceof JMenuItem) {
JMenuItem item = (JMenuItem)source;
Icon icon = item.getIcon();
// If it has an icon, it must be a swatch.
if (icon!=null) {
ColorIcon colorIcon = (ColorIcon)icon;
Color color = colorIcon.getColor();
RColorSwatchesButton.this.setColor(color);
}
// Otherwise, it is the "More colors..." menu item.
else {
e.setSource(RColorSwatchesButton.this);
super.actionPerformed(e);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!