Examples of FilterBean


Examples of org.apache.savan.configuration.FilterBean

        OMElement classElement = null;
        String name = null;
        String identifier = null;
        String clazz = null;
        Object filter = null;
        FilterBean bean = null;

        nameElement = element.getFirstChildWithName(new QName(NAME));
        identifierElement = element.getFirstChildWithName(new QName(IDENTIFIER));
        classElement = element.getFirstChildWithName(new QName(CLASS));

        if (nameElement == null) {
            throw new SavanException("Name element is not present within the Filter");
        }
        if (identifierElement == null) {
            throw new SavanException("Identifier element is not present within the Filter");
        }
        if (classElement == null) {
            throw new SavanException("Class element is not present within the Filter");
        }

        name = nameElement.getText();
        identifier = identifierElement.getText();
        clazz = classElement.getText();

        // initialize the class to check weather it is value
        filter = getObject(clazz);

        if (!(filter instanceof Filter)) {
            String message = "Class " + clazz + " does not implement the  Filter interface.";
            throw new SavanException(message);
        }

        bean = new FilterBean();
        bean.setName(name);
        bean.setIdentifier(identifier);
        bean.setClazz(clazz);

        filterMap.put(identifier, bean);
    }
View Full Code Here

Examples of org.htmlparser.beans.FilterBean

     * @param name The name of the file to save it under.
     */
    public void save (String name)
    {
        Filter[] selections;
        FilterBean bean;
        StringBuffer buffer;
        PrintWriter out;
        String ok = "OK";

        selections = getFilters ();
        if (0 != selections.length)
        {
            bean = new FilterBean ();
            bean.setURL (mURLField.getText ());
            bean.setFilters (selections);
            buffer = new StringBuffer ();
            makeProgram (classFromFile (name), buffer, bean);
            try
            {
                out = new PrintWriter (new FileWriter (name), true);
View Full Code Here

Examples of org.htmlparser.beans.FilterBean

     * The action to take when "Execute" menu or button pressed.
     */
    protected void executeAction ()
    {
        Filter[] selections;
        FilterBean bean;
        JInternalFrame frame;
        Dimension dimension;
//        JTextPane text;

        selections = getSelection ();
        if (0 == selections.length)
            selections = getFilters ();
        if (0 != selections.length)
        {
            bean = new FilterBean ();
            bean.setURL (mURLField.getText ());
            bean.setFilters (selections);
           
            // set up an internal frame for the results
            frame = new JInternalFrame (bean.getURL ());
            frame.setClosable (true);
            frame.setResizable (true);
            dimension = mOutput.getSize ();
            frame.setBounds (0, 0, dimension.width, dimension.height / 2);
            JTree tree = new JTree (new HtmlTreeModel (bean.getNodes ()));
            tree.setRootVisible (false);
            tree.setCellRenderer (new HtmlTreeCellRenderer ());
            JScrollPane treeView = new JScrollPane (tree);
      frame.setContentPane (new JScrollPane (
          treeView,
View Full Code Here

Examples of org.nemesis.forum.webapp.admin.bean.FilterBean

      fb.setName(forum.getName());
      fb.setDescription(forum.getDescription());
     
      MessageFilter[] installedFilters =forum.getForumMessageFilters();
      for( int i=0; i<installedFilters.length; i++ ) {
        FilterBean b=new FilterBean(i,installedFilters[i]);
         fb.addFilters(b);
      }
     
     
      String[] classNames=Config.filtersClassNames;     
      for( int i=0; i<classNames.length; i++ ) {
        Class c = Class.forName(classNames[i]);
        MessageFilter filter  = (MessageFilter)(c.newInstance());
        if(! containsString(installedFilters,filter.getName() )){
          fb.addFreeFilters(new FilterBean(i,filter));
        }
      }

      request.setAttribute("fb",fb);
     
View Full Code Here

Examples of pl.zgora.uz.wmie.fe.bean.FilterBean

        }
        else if(type.compareToIgnoreCase("input")==0) {
          htmlTag += " <input type=\"text\" id=\"" + id + "\">";
        }
      }
      FilterBean filterBean = new FilterBean();
      filterBean.setBody(htmlTag);
      filterBean.setName(id);
      table.getFilters().add(filterBean);

    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

Examples of pl.zgora.uz.wmie.fe.gui.common.bean.FilterBean

          htmlTag += "</select>";
        } else if (type.compareToIgnoreCase("input") == 0) {
          htmlTag += " <input type=\"text\" id=\"" + id + "\">";
        }
      }
      FilterBean filterBean = new FilterBean();
      filterBean.setBody(htmlTag);
      filterBean.setName(id);
      table.getFilters().add(filterBean);

    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
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.