当前位置: 首页>>代码示例>>Java>>正文


Java TabbedDockableContainer类代码示例

本文整理汇总了Java中com.vlsolutions.swing.docking.TabbedDockableContainer的典型用法代码示例。如果您正苦于以下问题:Java TabbedDockableContainer类的具体用法?Java TabbedDockableContainer怎么用?Java TabbedDockableContainer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TabbedDockableContainer类属于com.vlsolutions.swing.docking包,在下文中一共展示了TabbedDockableContainer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: storeFocusedDockables

import com.vlsolutions.swing.docking.TabbedDockableContainer; //导入依赖的package包/类
/**
 * This method saves all tabs which are currently selected/visible.
 */
private void storeFocusedDockables() {
	MainFrame mainFrame = RapidMinerGUI.getMainFrame();
	if (mainFrame != null) {
		focusedDockables = new ArrayList<>();
		DockableState[] states = mainFrame.getDockingDesktop().getContext().getDockables();
		List<TabbedDockableContainer> memorizedContainer = new ArrayList<>();
		for (DockableState state : states) {
			TabbedDockableContainer container = DockingUtilities.findTabbedDockableContainer(state.getDockable());
			if (container != null) {
				if (!memorizedContainer.contains(container)) {
					focusedDockables.add(container.getSelectedDockable());
					memorizedContainer.add(container);
				}
			}
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:21,代码来源:PerspectiveProperties.java

示例2: applyFocusedDockables

import com.vlsolutions.swing.docking.TabbedDockableContainer; //导入依赖的package包/类
/**
 * This method will make all tabs visible which were previously saved by
 * {@link #storeFocusedDockables()}.
 */
private void applyFocusedDockables() {
	for (Dockable dockable : focusedDockables) {
		TabbedDockableContainer tabbedContainer = DockingUtilities.findTabbedDockableContainer(dockable);
		if (tabbedContainer != null) {
			tabbedContainer.setSelectedDockable(dockable);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:13,代码来源:PerspectiveProperties.java

示例3: scanDrop

import com.vlsolutions.swing.docking.TabbedDockableContainer; //导入依赖的package包/类
@Override
protected void scanDrop(DockEvent event, boolean drop) {
	if (getParent() instanceof TabbedDockableContainer) {
		if (drop) {
			((DockDropEvent) event).rejectDrop();
		} else {
			((DockDragEvent) event).delegateDrag();
		}
		return;
	}
	if (event.getDragSource().getDockable() == dockable) {
		if (drop) {
			((DockDropEvent) event).rejectDrop();
		} else {
			((DockDragEvent) event).rejectDrag();
		}
		return;
	}
	if (event.getDragSource().getDockableContainer() instanceof TabbedDockableContainer) {
		if (drop) {
			((DockDropEvent) event).rejectDrop();
		} else {
			((DockDragEvent) event).rejectDrag();
		}
		return;
	}
	Rectangle bounds = getBounds();
	DockGroup sourceGroup = event.getDragSource().getDockable().getDockKey().getDockGroup();
	DockGroup destinationGroup = dockable.getDockKey().getDockGroup();
	if (!DockGroup.areGroupsCompatible(destinationGroup, sourceGroup)) {
		if (drop) {
			((DockDropEvent) event).rejectDrop();
		} else {
			((DockDragEvent) event).rejectDrag();
		}
		return;
	}
	Dockable sourceDockable = event.getDragSource().getDockable();
	DockableState.Location dockableLocation = sourceDockable.getDockKey().getLocation();
	DockableState.Location viewLocation = dockable.getDockKey().getLocation();
	if (drop) {
		event.setDockingAction(new DockingActionCreateTabEvent(event.getDesktop(), sourceDockable, dockableLocation,
				viewLocation, dockable, 0));
		((DockDropEvent) event).acceptDrop(false);
		desktop.createTab(dockable, event.getDragSource().getDockable(), 0, true);
	} else {
		Rectangle2D r2d = new Rectangle2D.Float(bounds.x, bounds.y, bounds.width, bounds.height);
		event.setDockingAction(new DockingActionCreateTabEvent(event.getDesktop(), sourceDockable, dockableLocation,
				viewLocation, dockable, 0));
		if (r2d.equals(lastDropShape)) {
			((DockDragEvent) event).acceptDrag(lastDropGeneralPath);
		} else {
			GeneralPath path = buildPathForTab(bounds);
			;
			lastDropShape = r2d;
			lastDropGeneralPath = path;
			((DockDragEvent) event).acceptDrag(lastDropGeneralPath);
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:61,代码来源:DetachedDockViewAsTab.java

示例4: scanDrop

import com.vlsolutions.swing.docking.TabbedDockableContainer; //导入依赖的package包/类
@Override
protected void scanDrop(DockEvent event, boolean drop){
	if (getParent() instanceof TabbedDockableContainer){
		if (drop){
			((DockDropEvent) event).rejectDrop();
		} else {
			((DockDragEvent) event).delegateDrag();
		}
		return;
	}
	if (event.getDragSource().getDockable() == dockable) {
		if (drop){
			((DockDropEvent) event).rejectDrop();
		} else {
			((DockDragEvent) event).rejectDrag();
		}
		return;
	}
	if (event.getDragSource().getDockableContainer() instanceof TabbedDockableContainer) {
		if (drop){
			((DockDropEvent) event).rejectDrop();
		} else {
			((DockDragEvent) event).rejectDrag();
		}
		return;
	}
	Rectangle bounds = getBounds();
	DockGroup sourceGroup = event.getDragSource().getDockable().getDockKey().getDockGroup();
	DockGroup destinationGroup = dockable.getDockKey().getDockGroup();
	if (!DockGroup.areGroupsCompatible(destinationGroup, sourceGroup)){
		if (drop){
			((DockDropEvent) event).rejectDrop();
		} else {
			((DockDragEvent) event).rejectDrag();
		}
		return;
	}
	Dockable sourceDockable = event.getDragSource().getDockable();
	DockableState.Location dockableLocation = sourceDockable.getDockKey().getLocation();
	DockableState.Location viewLocation = dockable.getDockKey().getLocation();
	if (drop){
		event.setDockingAction(new DockingActionCreateTabEvent(event.getDesktop(), sourceDockable, dockableLocation, viewLocation, dockable, 0));
		((DockDropEvent) event).acceptDrop(false);
		desktop.createTab(dockable, event.getDragSource().getDockable(), 0, true);
	} else {
		Rectangle2D r2d = new Rectangle2D.Float(bounds.x, bounds.y, bounds.width, bounds.height);
		event.setDockingAction(new DockingActionCreateTabEvent(event.getDesktop(), sourceDockable, dockableLocation, viewLocation, dockable, 0));
		if (r2d.equals(lastDropShape)) {
			((DockDragEvent) event).acceptDrag(lastDropGeneralPath);
		} else {
			GeneralPath path = buildPathForTab(bounds);;
			lastDropShape = r2d;
			lastDropGeneralPath = path;
			((DockDragEvent) event).acceptDrag(lastDropGeneralPath);
		}
	}    
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:58,代码来源:DetachedDockViewAsTab.java


注:本文中的com.vlsolutions.swing.docking.TabbedDockableContainer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。