本文整理匯總了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);
}
}