use of org.eclipse.gef.palette.PaletteStack in project archi by archimatetool.
the class ArchimateDiagramEditorPalette method createControlsGroup.
/**
* Create a Group of Controls
*/
private void createControlsGroup() {
PaletteContainer group = new PaletteToolbar(Messages.ArchimateDiagramEditorPalette_0);
// The selection tool
ToolEntry tool = new PanningSelectionToolEntry();
tool.setToolClass(PanningSelectionExtendedTool.class);
group.add(tool);
// Use selection tool as default entry
setDefaultEntry(tool);
PaletteStack stack = createMarqueeSelectionStack();
group.add(stack);
// Format Painter
formatPainterEntry = new FormatPainterToolEntry();
group.add(formatPainterEntry);
add(group);
// Relations group will be inserted before this
// $NON-NLS-1$
add(new PaletteSeparator("relations"));
}
use of org.eclipse.gef.palette.PaletteStack in project archi by archimatetool.
the class CanvasEditorPalette method createControlsGroup.
/**
* Create a Group of Controls
*/
private PaletteContainer createControlsGroup() {
PaletteContainer group = new PaletteToolbar(Messages.CanvasEditorPalette_0);
add(group);
// The selection tool
ToolEntry tool = new PanningSelectionToolEntry();
tool.setToolClass(PanningSelectionExtendedTool.class);
group.add(tool);
// Use selection tool as default entry
setDefaultEntry(tool);
PaletteStack stack = createMarqueeSelectionStack();
group.add(stack);
// Format Painter
formatPainterEntry = new FormatPainterToolEntry();
group.add(formatPainterEntry);
return group;
}
use of org.eclipse.gef.palette.PaletteStack in project archi by archimatetool.
the class AbstractPaletteRoot method createMarqueeSelectionStack.
/**
* Create a PaletteStack containing the Marquee selection tools
*/
protected PaletteStack createMarqueeSelectionStack() {
PaletteStack stack = new PaletteStack(Messages.AbstractPaletteRoot_0, Messages.AbstractPaletteRoot_1, null);
MarqueeToolEntry marquee = new MarqueeToolEntry(Messages.AbstractPaletteRoot_2);
marquee.setToolProperty(MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR, Integer.valueOf(MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS));
stack.add(marquee);
marquee = new MarqueeToolEntry(Messages.AbstractPaletteRoot_3);
marquee.setToolProperty(MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR, Integer.valueOf(MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_AND_RELATED_CONNECTIONS));
stack.add(marquee);
marquee = new MarqueeToolEntry(Messages.AbstractPaletteRoot_4);
marquee.setToolProperty(MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR, Integer.valueOf(MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED));
stack.add(marquee);
marquee = new MarqueeToolEntry(Messages.AbstractPaletteRoot_5);
marquee.setToolProperty(MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR, Integer.valueOf(MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED));
stack.add(marquee);
marquee = new MarqueeToolEntry(Messages.AbstractPaletteRoot_6);
marquee.setToolProperty(MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR, Integer.valueOf(MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED));
stack.add(marquee);
marquee = new MarqueeToolEntry(Messages.AbstractPaletteRoot_7);
marquee.setToolProperty(MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR, Integer.valueOf(MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED));
stack.add(marquee);
return stack;
}
use of org.eclipse.gef.palette.PaletteStack in project archi by archimatetool.
the class SketchEditorPalette method createControlsGroup.
/**
* Create a Group of Controls
*/
private PaletteContainer createControlsGroup() {
PaletteContainer group = new PaletteToolbar(Messages.SketchEditorPalette_0);
add(group);
// The selection tool
ToolEntry tool = new PanningSelectionToolEntry();
tool.setToolClass(PanningSelectionExtendedTool.class);
group.add(tool);
// Use selection tool as default entry
setDefaultEntry(tool);
PaletteStack stack = createMarqueeSelectionStack();
group.add(stack);
// Format Painter
formatPainterEntry = new FormatPainterToolEntry();
group.add(formatPainterEntry);
return group;
}
use of org.eclipse.gef.palette.PaletteStack in project archi by archimatetool.
the class PaletteStackFactory method createNewEntry.
/**
* @see org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#createNewEntry(org.eclipse.swt.widgets.Shell,
* org.eclipse.gef.palette.PaletteEntry)
*/
@Override
public PaletteEntry createNewEntry(Shell shell, PaletteEntry selected) {
PaletteContainer parent = determineContainerForNewEntry(selected);
int index = determineIndexForNewEntry(parent, selected);
PaletteEntry entry = createNewEntry(shell);
parent.remove(selected);
parent.add(index - 1, entry);
((PaletteStack) entry).add(selected);
entry.setUserModificationPermission(PaletteEntry.PERMISSION_FULL_MODIFICATION);
return entry;
}
Aggregations