Package org.jwall.web.policy.ext

Examples of org.jwall.web.policy.ext.Limit


            setIcon( WebPolicyEditor.getIcon( "org.jwall.web.policy.CreateToken" ) );
        }

        if( arg1.getType() == TreeNode.LIMIT_NODE ){

            Limit limit = (Limit) arg1;

            StringBuffer s = new StringBuffer( "<html>Limit: <i>" );
            s.append( limit.getLimit() + "</i> req/second" );
           
            if( limit.getBy() != null )
                s.append( " per <i>" + limit.getBy() + "</i>" );
           
            s.append( "</html>" );
            setText( s.toString() );
            setIcon( WebPolicyEditor.getIcon( "org.jwall.web.policy.Limit" ) );
        }
View Full Code Here


        parent.remove(node);
        rmodel.notify(parent);
      }

      if (AbstractTreeAction.TREE_INSERT_LIMIT == e.getActionCommand()) {
        Limit limit = new Limit();
        limit.setBy("ip");
        limit.setLimit("10");

        node.add(limit);
        rmodel.notify(node);
        jtree.startEditingAtPath(new TreePath(PolicyTreeModel
            .getPath(limit)));
View Full Code Here

      return h;
    }

    if (nodeType == TreeNode.LIMIT_NODE) {
      Limit limit = (Limit) node;
      limit.setLimit(name.getText());

      if (scope.getSelectedIndex() >= 0)
        limit.setBy(scope.getSelectedItem().toString());
      else
        limit.setBy("IP");

      return limit;
    }

    return o;
View Full Code Here

    }

    if (node.getType() == TreeNode.LIMIT_NODE) {

      scopes = new String[] { "ip", "session" };
      Limit limit = (Limit) node;
      JLabel l1 = new JLabel("Limit: ");
      l1.setFont(f);
      l1.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(l1);

      name = new JTextField(8);
      name.addKeyListener(this);
      name.setAlignmentY(Component.CENTER_ALIGNMENT);
      name.setText(limit.getLimit());
      p.add(name);

      JLabel l2 = new JLabel("req/s");
      l2.setFont(f);
      l2.setAlignmentY(Component.CENTER_ALIGNMENT);
View Full Code Here

TOP

Related Classes of org.jwall.web.policy.ext.Limit

Copyright © 2018 www.massapicom. 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.