本文整理汇总了Java中com.vlsolutions.swing.docking.Dockable类的典型用法代码示例。如果您正苦于以下问题:Java Dockable类的具体用法?Java Dockable怎么用?Java Dockable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Dockable类属于com.vlsolutions.swing.docking包,在下文中一共展示了Dockable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createDockableContainer
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
@Override
public SingleDockableContainer createDockableContainer(Dockable dockable, ParentType parentType) {
switch (parentType) {
case PARENT_TABBED_CONTAINER:
return new TabbedDockView(dockable);
case PARENT_DESKTOP:
return new MaximizedDockViewAsTab(dockable);
case PARENT_SPLIT_CONTAINER:
return new DockViewAsTab(dockable);
case PARENT_DETACHED_WINDOW:
// specific floating dock view is anchored here
return new DetachedDockViewAsTab(dockable);
default:
throw new RuntimeException("Wrong dockable container type");
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:18,代码来源:RapidDockableContainerFactory.java
示例2: storeScrollBarPositions
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* This method saves scroll positions of all {@link JScrollPane}s in the current Perspective.
*/
private void storeScrollBarPositions() {
MainFrame mainFrame = RapidMinerGUI.getMainFrame();
if (mainFrame != null) {
DockableState[] states = mainFrame.getDockingDesktop().getContext().getDockables();
for (DockableState state : states) {
Dockable dockable = state.getDockable();
if (dockable.getComponent() instanceof Container) {
JScrollPane scrollPane = findScrollPane((Container) dockable.getComponent());
if (scrollPane != null) {
ScrollBarsPosition scrollBarsPosition = new ScrollBarsPosition(
scrollPane.getVerticalScrollBar().getValue(),
scrollPane.getHorizontalScrollBar().getValue());
scrollBarsPositions.put(dockable, scrollBarsPosition);
}
}
}
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:22,代码来源:PerspectiveProperties.java
示例3: ResultTab
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
public ResultTab(String id) {
setLayout(new BorderLayout());
this.id = id;
this.dockKey = new DockKey(id, "Result " + id);
this.dockKey.setDockGroup(MainFrame.DOCK_GROUP_RESULTS);
this.dockKey.setName(id);
this.dockKey.setFloatEnabled(true);
this.dockKey.setIconDisplayed(true);
DockableActionCustomizer customizer = new DockableActionCustomizer() {
@Override
public void visitTabSelectorPopUp(JPopupMenu popUpMenu, Dockable dockable) {
popUpMenu.add(new JMenuItem(new StoreInRepositoryAction(resultObject)));
popUpMenu.add(new JMenuItem(new CloseAllResultsAction(RapidMinerGUI.getMainFrame())));
}
};
customizer.setTabSelectorPopUpCustomizer(true); // enable tabbed dock custom popup menu
// entries
this.dockKey.setActionCustomizer(customizer);
label = makeStandbyLabel();
add(label, BorderLayout.CENTER);
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:23,代码来源:ResultTab.java
示例4: DockableResultDisplay
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
public DockableResultDisplay() {
this.dockKey.setDockGroup(MainFrame.DOCK_GROUP_RESULTS);
DockableActionCustomizer customizer = new DockableActionCustomizer() {
@Override
public void visitTabSelectorPopUp(JPopupMenu popUpMenu, Dockable dockable) {
popUpMenu.add(new JMenuItem(new CloseAllResultsAction(RapidMinerGUI.getMainFrame())));
}
};
customizer.setTabSelectorPopUpCustomizer(true); // enable tabbed dock custom popup menu
// entries
this.dockKey.setActionCustomizer(customizer);
setLayout(new BorderLayout());
ExtendedJScrollPane overviewScrollpane = new ExtendedJScrollPane(overview);
overviewScrollpane.setBorder(null);
overviewScrollpane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
overviewScrollpane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
add(overviewScrollpane, BorderLayout.CENTER);
tableUpdateQueue.start();
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:21,代码来源:DockableResultDisplay.java
示例5: clearNow
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
private void clearNow(boolean alsoClearLogs) {
List<Dockable> toClose = new LinkedList<>();
for (DockableState state : RapidMinerGUI.getMainFrame().getDockingDesktop().getContext().getDockables()) {
if (state.getDockable().getDockKey().getKey().startsWith(ResultTab.DOCKKEY_PREFIX + "process_")
|| alsoClearLogs && state.getDockable().getDockKey().getKey().startsWith(ProcessLogTab.DOCKKEY_PREFIX)) {
toClose.add(state.getDockable());
}
}
if (!toClose.isEmpty() || !dataTables.isEmpty()) {
// fix for "delete old results" dialog after breakpoint resume
if (closeResultsPerRun) {
DockableResultDisplay.this.dataTables.clear();
// updateDataTables();
for (Dockable dockable : toClose) {
if (dockable instanceof ResultTab) {
((ResultTab) dockable).freeResources();
} else if (dockable instanceof ProcessLogTab) {
((ProcessLogTab) dockable).freeResources();
}
// RapidMinerGUI.getMainFrame().getDockingDesktop().close(dockable);
RapidMinerGUI.getMainFrame().getPerspectiveController().removeFromAllPerspectives(dockable);
}
}
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:26,代码来源:DockableResultDisplay.java
示例6: storeScrollBarPositions
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* This method saves scroll positions of all {@link JScrollPane}s in the current Perspective.
*/
private void storeScrollBarPositions() {
MainFrame mainFrame = RapidMinerGUI.getMainFrame();
if (mainFrame != null) {
DockableState[] states = mainFrame.getDockingDesktop().getContext().getDockables();
for (DockableState state : states) {
Dockable dockable = state.getDockable();
if (dockable.getComponent() instanceof Container) {
JScrollPane scrollPane = findScrollPane((Container) dockable.getComponent());
if (scrollPane != null) {
ScrollBarsPosition scrollBarsPosition = new ScrollBarsPosition(
scrollPane.getVerticalScrollBar().getValue(),
scrollPane.getHorizontalScrollBar().getValue());
scrollBarsPositions.put(dockable.getDockKey().getKey(), scrollBarsPosition);
}
}
}
}
}
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:22,代码来源:PerspectiveProperties.java
示例7: clearNow
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
private void clearNow(boolean alsoClearLogs) {
List<Dockable> toClose = new LinkedList<>();
for (DockableState state : RapidMinerGUI.getMainFrame().getDockingDesktop().getContext().getDockables()) {
if (state.getDockable().getDockKey().getKey().startsWith(ResultTab.DOCKKEY_PREFIX + "process_")
|| alsoClearLogs && state.getDockable().getDockKey().getKey().startsWith(ProcessLogTab.DOCKKEY_PREFIX)) {
toClose.add(state.getDockable());
}
}
if (!toClose.isEmpty() || !dataTables.isEmpty()) {
// fix for "delete old results" dialog after breakpoint resume
if (closeResultsPerRun) {
DockableResultDisplay.this.dataTables.clear();
// updateDataTables();
for (Dockable dockable : toClose) {
if (dockable instanceof ResultTab) {
((ResultTab) dockable).freeResources();
} else if (dockable instanceof ProcessLogTab) {
((ProcessLogTab) dockable).freeResources();
}
// RapidMinerGUI.getMainFrame().getDockingDesktop().close(dockable);
RapidMinerGUI.getMainFrame().getPerspectiveController().removeFromAllPerspectives(dockable);
}
getDockKey().resetPropertyChangeListener();
}
}
}
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:27,代码来源:DockableResultDisplay.java
示例8: createDockableContainer
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
@Override
public SingleDockableContainer createDockableContainer(Dockable dockable, ParentType parentType) {
switch (parentType){
case PARENT_TABBED_CONTAINER:
return new TabbedDockView(dockable);
case PARENT_DESKTOP:
return new MaximizedDockViewAsTab(dockable);
case PARENT_SPLIT_CONTAINER:
return new DockViewAsTab(dockable);
case PARENT_DETACHED_WINDOW:
// specific floating dock view is anchored here
return new DetachedDockViewAsTab(dockable);
default :
throw new RuntimeException("Wrong dockable container type");
}
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:18,代码来源:RapidDockableContainerFactory.java
示例9: removeFromAllPerspectives
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
public void removeFromAllPerspectives(Dockable dockable) {
//DockingDesktop dockingDesktop = (DockingDesktop)context.getDesktopList().get(0);
//dockingDesktop.getDockableState(dockable)
//dockingDesktop.unregisterDockable(dockable);
//dockingDesktop.close(dockable);
//dockingDesktop.remove(dockable);
context.unregisterDockable(dockable);
// TODO: Remove from Workspaces
WSDockKey key = new WSDockKey(dockable.getDockKey().getKey());
for (Perspective persp : perspectives.values()) {
if (persp == current) {
continue;
}
persp.getWorkspace().getDesktop(0).removeNode(key);
}
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:18,代码来源:ApplicationPerspectives.java
示例10: ResultTab
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
public ResultTab(String id) {
setLayout(new BorderLayout());
this.id = id;
this.dockKey = new DockKey(id, "Result "+id);
this.dockKey.setDockGroup(MainFrame.DOCK_GROUP_RESULTS);
this.dockKey.setName(id);
this.dockKey.setFloatEnabled(true);
DockableActionCustomizer customizer = new DockableActionCustomizer(){
@Override
public void visitTabSelectorPopUp(JPopupMenu popUpMenu, Dockable dockable){
popUpMenu.add(new JMenuItem(new CloseAllResultsAction(RapidMinerGUI.getMainFrame())));
}
};
customizer.setTabSelectorPopUpCustomizer(true); // enable tabbed dock custom popup menu entries
this.dockKey.setActionCustomizer(customizer);
label = makeStandbyLabel();
add(label, BorderLayout.NORTH);
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:20,代码来源:ResultTab.java
示例11: DockableResultDisplay
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
public DockableResultDisplay() {
this.dockKey.setDockGroup(MainFrame.DOCK_GROUP_RESULTS);
DockableActionCustomizer customizer = new DockableActionCustomizer(){
@Override
public void visitTabSelectorPopUp(JPopupMenu popUpMenu, Dockable dockable){
popUpMenu.add(new JMenuItem(new CloseAllResultsAction(RapidMinerGUI.getMainFrame())));
}
};
customizer.setTabSelectorPopUpCustomizer(true); // enable tabbed dock custom popup menu entries
this.dockKey.setActionCustomizer(customizer);
setLayout(new BorderLayout());
ExtendedJScrollPane overviewScrollpane = new ExtendedJScrollPane(overview);
overviewScrollpane.setBorder(null);
overviewScrollpane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
overviewScrollpane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
add(overviewScrollpane, BorderLayout.CENTER);
tableUpdateQueue.start();
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:20,代码来源:DockableResultDisplay.java
示例12: clearNow
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
private void clearNow(boolean alsoClearLogs) {
List<Dockable> toClose = new LinkedList<Dockable>();
for (DockableState state : RapidMinerGUI.getMainFrame().getDockingDesktop().getContext().getDockables()) {
if (state.getDockable().getDockKey().getKey().startsWith(ResultTab.DOCKKEY_PREFIX+"process_") ||
(alsoClearLogs && state.getDockable().getDockKey().getKey().startsWith(ProcessLogTab.DOCKKEY_PREFIX))) {
toClose.add(state.getDockable());
}
}
if ((!toClose.isEmpty() || !dataTables.isEmpty()) ) {
// fix for "delete old results" dialog after breakpoint resume
if (closeResultsPerRun) {
DockableResultDisplay.this.dataTables.clear();
//updateDataTables();
for (Dockable dockable : toClose) {
if (dockable instanceof ResultTab) {
((ResultTab) dockable).freeResources();
} else if (dockable instanceof ProcessLogTab) {
((ProcessLogTab) dockable).freeResources();
}
//RapidMinerGUI.getMainFrame().getDockingDesktop().close(dockable);
RapidMinerGUI.getMainFrame().getPerspectives().removeFromAllPerspectives(dockable);
}
}
}
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:26,代码来源:DockableResultDisplay.java
示例13: closeAllTutorialBrowsers
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* Attempts to close all instances of the {@link TutorialBrowser} (both visible and hidden).
*/
private void closeAllTutorialBrowsers() {
DockableState state = DockingTools.getDockableState(TutorialBrowser.TUTORIAL_BROWSER_DOCK_KEY);
Dockable browser = state.getDockable();
if (state != null) {
mainFrame.getDockingDesktop().close(browser);
mainFrame.getPerspectiveController().removeFromInvisiblePerspectives(browser);
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:12,代码来源:TutorialSelector.java
示例14: removeFromAllPerspectives
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* Removes all perspectives and the given dockable.
*/
public void removeFromAllPerspectives(final Dockable dockable) {
context.unregisterDockable(dockable);
// Should also be removed from the workspaces, but the
// vldocking framework does not support this
removeFromInvisiblePerspectives(dockable);
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:10,代码来源:PerspectiveController.java
示例15: removeFromInvisiblePerspectives
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* Removes the given {@link Dockable} from all perspectives except the one currently displayed.
*
* @param dockable
* the dockable to close
*/
public void removeFromInvisiblePerspectives(final Dockable dockable) {
WSDockKey key = new WSDockKey(dockable.getDockKey().getKey());
for (Perspective persp : model.getAllPerspectives()) {
if (persp == model.getSelectedPerspective()) {
continue;
}
persp.getWorkspace().getDesktop(0).removeNode(key);
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:16,代码来源:PerspectiveController.java
示例16: showTabInAllPerspectives
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* Shows the tab as a child of the given dockable in all perspectives.
*/
public void showTabInAllPerspectives(final Dockable dockable, final Dockable parent) {
DockableState dstate = context.getDockableState(dockable);
if (dstate != null && !dstate.isClosed()) {
return;
}
DockingDesktop dockingDesktop = context.getDesktopList().get(0);
context.registerDockable(dockable);
WSDockKey parentKey = new WSDockKey(parent.getDockKey().getKey());
WSDockKey key = new WSDockKey(dockable.getDockKey().getKey());
for (Perspective persp : model.getAllPerspectives()) {
if (persp == model.getSelectedPerspective()) {
continue;
}
// We don't need to show it if
// 1. We don't know the parent
// 2. We already have the child
boolean containsParent = persp.getWorkspace().getDesktop(0).containsNode(parentKey);
boolean containsChild = persp.getWorkspace().getDesktop(0).containsNode(key);
if (containsParent && !containsChild) {
persp.getWorkspace().getDesktop(0).createTab(parentKey, key, 1);
}
}
DockableState[] states = dockingDesktop.getDockables();
for (DockableState state : states) {
if (state.getDockable() == parent && !state.isClosed()) {
dockingDesktop.createTab(state.getDockable(), dockable, 1, true);
break;
}
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:38,代码来源:PerspectiveController.java
示例17: applyFocusedDockables
import com.vlsolutions.swing.docking.Dockable; //导入依赖的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
示例18: findExportComponents
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* Returns a list of printable components from the currently visible perspective.
*
* @return the components that can be exported as an image.
*/
public static final List<PrintableComponent> findExportComponents() {
List<PrintableComponent> components = new LinkedList<>();
// otherwise search for all PrintableComponents in current perspective
for (DockableState state : RapidMinerGUI.getMainFrame().getDockingDesktop().getDockables()) {
if (state.isHidden()) {
continue;
}
Dockable dockable = state.getDockable();
// if dockable is visible, search for PrintableComponents
Component component = dockable.getComponent();
if (component.isShowing()) {
findExportComponents(component, components);
}
}
// at last add MainFrame as printable component
Perspective currentPerspective = RapidMinerGUI.getMainFrame().getPerspectiveController().getModel()
.getSelectedPerspective();
String perspectiveName = I18N.getGUIMessage("gui.action.workspace_" + currentPerspective.getName() + ".label");
components.add(new SimplePrintableComponent(RapidMinerGUI.getMainFrame(), perspectiveName,
I18N.getGUIMessage("gui.action.workspace_" + currentPerspective.getName() + ".icon")));
return components;
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:33,代码来源:PrintingTools.java
示例19: isDockableOnScreen
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* method to get to know whether the dockable with the given key is on Screen
*
* @param dockableKey
* i18nKey of the wanted Dockable
* @return returns 1 if the Dockable is on the Screen but not showing, -1 if the Dockable is not
* on the Screen and 0 if the Dockable is on Screen and showing.
*/
public static int isDockableOnScreen(final String dockableKey) {
Dockable dock = RapidMinerGUI.getMainFrame().getDockingDesktop().getContext().getDockableByKey(dockableKey);
DockableState state = RapidMinerGUI.getMainFrame().getDockingDesktop().getDockableState(dock);
if (!state.isClosed()) {
if (dock.getComponent().isShowing()) {
return OBJECT_SHOWING_ON_SCREEN;
}
return OBJECT_NOT_SHOWING;
}
return OBJECT_NOT_ON_SCREEN;
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:21,代码来源:BubbleWindow.java
示例20: getDockableState
import com.vlsolutions.swing.docking.Dockable; //导入依赖的package包/类
/**
* Tries to resolve a {@link DockableState} with the given dockKey.
*
* @param dockKey
* The dock key of the desired {@link DockableState}
* @return If successful the found {@link DockableState}, otherwise <code>null</code>.
* @since 6.2.0
*/
public static DockableState getDockableState(String dockKey) {
MainFrame mainFrame = RapidMinerGUI.getMainFrame();
for (DockableState dockableState : mainFrame.getDockingDesktop().getDockables()) {
Dockable dockable = dockableState.getDockable();
if (dockable.getDockKey().getKey().equals(dockKey)) {
return dockableState;
}
}
return null;
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:19,代码来源:DockingTools.java
注:本文中的com.vlsolutions.swing.docking.Dockable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论