本文整理匯總了Java中java.awt.dnd.DropTarget.setActive方法的典型用法代碼示例。如果您正苦於以下問題:Java DropTarget.setActive方法的具體用法?Java DropTarget.setActive怎麽用?Java DropTarget.setActive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.awt.dnd.DropTarget
的用法示例。
在下文中一共展示了DropTarget.setActive方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: postInitComponents
import java.awt.dnd.DropTarget; //導入方法依賴的package包/類
private void postInitComponents () {
Containers.initNotify ();
updateTable = createTabForModel(new UpdateTableModel(units));
availableTable = createTabForModel(new AvailableTableModel (units));
final LocalDownloadSupport localDownloadSupport = new LocalDownloadSupport();
final LocallyDownloadedTableModel localTM = new LocallyDownloadedTableModel(localDownloadSupport);
localTable = createTabForModel(localTM);
installedTable = createTabForModel(new InstalledTableModel(units));
DropTargetListener l = new LocallDownloadDnD(localDownloadSupport, localTM, this);
final DropTarget dt = new DropTarget(null, l);
dt.setActive(true);
this.setDropTarget(dt);
final SettingsTab tab = new SettingsTab(this);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
tpTabs.add(tab, INDEX_OF_SETTINGS_TAB);
tpTabs.setTitleAt(INDEX_OF_SETTINGS_TAB, tab.getDisplayName());
}
});
setWaitingState(true);
}