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


Java DockKey.getName方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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


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