• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DockKey类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ResultTab

import com.vlsolutions.swing.docking.DockKey; //导入依赖的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


示例2: DockKey

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
/**
 *
 * Main constructor for the GUIOpenGL class
 *
 * @param glCanv : the OpenGL canvas to paint on
 * @param h : the Hypership instance
 */
public 						GUIOpenGL(GLCanvas glCanv, Hypership h)
{
	hyper = h;
	key = new DockKey("OpenGL");
	key.setName(" Membership View");
	key.setTooltip("Explore the hyperbolic membership.");
    key.setIcon(new ImageIcon("icons/member_view.gif"));
	key.setCloseEnabled(false);
	key.setAutoHideEnabled(false);
	key.setFloatEnabled(false);
	key.setMaximizeEnabled(true);
	key.setResizeWeight(1f);
	setLayout(new BorderLayout());
	this.setDropTarget(new DropTarget(this, this));
	add(glCanv, BorderLayout.CENTER);
}
 
开发者ID:florentw,项目名称:java-membership-protocol,代码行数:24,代码来源:GUIOpenGL.java


示例3: ResultTab

import com.vlsolutions.swing.docking.DockKey; //导入依赖的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


示例4: resetTabIcons

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
@Override
public void resetTabIcons() {
	// configure attach button
	attachAction = new AbstractAction("Attach") {

		private static final long serialVersionUID = 390635147992456838L;

		@Override
		public void actionPerformed(ActionEvent e) {
			desktop.setFloating(getDockable(), false);
		}
	};
	attachSmartIcon = new SmartIconJButton(attachAction);
	attachAction.putValue(Action.SHORT_DESCRIPTION, UIManager.get("DockViewTitleBar.attachButtonText"));
	attachSmartIcon.setIcon(UIManager.getIcon("DockViewTitleBar.attach"));
	attachSmartIcon.setPressedIcon(UIManager.getIcon("DockViewTitleBar.attach.pressed"));
	attachSmartIcon.setRolloverIcon(UIManager.getIcon("DockViewTitleBar.attach.rollover"));

	ArrayList<SmartIconJButton> icons = new ArrayList<SmartIconJButton>();
	DockKey dockKey = getDockable().getDockKey();
	if (dockKey.isCloseEnabled()) {
		icons.add(closeSmartIcon);
	}
	if (dockKey.isFloatEnabled()) {
		icons.add(attachSmartIcon);
	}
	if (icons.size() > 0) {
		SmartIconJButton[] iconsArray = icons.toArray(new SmartIconJButton[0]);
		smartIcon = new JTabbedPaneSmartIcon(dockKey.getIcon(), dockKey.getName(), null, null, true, iconsArray);
		smartIcon.setIconForTabbedPane(tabHeader);
		tabHeader.addTab("", smartIcon, getDockable().getComponent());
	} else {
		tabHeader.addTab(dockKey.getName(), dockKey.getIcon(), getDockable().getComponent());
	}

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:37,代码来源:DetachedDockViewAsTab.java


示例5: resetTabIcons

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
@Override
public void resetTabIcons() {
	// configure attach button
	attachAction = new LoggedAbstractAction("Attach") {

		private static final long serialVersionUID = 390635147992456838L;

		@Override
		public void loggedActionPerformed(ActionEvent e) {
			desktop.setFloating(getDockable(), false);
		}
	};
	attachSmartIcon = new SmartIconJButton(attachAction);
	attachAction.putValue(Action.SHORT_DESCRIPTION, UIManager.get("DockViewTitleBar.attachButtonText"));
	attachSmartIcon.setIcon(UIManager.getIcon("DockViewTitleBar.attach"));
	attachSmartIcon.setPressedIcon(UIManager.getIcon("DockViewTitleBar.attach.pressed"));
	attachSmartIcon.setRolloverIcon(UIManager.getIcon("DockViewTitleBar.attach.rollover"));

	ArrayList<SmartIconJButton> icons = new ArrayList<SmartIconJButton>();
	DockKey dockKey = getDockable().getDockKey();
	if (dockKey.isCloseEnabled()) {
		icons.add(closeSmartIcon);
	}
	if (dockKey.isFloatEnabled()) {
		icons.add(attachSmartIcon);
	}
	if (icons.size() > 0) {
		SmartIconJButton[] iconsArray = icons.toArray(new SmartIconJButton[0]);
		smartIcon = new JTabbedPaneSmartIcon(dockKey.getIcon(), dockKey.getName(), null, null, true, iconsArray);
		smartIcon.setIconForTabbedPane(tabHeader);
		tabHeader.addTab("", smartIcon, getDockable().getComponent());
	} else {
		tabHeader.addTab(dockKey.getName(), dockKey.getIcon(), getDockable().getComponent());
	}

}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:37,代码来源:DetachedDockViewAsTab.java


示例6: ResultTab

import com.vlsolutions.swing.docking.DockKey; //导入依赖的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);
	// results can be closed with ctrl+w
	this.dockKey.putProperty(DockKey.PROPERTY_SHORTCUT_CLOSING_ENABLED, Boolean.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);

	addLicenseLimitListener();

}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:28,代码来源:ResultTab.java


