本文整理汇总了Java中java.awt.event.ActionEvent.setSource方法的典型用法代码示例。如果您正苦于以下问题:Java ActionEvent.setSource方法的具体用法?Java ActionEvent.setSource怎么用?Java ActionEvent.setSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.event.ActionEvent
的用法示例。
在下文中一共展示了ActionEvent.setSource方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import java.awt.event.ActionEvent; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent ae)
{
Object o = ae.getSource();
if (o == override)
{
updateIndexList((ClassData.Class)selects.get("classcode").getSelectedItem());
}
else if (o == add)
{
addToRunOrder = true;
ae.setSource(ok);
super.actionPerformed(ae);
}
else
{
super.actionPerformed(ae);
}
}
示例2: actionPerformed
import java.awt.event.ActionEvent; //导入方法依赖的package包/类
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);
}
}
示例3: actionPerformed
import java.awt.event.ActionEvent; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
if (eventSource != null) {
e.setSource(eventSource);
}
action.actionPerformed(e);
}
示例4: actionPerformed
import java.awt.event.ActionEvent; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent e)
{
if( addControlListener != null )
{
e.setSource(PowerSearchList.this);
addControlListener.actionPerformed(e);
}
}
示例5: actionPerformed
import java.awt.event.ActionEvent; //导入方法依赖的package包/类
@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);
}
}