本文整理汇总了Java中org.eclipse.gef.palette.SelectionToolEntry类的典型用法代码示例。如果您正苦于以下问题:Java SelectionToolEntry类的具体用法?Java SelectionToolEntry怎么用?Java SelectionToolEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SelectionToolEntry类属于org.eclipse.gef.palette包,在下文中一共展示了SelectionToolEntry类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createToolBar
import org.eclipse.gef.palette.SelectionToolEntry; //导入依赖的package包/类
/**
* Creates a new JDPalette object.
*
* @param paletteRoot
* the palette root
*/
public static void createToolBar(PaletteRoot paletteRoot) {
PaletteToolbar paletteToolbar = new PaletteToolbar("toolbar"); //$NON-NLS-1$
paletteToolbar.add(new SelectionToolEntry());
paletteToolbar.add(new JDMarqueeToolEntry());
paletteRoot.add(paletteToolbar);
}
示例2: createControlGroup
import org.eclipse.gef.palette.SelectionToolEntry; //导入依赖的package包/类
private static PaletteContainer createControlGroup(PaletteRoot root)
{
PaletteGroup controlGroup = new PaletteGroup("Control Group");
List<PaletteEntry> tools = new ArrayList<PaletteEntry>();
ToolEntry selectionTool = new SelectionToolEntry();
tools.add(selectionTool);
root.setDefaultEntry(selectionTool);
controlGroup.addAll(tools);
return controlGroup;
}
示例3: createControlGroup
import org.eclipse.gef.palette.SelectionToolEntry; //导入依赖的package包/类
private static PaletteContainer createControlGroup(PaletteRoot root)
{
PaletteGroup controlGroup = new PaletteGroup("Control Group");
List<PaletteEntry> tools = new ArrayList<PaletteEntry>();
ToolEntry selectionTool = new SelectionToolEntry();
tools.add(selectionTool);
root.setDefaultEntry(selectionTool);
// ToolEntry connectionCreationTool = new ConnectionCreationToolEntry("Connection",
// "Create a connection", null, null, null);
// tools.add(connectionCreationTool);
controlGroup.addAll(tools);
return controlGroup;
}
示例4: addSelectionTool
import org.eclipse.gef.palette.SelectionToolEntry; //导入依赖的package包/类
private void addSelectionTool() {
SelectionToolEntry entry = new SelectionToolEntry();
group.add(entry);
group.add(new MarqueeToolEntry());
setDefaultEntry(entry);
}
示例5: createPaletteGroup
import org.eclipse.gef.palette.SelectionToolEntry; //导入依赖的package包/类
private static PaletteGroup createPaletteGroup() {
PaletteGroup selectionGroup = new PaletteGroup("Selections");
selectionGroup.add(new SelectionToolEntry());
return selectionGroup;
}
示例6: addSelectionTool
import org.eclipse.gef.palette.SelectionToolEntry; //导入依赖的package包/类
/** This method add the {@link SelectionTool} to the palett. */
private void addSelectionTool() {
SelectionToolEntry entry = new SelectionToolEntry();
group.add(entry);
setDefaultEntry(entry);
}
示例7: buildPalette
import org.eclipse.gef.palette.SelectionToolEntry; //导入依赖的package包/类
/**
* Builds the palette entries.
*/
protected void buildPalette() {
keyboardMapping = new HashMap();
// a group of default control tools
PaletteGroup controls = new PaletteGroup(Messages.getString("FmdPaletteRoot.controls")); //$NON-NLS-1$
// the selection tool; default tool
ToolEntry tool = new SelectionToolEntry();
controls.add(tool);
setDefaultEntry(tool);
ToolEntry entry = new URNElementCreationEntry(
"Comment", Messages.getString("FmdPaletteRoot.CreateAComment"), Comment.class, new ModelCreationFactory(getURNspec(), Comment.class), JUCMNavPlugin.getImageDescriptor("icons/Comment16.gif"), ImageDescriptor.createFromFile( //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
JUCMNavPlugin.class, "icons/Comment24.gif")); //$NON-NLS-1$
controls.add(entry);
keyboardMapping.put("q", entry); //$NON-NLS-1$
add(controls);
//A group of links
PaletteDrawer linksDrawer = new PaletteDrawer(Messages.getString("FmdPaletteRoot.links")); //$NON-NLS-1$
// Add a decomposition
entry = new BaseConnectionCreationToolEntry(
Messages.getString("FmdPaletteRoot.decomposition"), Messages.getString("FmdPaletteRoot.createDecomposition"), new ModelCreationFactory(getURNspec(), Decomposition.class), //$NON-NLS-1$ //$NON-NLS-2$
JUCMNavPlugin.getImageDescriptor("icons/Decomposition16.gif"), ImageDescriptor.createFromFile( //$NON-NLS-1$
JUCMNavPlugin.class, "icons/Decomposition24.gif")); //$NON-NLS-1$
linksDrawer.add(entry);
keyboardMapping.put("d", entry); //$NON-NLS-1$
// Add a mandatory
entry = new BaseConnectionCreationToolEntry(
Messages.getString("FmdPaletteRoot.mandatory"), Messages.getString("FmdPaletteRoot.createMandatory"), new ModelCreationFactory(getURNspec(), Dependency.class), //$NON-NLS-1$ //$NON-NLS-2$
JUCMNavPlugin.getImageDescriptor("icons/Mandatory16.gif"), ImageDescriptor.createFromFile( //$NON-NLS-1$
JUCMNavPlugin.class, "icons/Mandatory24.gif")); //$NON-NLS-1$
linksDrawer.add(entry);
add(linksDrawer);
//A group of elements
PaletteDrawer elementsDrawer = new PaletteDrawer(Messages.getString("FmdPaletteRoot.elements")); //$NON-NLS-1$
entry = new URNElementCreationEntry(
Messages.getString("FmdPaletteRoot.task"), Messages.getString("FmdPaletteRoot.createTask"), IntentionalElementRef.class, new ModelCreationFactory(getURNspec(), IntentionalElementRef.class, //$NON-NLS-1$ //$NON-NLS-2$
IntentionalElementType.TASK), JUCMNavPlugin.getImageDescriptor("icons/Task16.gif"), ImageDescriptor.createFromFile( //$NON-NLS-1$
JUCMNavPlugin.class, "icons/Task24.gif")); //$NON-NLS-1$
elementsDrawer.add(entry);
keyboardMapping.put("t", entry); //$NON-NLS-1$
add(elementsDrawer);
}