示例7: DockKey

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
/**
* 
* Main constructor for the GUIFileExplorer.
* Allocates all memory resources.
* 
*/
  public 						GUIFileExplorer()
  {
  	initTreeSys(".");
  	key = new DockKey("File Explorer");
      setLayout(new BorderLayout());
      jsp = new JScrollPane(tree);
      jsp.setPreferredSize(new Dimension(200, 200));
      JButton changeRoot = new JButton("Change root ...");
changeRoot.setToolTipText("Changes the root directory.");
changeRoot.addActionListener(new ActionListener(){
       public void actionPerformed(ActionEvent e)
       {
       	JFileChooser		fileChoose = new JFileChooser();
       	
       	fileChoose.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
   		int returnVal = fileChoose.showOpenDialog(fileChoose);
   		if (returnVal == JFileChooser.APPROVE_OPTION)
   		{
   			File file = fileChoose.getSelectedFile();
   			initTreeSys(file.getAbsolutePath());
   			remove(jsp);
   	        jsp = new JScrollPane(tree);
   	        add(jsp, BorderLayout.CENTER);
   	        revalidate();
   			//repaint();
   		}
       }});
add(changeRoot, BorderLayout.NORTH);
      add(jsp, BorderLayout.CENTER);
      key.setName(" Explorer");
      key.setTooltip("Explore your filesystem.");
      key.setIcon(new ImageIcon("icons/file_explorer.gif"));
      key.setAutoHideBorder(DockingConstants.HIDE_LEFT);
      key.setMaximizeEnabled(false);
      key.setCloseEnabled(false);
      
  }
 
开发者ID:florentw,项目名称:java-membership-protocol,代码行数:44,代码来源:GUIFileExplorer.java


