本文整理匯總了Java中com.rapidminer.gui.dnd.DragListener類的典型用法代碼示例。如果您正苦於以下問題:Java DragListener類的具體用法?Java DragListener怎麽用?Java DragListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DragListener類屬於com.rapidminer.gui.dnd包,在下文中一共展示了DragListener類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: RepositoryTreeTransferhandler
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
public RepositoryTreeTransferhandler() {
addDragListener(new DragListener() {
@Override
public void dragStarted(Transferable t) {
// reset latestAction because a new drag makes the last action irrelevant
latestAction = 0;
}
@Override
public void dragEnded() {}
});
}
示例2: setTransferHandler
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
@Override
public void setTransferHandler(TransferHandler newHandler) {
if (newHandler instanceof PlotConfigurationTreeTransferHandler) {
DragListener cellRenderer = (DragListener) getCellRenderer();
PlotConfigurationTreeTransferHandler plotConfigurationTreeTransferHandler = (PlotConfigurationTreeTransferHandler) newHandler;
if (cellRenderer != null) {
plotConfigurationTreeTransferHandler.removeDragListener(cellRenderer);
}
plotConfigurationTreeTransferHandler.addDragListener(cellRenderer);
}
super.setTransferHandler(newHandler);
}
示例3: NewOperatorEditor
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
/**
* The drag listener will be registered at the operator tree and will receive drag start events
* if a drag has started and drag stopped events if dragging has stopped again
*/
public NewOperatorEditor(DragListener dragListener) {
super(new BorderLayout());
// will cause the tree half to keep fixed size during resizing
setBorder(null);
this.newOperatorGroupTree = new NewOperatorGroupTree(this);
this.newOperatorGroupTree.getTree().addTreeSelectionListener(this);
add(newOperatorGroupTree, BorderLayout.CENTER);
if (dragListener != null) {
newOperatorGroupTree.getOperatorTreeTransferhandler().addDragListener(dragListener);
}
// this.operatorList = new OperatorList();
}
示例4: NewOperatorEditor
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
/**
* The drag listener will be registered at the operator tree and will receive drag start events
* if a drag has started and drag stopped events if dragging has stopped again
*/
public NewOperatorEditor(DragListener dragListener) {
super(new BorderLayout());
// will cause the tree half to keep fixed size during resizing
setBorder(null);
this.newOperatorGroupTree = new NewOperatorGroupTree(this);
this.newOperatorGroupTree.getTree().addTreeSelectionListener(this);
add(newOperatorGroupTree, BorderLayout.CENTER);
if (dragListener != null) {
newOperatorGroupTree.getOperatorTreeTransferhandler().addDragListener(dragListener);
}
}
示例5: setTransferHandler
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
@Override
public void setTransferHandler(TransferHandler newHandler) {
if(newHandler instanceof PlotConfigurationTreeTransferHandler) {
DragListener cellRenderer = (DragListener) getCellRenderer();
PlotConfigurationTreeTransferHandler plotConfigurationTreeTransferHandler = (PlotConfigurationTreeTransferHandler) newHandler;
if(cellRenderer != null) {
plotConfigurationTreeTransferHandler.removeDragListener(cellRenderer);
}
plotConfigurationTreeTransferHandler.addDragListener(cellRenderer);
}
super.setTransferHandler(newHandler);
}
示例6: NewOperatorEditor
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
/** The drag listener will be registered at the operator tree and will receive drag start events if a drag has started and drag stopped events if dragging has stopped again */
public NewOperatorEditor(DragListener dragListener) {
super(new BorderLayout());
// will cause the tree half to keep fixed size during resizing
setBorder(null);
this.newOperatorGroupTree = new NewOperatorGroupTree(this);
this.newOperatorGroupTree.getTree().addTreeSelectionListener(this);
add(newOperatorGroupTree, BorderLayout.CENTER);
if(dragListener != null) {
newOperatorGroupTree.getOperatorTreeTransferhandler().addDragListener(dragListener);
}
// this.operatorList = new OperatorList();
}
示例7: RepositoryBrowser
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
/**
* @param dragListener
* registers a dragListener at the repository tree transferhandler. The listener is
* informed when a drag starts and a drag ends.
*/
public RepositoryBrowser(DragListener dragListener) {
tree = new RepositoryTree();
if (dragListener != null) {
((AbstractPatchedTransferHandler) tree.getTransferHandler()).addDragListener(dragListener);
}
tree.addRepositorySelectionListener(new RepositorySelectionListener() {
@Override
public void repositoryLocationSelected(RepositorySelectionEvent e) {
Entry entry = e.getEntry();
if (entry instanceof ProcessEntry) {
RepositoryTree.openProcess((ProcessEntry) entry);
} else if (entry instanceof IOObjectEntry) {
OpenAction.showAsResult((IOObjectEntry) entry);
}
}
});
setLayout(new BorderLayout());
final JPopupMenu furtherActionsMenu = new JPopupMenu();
furtherActionsMenu.add(ADD_REPOSITORY_ACTION);
furtherActionsMenu.add(tree.CREATE_FOLDER_ACTION);
final JMenu sortActionsMenu = new JMenu(SORT_REPOSITORY_ACTION);
sortActionsMenu.add(tree.SORT_BY_NAME_ACTION.createMenuItem());
sortActionsMenu.add(tree.SORT_BY_LAST_MODIFIED_DATE_ACTION.createMenuItem());
furtherActionsMenu.add(sortActionsMenu);
furtherActionsMenu.add(tree.REFRESH_ACTION);
furtherActionsMenu.add(tree.SHOW_PROCESS_IN_REPOSITORY_ACTION);
JPanel northPanel = new JPanel(new GridBagLayout());
northPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.HORIZONTAL;
c.gridx = 0;
c.gridy = 0;
c.weightx = 1;
c.insets = new Insets(2, 2, 2, 2);
JButton addDataButton = new JButton(new ImportDataAction(true));
addDataButton.setPreferredSize(new Dimension(100, 30));
northPanel.add(addDataButton, c);
DropDownPopupButton furtherActionsButton = new DropDownPopupButton("gui.action.further_repository_actions",
new PopupMenuProvider() {
@Override
public JPopupMenu getPopupMenu() {
return furtherActionsMenu;
}
});
furtherActionsButton.setPreferredSize(new Dimension(50, 30));
c.gridx = 1;
c.gridy = 0;
c.weightx = 0;
northPanel.add(furtherActionsButton, c);
add(northPanel, BorderLayout.NORTH);
JScrollPane scrollPane = new ExtendedJScrollPane(tree);
scrollPane.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Colors.TEXTFIELD_BORDER));
add(scrollPane, BorderLayout.CENTER);
}
示例8: RepositoryBrowser
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
/**
* @param dragListener registers a dragListener at the repository tree transferhandler. The listener is informed when a drag starts and a drag ends.
*/
public RepositoryBrowser(DragListener dragListener) {
tree = new RepositoryTree();
if(dragListener != null) {
((AbstractPatchedTransferHandler) tree.getTransferHandler()).addDragListener(dragListener);
}
tree.addRepositorySelectionListener(new RepositorySelectionListener() {
@Override
public void repositoryLocationSelected(RepositorySelectionEvent e) {
Entry entry = e.getEntry();
if (entry instanceof ProcessEntry) {
RepositoryTree.openProcess((ProcessEntry)entry);
} else if (entry instanceof IOObjectEntry) {
OpenAction.showAsResult((IOObjectEntry) entry);
}
}
});
setLayout(new BorderLayout());
JToolBar toolBar = new ExtendedJToolBar();
toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY));
toolBar.add(ADD_REPOSITORY_ACTION);
(new DropDownButton(new ResourceActionAdapter(true, "import")) {
private static final long serialVersionUID = -5482452738124971463L;
@Override
protected JPopupMenu getPopupMenu() {
JPopupMenu menu = new JPopupMenu();
menu.add(RapidMinerGUI.getMainFrame().IMPORT_CSV_FILE_ACTION);
menu.add(RapidMinerGUI.getMainFrame().IMPORT_EXCEL_FILE_ACTION);
menu.add(RapidMinerGUI.getMainFrame().IMPORT_XML_FILE_ACTION);
menu.add(RapidMinerGUI.getMainFrame().IMPORT_ACCESS_FILE_ACTION);
menu.add(RapidMinerGUI.getMainFrame().IMPORT_DATABASE_TABLE_ACTION);
menu.add(BlobImportWizard.IMPORT_BLOB_ACTION);
return menu;
}
}).addToToolBar(toolBar);
toolBar.add(tree.OPEN_ACTION);
toolBar.add(tree.REFRESH_ACTION);
toolBar.add(tree.CREATE_FOLDER_ACTION);
toolBar.add(tree.SHOW_PROCESS_IN_REPOSITORY_ACTION);
add(toolBar, BorderLayout.NORTH);
JScrollPane scrollPane = new ExtendedJScrollPane(tree);
scrollPane.setBorder(null);
add(scrollPane, BorderLayout.CENTER);
}
示例9: getDragListener
import com.rapidminer.gui.dnd.DragListener; //導入依賴的package包/類
/**
* Returns the {@link DragListener} for the process renderer.
*
* @return the listener, never {@code null}
*/
public DragListener getDragListener() {
return dragListener;
}