當前位置: 首頁>>代碼示例>>Java>>正文


Java DragListener類代碼示例

本文整理匯總了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() {}
	});
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:14,代碼來源:RepositoryTree.java

示例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);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:13,代碼來源:PlotConfigurationTree.java

示例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();
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:19,代碼來源:NewOperatorEditor.java

示例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);
	}
}
 
開發者ID:rapidminer,項目名稱:rapidminer-studio,代碼行數:18,代碼來源:NewOperatorEditor.java

示例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);
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:13,代碼來源:PlotConfigurationTree.java

示例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();        
   }
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:16,代碼來源:NewOperatorEditor.java

示例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);
}
 
開發者ID:rapidminer,項目名稱:rapidminer-studio,代碼行數:71,代碼來源:RepositoryBrowser.java

示例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);		
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:50,代碼來源:RepositoryBrowser.java

示例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;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:9,代碼來源:ProcessRendererView.java


注:本文中的com.rapidminer.gui.dnd.DragListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。