示例8: updatePageComponentProperties

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
protected void updatePageComponentProperties(PageComponent pageComponent) {
    Dockable dockable = getDockable(pageComponent);
    DockKey dockKey = dockable.getDockKey();

    if (pageComponent.getIcon() != null) {
        dockKey.setIcon(pageComponent.getIcon());
    }
    dockKey.setName(pageComponent.getDisplayName());
    dockKey.setTooltip(pageComponent.getCaption());
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:11,代码来源:VLDockingApplicationPage.java


示例9: ViewDescriptorDockable

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
public ViewDescriptorDockable(ViewDescriptor viewDescriptor,
        PageComponent pageComponent) {
    this.viewDescriptor = viewDescriptor;
    this.pageComponent = pageComponent;
    this.dockKey = new DockKey(viewDescriptor.getId());

    dockKey.setName(viewDescriptor.getDisplayName());
    dockKey.setTooltip(viewDescriptor.getCaption());
    dockKey.setIcon(viewDescriptor.getIcon());

    boolean autoHideEnabled = VLDockingViewDescriptor.DEFAULT_AUTOHIDEENABLED;
    Hide autoHideBorder = VLDockingViewDescriptor.DEFAULT_AUTOHIDEBORDER;
    boolean closeEnabled = VLDockingViewDescriptor.DEFAULT_CLOSEENABLED;
    boolean floatEnabled = VLDockingViewDescriptor.DEFAULT_FLOATENABLED;
    boolean maximizeEnabled = VLDockingViewDescriptor.DEFAULT_MAXIMIZEENABLED;

    if (viewDescriptor instanceof VLDockingViewDescriptor) {
        VLDockingViewDescriptor dockingViewDescriptor = (VLDockingViewDescriptor) viewDescriptor;
        autoHideEnabled = dockingViewDescriptor.isAutoHideEnabled();
        autoHideBorder = dockingViewDescriptor.getAutoHideBorder();
        closeEnabled = dockingViewDescriptor.isCloseEnabled();
        floatEnabled = dockingViewDescriptor.isFloatEnabled();
        maximizeEnabled = dockingViewDescriptor.isMaximizeEnabled();
    }
    dockKey.setAutoHideEnabled(autoHideEnabled);
    dockKey.setAutoHideBorder(autoHideBorder);
    dockKey.setCloseEnabled(closeEnabled);
    dockKey.setFloatEnabled(floatEnabled);
    dockKey.setMaximizeEnabled(maximizeEnabled);
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:31,代码来源:ViewDescriptorDockable.java


示例10: resetTabIcons

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
@Override
public void resetTabIcons(){
	// configure attach button
	attachAction = new AbstractAction("Attach") {
		private static final long serialVersionUID = 390635147992456838L;

		public void actionPerformed(ActionEvent e){
			desktop.setFloating(getDockable(), false);
		}
	};
	attachSmartIcon = new SmartIconJButton(attachAction);
	attachAction.putValue(AbstractAction.SHORT_DESCRIPTION, UIManager.get("DockViewTitleBar.attachButtonText"));
	attachSmartIcon.setIcon(UIManager.getIcon("DockViewTitleBar.attach"));
	attachSmartIcon.setPressedIcon(UIManager.getIcon("DockViewTitleBar.attach.pressed"));
	attachSmartIcon.setRolloverIcon(UIManager.getIcon("DockViewTitleBar.attach.rollover"));
	
	ArrayList<SmartIconJButton> icons = new ArrayList<SmartIconJButton>();
	DockKey dockKey = getDockable().getDockKey();
	if (dockKey.isCloseEnabled()){
		icons.add(closeSmartIcon);
	}
	if (dockKey.isFloatEnabled()){
		icons.add(attachSmartIcon);
	}
	if (icons.size()> 0){
		SmartIconJButton [] iconsArray = (SmartIconJButton[]) icons.toArray(new SmartIconJButton[0]);
		smartIcon = new JTabbedPaneSmartIcon(dockKey.getIcon(), dockKey.getName(), iconsArray);
		smartIcon.setIconForTabbedPane(tabHeader);
		tabHeader.addTab("", smartIcon, getDockable().getComponent());
	} else {
		tabHeader.addTab(dockKey.getName(), dockKey.getIcon(), getDockable().getComponent());
	}

}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:35,代码来源:DetachedDockViewAsTab.java


示例11: getDockKey

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
@Override
public DockKey getDockKey() {
	return DOCK_KEY;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:5,代码来源:RepositoryBrowser.java


示例12: fill

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
private void fill() {
	removeAll();
	DockableState[] dockables = dockingContext.getDesktopList().get(0).getDockables();
	List<DockableState> sorted = new LinkedList<>();
	sorted.addAll(Arrays.asList(dockables));
	Collections.sort(sorted, new Comparator<DockableState>() {

		@Override
		public int compare(DockableState o1, DockableState o2) {
			return o1.getDockable().getDockKey().getName().compareTo(o2.getDockable().getDockKey().getName());
		}
	});
	for (final DockableState state : sorted) {
		if (state.getDockable() instanceof DummyDockable) {
			continue;
		}
		DockKey dockKey = state.getDockable().getDockKey();
		boolean cont = false;
		for (String prefix : HIDE_IN_DOCKABLE_MENU_PREFIX_REGISTRY) {
			if (dockKey.getKey().startsWith(prefix)) {
				cont = true;
				break;
			}
		}
		if (cont) {
			continue;
		}
		String description = null;
		if (dockKey instanceof ResourceDockKey) {
			description = ((ResourceDockKey) dockKey).getShortDescription();
		}
		description = description != null ? description : "";
		String text = dockKey.getName();
		if (SystemInfoUtilities.getOperatingSystem() != OperatingSystem.OSX) {
			// OS X cannot use html in menus so only do it for other OS
			text = "<html><p style='margin-left:5'><b>" + dockKey.getName() + "</b><br/>" + description + "</p></html>";
		}
		JCheckBoxMenuItem item = new JCheckBoxMenuItem(text, dockKey.getIcon());

		item.setSelected(!state.isClosed());
		item.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				if (state.isClosed()) {
					dockingContext.getDesktopList().get(0).addDockable(state.getDockable());
				} else {
					dockingContext.getDesktopList().get(0).close(state.getDockable());
				}
			}

		});

		// special handling for results overview dockable in Results perspective
		// this dockable is not allowed to be closed so we disable this item while in said
		// perspective
		if (RapidMinerGUI.getMainFrame().getPerspectiveController().getModel().getSelectedPerspective().getName()
				.equals(PerspectiveModel.RESULT)
				&& ResultDisplay.RESULT_DOCK_KEY.equals(state.getDockable().getDockKey().getKey())) {
			item.setEnabled(false);
		}

		add(item);
	}

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:67,代码来源:DockableMenu.java


示例13: getDockKey

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
@Override
public DockKey getDockKey() {
	return dockKey;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:5,代码来源:IOObjectCacheViewer.java


示例14: ProcessLogTab

import com.vlsolutions.swing.docking.DockKey; //导入依赖的package包/类
public ProcessLogTab(String key) {
	setLayout(new BorderLayout());
	this.dockKey = new DockKey(key);
	dockKey.setIcon(DATA_TABLE_ICON);
	dockKey.setDockGroup(MainFrame.DOCK_GROUP_RESULTS);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:7,代码来源:ProcessLogTab.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TextEditBasedChange类代码示例发布时间:2022-05-22
下一篇:
Java SimpleMessage类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap