Adds tools from self.toolbardata to self
963661
def add_tools(self):
        """"""

        for data in self.toolbardata:
            # tool type is in data[0]

            if data[0] == "T":
                # Simple tool

                _, msg_type, label, tool_tip = data
                icon = icons[label]

                self.label2id[label] = tool_id = wx.NewId()

                self.AddSimpleTool(tool_id, label, icon,
                                   short_help_string=tool_tip)

                self.ids_msgs[tool_id] = msg_type

                self.parent.Bind(wx.EVT_TOOL, self.OnTool, id=tool_id)

            elif data[0] == "S":
                # Separator

                self.AddSeparator()

            elif data[0] == "C":
                # Control

                _, control, tool_tip = data

                self.AddControl(control, label=tool_tip)

            elif data[0] == "O":
                # Check tool / option button

                _, label, tool_tip = data
                icon = icons[label]

                self.label2id[label] = tool_id = wx.NewId()

                self.AddCheckTool(tool_id, label, icon, icon, tool_tip)

            else:
                raise ValueError("Unknown tooltype " + str(data[0]))

        self.SetCustomOverflowItems([], [])
        self.Realize()

        # Adjust Toolbar size
        self.SetSize(self.DoGetBestSize())
1264290
def extend(self, **kwargs):
    """"""

    props = self.copy()
    props.update(kwargs)
    return TemplateData(**props)
1062292
def add_tooltip_to_highlighted_item(self, index):
        
        self.setItemData(index, self.itemText(index), Qt.ToolTipRole)
856837
public void addToolbarButtons(ToolScreen toolScreen)
    {
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, "Delete All", MenuConstants.DELETE, "Delete All", null);
    }
954415
public void addToolbarButtons(ToolScreen toolScreen)
    {
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, null);
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, UserGroup.USER_DETAIL, UserGroup.USER_ICON, UserGroup.USER_DETAIL, null);
    }
413038
def add_atype(self, ):
        
        i = self.atype_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            atype = item.internal_data()
            atype.projects.add(self._project)
            self.atypes.append(atype)
            item.set_parent(None)
1122240
public ToolScreen addToolbars()
    {
        ToolScreen screen = new ToolScreen(null, this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null);
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.RESET);
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.LOGIN);
        BaseApplication application = (BaseApplication)this.getTask().getApplication();
        String strDesc = application.getResources(ResourceConstants.MAIN_RESOURCE, true).getString(UserEntryScreen.CREATE_NEW_USER);
        String strCommand = Utility.addURLParam(null, DBParams.SCREEN, UserEntryScreen.class.getName());
        new SCannedBox(screen.getNextLocation(ScreenConstants.RIGHT_OF_LAST_BUTTON_WITH_GAP, ScreenConstants.DONT_SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, null, strDesc, MenuConstants.FORM, strCommand, MenuConstants.FORM + "Tip");
        return screen;
    }
864393
def install_tools(dependencies):
    
    tools = getattr(easy.options, "tools", {})
    for dependency in iterutil.flatten(dependencies):
        dependency = tools.get(dependency, dependency)
        try:
            pkg_resources.require(dependency)
        except pkg_resources.DistributionNotFound:
            vsh("pip", "install", "-q", dependency)
            dependency = pkg_resources.require(dependency)
            easy.info("Installed required tool %s" % (dependency,))
504842
def setup_toolbar(self):
        """"""
        self.savefig_btn = create_toolbutton(
            self, icon=ima.icon('filesave'),
            tip=_("Save Image As..."),
            triggered=self.emit_save_figure)
        self.delfig_btn = create_toolbutton(
            self, icon=ima.icon('editclear'),
            tip=_("Delete image"),
            triggered=self.emit_remove_figure)

        toolbar = QVBoxLayout()
        toolbar.setContentsMargins(0, 0, 0, 0)
        toolbar.setSpacing(1)
        toolbar.addWidget(self.savefig_btn)
        toolbar.addWidget(self.delfig_btn)
        toolbar.addStretch(2)

        return toolbar
1285413
public void addToolbarButtons(ToolScreen toolScreen)
    {
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, Packages.SCAN, MenuConstants.SELECT, Packages.SCAN, null);
    }
1268372
def create_toolbutton(entries, parent=None):
    
    btn = QtGui.QToolButton(parent)
    menu = QtGui.QMenu()
    actions = []

    for label, slot in entries:
        action = add_menu_action(menu, label, slot)
        actions.append(action)

    btn.setPopupMode(QtGui.QToolButton.MenuButtonPopup)
    btn.setDefaultAction(actions[0])
    btn.setMenu(menu)
    return btn, actions
