Examples of Toolbox


Examples of com.lowagie.tools.Toolbox

     *
     * @param args String[]
     */
    public static void main(String[] args) {
    try {
      Toolbox toolbox = new Toolbox();
      AbstractTool tool = toolbox.createFrame("TreeViewPDF");
      if (args.length > 1) {
        System.err.println(tool.getUsage());
      }
      tool.setMainArguments(args);
      tool.execute();
View Full Code Here

Examples of org.apache.oodt.cas.workflow.gui.toolbox.ToolBox

      public void onClick() {
        WorkflowGUI.this.perspective.setMode(View.Mode.ZOOM_OUT);
      }
    };
    tools.add(zoomOutTool);
    toolbox = new ToolBox(tools);
    toolbox.setSelected(editTool);
    this.add(toolbox, BorderLayout.NORTH);

    this.setJMenuBar(menu = this.generateMenuBar());
    perspective = new BuildPerspective();
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

        {
            this.createSession = bool;
        }

        // add any application toolbox to the application attributes
        Toolbox appTools =
            toolboxFactory.createToolbox(ToolboxFactory.APPLICATION_SCOPE);
        if (appTools != null &&
            this.servletContext.getAttribute(this.toolboxKey) == null)
        {
            this.servletContext.setAttribute(this.toolboxKey, appTools);
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

        // only set a new toolbox if we need one
        if (toolboxFactory.hasTools(ToolboxFactory.DEFAULT_SCOPE)
            && request.getAttribute(this.toolboxKey) == null)
        {
            // add request toolbox, if any
            Toolbox reqTools =
                toolboxFactory.createToolbox(ToolboxFactory.DEFAULT_SCOPE);
            if (reqTools != null)
            {
                request.setAttribute(this.toolboxKey, reqTools);
            }
        }

        //TODO: move this string constant somewhere static
        if (toolboxFactory.hasTools("session"))
        {
            //FIXME? does this honor createSession props set on the session Toolbox?
            HttpSession session = request.getSession(this.createSession);
            if (session != null)
            {
                // allow only one thread per session at a time
                synchronized(getMutex(session))
                {
                    if (session.getAttribute(this.toolboxKey) == null)
                    {
                        Toolbox sessTools =
                            toolboxFactory.createToolbox("session");
                        session.setAttribute(this.toolboxKey, sessTools);
                    }
                }
            }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

        return super.getToolboxes();
    }

    public void addToolboxesUnderKey(String toolboxKey)
    {
        Toolbox reqTools = (Toolbox)getRequest().getAttribute(toolboxKey);
        if (reqTools != null)
        {
            addToolbox(reqTools);
        }

        if (getSession() != null)
        {
            Toolbox sessTools = (Toolbox)getSession().getAttribute(toolboxKey);
            if (sessTools != null)
            {
                addToolbox(sessTools);
            }
        }

        Toolbox appTools = (Toolbox)getServletContext().getAttribute(toolboxKey);
        if (appTools != null)
        {
            addToolbox(appTools);
        }
    }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

    }

    public static Object findTool(String key, String toolboxKey,
                                  ServletContext application)
    {
        Toolbox toolbox = (Toolbox)application.getAttribute(toolboxKey);
        if (toolbox != null)
        {
            return toolbox.get(key);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

                                  HttpServletRequest request,
                                  ServletContext application)
    {
        String path = getPath(request);

        Toolbox toolbox = (Toolbox)request.getAttribute(toolboxKey);
        if (toolbox != null)
        {
            Object tool = toolbox.get(key, path);
            if (tool != null)
            {
                return tool;
            }
        }

        HttpSession session = request.getSession(false);
        if (session != null)
        {
            toolbox = (Toolbox)session.getAttribute(toolboxKey);
            if (toolbox != null)
            {
                Object tool = toolbox.get(key, path);
                if (tool != null)
                {
                    return tool;
                }
            }

            if (application == null)
            {
                application = session.getServletContext();
            }
        }

        if (application != null)
        {
            toolbox = (Toolbox)application.getAttribute(toolboxKey);
            if (toolbox != null)
            {
                return toolbox.get(key, path);
            }
        }

        return null;
    }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

        {
            this.createSession = bool;
        }

        // add any application toolbox to the application attributes
        Toolbox appTools = toolboxFactory.createToolbox(Scope.APPLICATION);
        if (appTools != null &&
            this.servletContext.getAttribute(this.toolboxKey) == null)
        {
            this.servletContext.setAttribute(this.toolboxKey, appTools);
        }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

        // only set a new toolbox if we need one
        if (toolboxFactory.hasTools(Scope.REQUEST)
            && request.getAttribute(this.toolboxKey) == null)
        {
            // add request toolbox, if any
            Toolbox reqTools = toolboxFactory.createToolbox(Scope.REQUEST);
            if (reqTools != null)
            {
                request.setAttribute(this.toolboxKey, reqTools);
            }
        }

        //TODO: move this string constant somewhere static
        if (toolboxFactory.hasTools("session"))
        {
            //FIXME? does this honor createSession props set on the session Toolbox?
            HttpSession session = request.getSession(this.createSession);
            if (session != null)
            {
                // allow only one thread per session at a time
                synchronized(getMutex(session))
                {
                    if (session.getAttribute(this.toolboxKey) == null)
                    {
                        Toolbox sessTools =
                            toolboxFactory.createToolbox("session");
                        session.setAttribute(this.toolboxKey, sessTools);
                    }
                }
            }
View Full Code Here

Examples of org.apache.velocity.tools.Toolbox

        return super.getToolboxes();
    }

    public void addToolboxesUnderKey(String toolboxKey)
    {
        Toolbox reqTools = (Toolbox)getRequest().getAttribute(toolboxKey);
        if (reqTools != null)
        {
            addToolbox(reqTools);
        }

        if (getSession() != null)
        {
            Toolbox sessTools = (Toolbox)getSession().getAttribute(toolboxKey);
            if (sessTools != null)
            {
                addToolbox(sessTools);
            }
        }

        Toolbox appTools = (Toolbox)getServletContext().getAttribute(toolboxKey);
        if (appTools != null)
        {
            addToolbox(appTools);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.