Java 类org.eclipse.gef.palette.PaletteToolbar 实例源码

项目:gef-gwt    文件:PaletteEditPartFactory.java   
/**
 * @see org.eclipse.gef.EditPartFactory#createEditPart(EditPart, Object)
 */
public EditPart createEditPart(EditPart parentEditPart, Object model) {
    if (model instanceof PaletteRoot)
        return createMainPaletteEditPart(parentEditPart, model);
    if (model instanceof PaletteStack)
        return createStackEditPart(parentEditPart, model);
    if (model instanceof PaletteContainer) {
        Object type = ((PaletteContainer) model).getType();
        if (PaletteDrawer.PALETTE_TYPE_DRAWER.equals(type))
            return createDrawerEditPart(parentEditPart, model);
        if (PaletteGroup.PALETTE_TYPE_GROUP.equals(type)
                || PaletteContainer.PALETTE_TYPE_UNKNOWN.equals(type))
            return createGroupEditPart(parentEditPart, model);
        if (PaletteToolbar.PALETTE_TYPE_TOOLBAR_GROUP.equals(type))
            return createToolbarEditPart(parentEditPart, model);
    }
    if (model instanceof PaletteTemplateEntry)
        return createTemplateEditPart(parentEditPart, model);
    if (model instanceof PaletteSeparator)
        return createSeparatorEditPart(parentEditPart, model);
    if (model instanceof PaletteEntry)
        return createEntryEditPart(parentEditPart, model);
    return null;
}
项目:Hydrograph    文件:ELTGraphicalEditor.java   
private void createToolsGroup(PaletteRoot palette) {
    PaletteToolbar toolbar = new PaletteToolbar("Tools");

    // Add a selection tool to the group
    //      ToolEntry tool = new PanningSelectionToolEntry();
    //      toolbar.add(tool);
    //      palette.setDefaultEntry(tool);

    palette.add(toolbar);
}
项目:PDFReporter-Studio    文件:JDPaletteFactory.java   
/**
 * 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);
}
项目:gef-gwt    文件:PaletteEditPartFactory.java   
/**
 * Create ToolbarEditPart - edit part for PaletteToolbar
 * 
 * @param parentEditPart
 *            the parent of the new editpart to be created
 * @param model
 *            the PaletteToolbar
 * @return the newly created EditPart
 */
protected EditPart createToolbarEditPart(EditPart parentEditPart,
        Object model) {
    return new ToolbarEditPart((PaletteToolbar) model);
}
项目:gef-gwt    文件:ToolbarEditPart.java   
/**
 * Creates a new instance.
 * 
 * @param model
 *            the <code>PaletteToolbar</code>
 */
public ToolbarEditPart(PaletteToolbar model) {
    super(model);
}