963899
protected void addModulesToJetty(HandlerCollection handlers) throws Exception {
    	/* *************
         * Manager API
         * ************* */
        ServletContextHandler apiManServer = new ServletContextHandler(ServletContextHandler.SESSIONS);
        addSecurityHandler(apiManServer);
        apiManServer.setContextPath("/apiman");
        apiManServer.addEventListener(new Listener());
        apiManServer.addEventListener(new BeanManagerResourceBindingListener());
        apiManServer.addEventListener(new ResteasyBootstrap());
        apiManServer.addFilter(LocaleFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        apiManServer.addFilter(ApimanCorsFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        apiManServer.addFilter(DisableCachingFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        addAuthFilter(apiManServer);
        apiManServer.addFilter(DefaultSecurityContextFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        apiManServer.addFilter(RootResourceFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        apiManServer.addFilter(ManagerApiMicroServiceTxWatchdogFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        ServletHolder resteasyServlet = new ServletHolder(new HttpServletDispatcher());
        resteasyServlet.setInitParameter("javax.ws.rs.Application", ManagerApiMicroServiceApplication.class.getName());
        apiManServer.addServlet(resteasyServlet, "/*");

        apiManServer.setInitParameter("resteasy.injector.factory", "org.jboss.resteasy.cdi.CdiInjectorFactory");
        apiManServer.setInitParameter("resteasy.scan", "true");
        apiManServer.setInitParameter("resteasy.servlet.mapping.prefix", "");

        handlers.addHandler(apiManServer);

        /* ********** *
         * Manager UI *
         * ********** */
        ResourceHandler apimanUiServer = new ResourceHandler() {
            /**
             * @see org.eclipse.jetty.server.handler.ResourceHandler#getResource(java.lang.String)
             */
            @Override
            public Resource getResource(String path) {
                Resource resource = null;

                if (path == null || path.equals("/") || path.equals("/index.html")) {
                    path = "/index.html";
                }
                if (path.startsWith("/apimanui/api-manager") || path.equals("/apimanui") || path.equals("/apimanui/")) {
                    path = "/apimanui/index.html";
                }
                if (path.equals("/apimanui/apiman/config.js")) {
                    resource = getConfigResource(path);
                }
                if (path.equals("/apimanui/apiman/translations.js")) {
                    resource = getTranslationsResource(path);
                }

                if (resource == null) {
                    URL url = getClass().getResource(path);
                    if (url != null) {
                        resource = new ApimanResource(url);
                    }
                }

                return resource;
            }
        };
        apimanUiServer.setResourceBase("/apimanui/");
        apimanUiServer.setWelcomeFiles(new String[] { "index.html" });
        handlers.addHandler(apimanUiServer);
    }
301850
def make_tool(uri,                # type: Union[Text, CommentedMap, CommentedSeq]
              loadingContext      # type: LoadingContext
             ):  # type: (...) -> Process
    """"""
    if loadingContext.loader is None:
        raise ValueError("loadingContext must have a loader")
    resolveduri, metadata = loadingContext.loader.resolve_ref(uri)

    processobj = None
    if isinstance(resolveduri, MutableSequence):
        for obj in resolveduri:
            if obj['id'].endswith('#main'):
                processobj = obj
                break
        if not processobj:
            raise WorkflowException(
                u"Tool file contains graph of multiple objects, must specify "
                "one of #%s" % ", #".join(
                    urllib.parse.urldefrag(i["id"])[1] for i in resolveduri
                    if "id" in i))
    elif isinstance(resolveduri, MutableMapping):
        processobj = resolveduri
    else:
        raise Exception("Must resolve to list or dict")

    tool = loadingContext.construct_tool_object(processobj, loadingContext)

    if loadingContext.jobdefaults:
        jobobj = loadingContext.jobdefaults
        for inp in tool.tool["inputs"]:
            if shortname(inp["id"]) in jobobj:
                inp["default"] = jobobj[shortname(inp["id"])]

    return tool
989693
public void addToolbarButtons(ToolScreen toolScreen)
    {
        super.addToolbarButtons(toolScreen);
        ResourceBundle resources = ((BaseApplication)this.getTask().getApplication()).getResources(ResourceConstants.PROGRAM_RESOURCE, true);
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, resources.getString(ClassProject.CLASS_DETAIL_SCREEN), MenuConstants.DISTRIBUTION, ClassProject.CLASS_DETAIL_SCREEN, resources.getString(ClassProject.CLASS_DETAIL_SCREEN));
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, resources.getString(ClassProject.RESOURCE_DETAIL_SCREEN), MenuConstants.GROUP, ClassProject.RESOURCE_DETAIL_SCREEN, resources.getString(ClassProject.RESOURCE_DETAIL_SCREEN));
        
        String job = Utility.addURLParam(null, DBParams.PROCESS, org.jbundle.app.program.script.process.SetupProjectProcess.class.getName());
        job = Utility.addURLParam(job, DBParams.TASK, ProcessRunnerTask.class.getName()); // Screen class
        new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, "Create maven projects", MenuConstants.RUN, job, null);
    }
1224724
def _addDatasetAction(self, dataset):
        
        # create the toolbar action
        action = QAction(dataset.name(), self)
        action.setIcon(XColorIcon(dataset.color()))
        action.setCheckable(True)
        action.setChecked(True)
        action.setData(wrapVariant(dataset))
        action.toggled.connect(self.toggleDataset)
        
        self.uiDatasetTBAR.addAction(action)
447660
public void attach(JComponent owner) {
        detach();
        toolTipDialog = new TransparentToolTipDialog(owner, new AnchorLink(Anchor.CENTER_RIGHT, Anchor.CENTER_LEFT));
    }
1361261
def do_create_tool_item(self):
        """"""
        proxy = SpinToolItem(*self._args_for_toolitem)
        self.connect_proxy(proxy)
        return proxy