Package org.jwall.web.policy.ext

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


            setText( s.toString() );
            setIcon( WebPolicyEditor.getIcon( "org.jwall.web.policy.CheckToken" ) );
        }

        if( arg1.getType() == TreeNode.CREATE_TOKEN_NODE ){
            CreateToken ct = (CreateToken) arg1;
            TimeFormat fmt = new TimeFormat();
            StringBuffer s = new StringBuffer( "<html>Create Token: <i>" );
            s.append( ct.getToken() );

            if( ct.getValue() != null ){
                s.append( "</i>, value: " );
                s.append( ct.getValue() );
            }
           
            s.append( "</i>, expires: <i>" );
            s.append( fmt.format( ct.getLifeTime().longValue() ) );
            s.append( "</i></html>" );
            setText( s.toString() );
            setIcon( WebPolicyEditor.getIcon( "org.jwall.web.policy.CreateToken" ) );
        }
View Full Code Here


      }

      if (AbstractTreeAction.TREE_INSERT_CREATETOKEN == e
          .getActionCommand()) {
        log.debug("Inserting create-token node...");
        CreateToken ct = new CreateToken();

        node.add(ct);
        rmodel.notify(node);

        jtree.startEditingAtPath(new TreePath(PolicyTreeModel
View Full Code Here

      return ct;
    }

    if (nodeType == TreeNode.CREATE_TOKEN_NODE) {
      CreateToken ct = (CreateToken) node;
      if (name.getText() != null) {
        ct.setToken(name.getText());
      }
      ct.setLifeTime(Long.parseLong(value.getText()) * 1000);

      if (value2.getText() != null)
        ct.setValue(value2.getText());

      return ct;
    }

    if (nodeType == TreeNode.COOKIE_NODE) {
View Full Code Here

      p.add(value);
    }

    if (node.getType() == TreeNode.CREATE_TOKEN_NODE) {
      CreateToken ct = (CreateToken) node;
      JLabel l1 = new JLabel("Token: ");
      l1.setFont(f);
      l1.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(l1);

      name = new JTextField(10);
      name.addKeyListener(this);
      name.setAlignmentY(Component.CENTER_ALIGNMENT);
      name.setText(ct.getToken());

      p.add(name);

      JLabel l3 = new JLabel("value: ");
      l3.setFont(f);
      l3.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(l3);

      value2 = new JTextField(6);
      value2.setAlignmentY(Component.CENTER_ALIGNMENT);
      value2.addKeyListener(this);
      if (ct.getValue() != null)
        value2.setText(ct.getValue());
      p.add(value2);

      JLabel l2 = new JLabel("expires: ");
      l2.setFont(f);
      l2.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(l2);

      value = new JTextField(8);
      value.setAlignmentY(Component.CENTER_ALIGNMENT);
      value.setText(ct.getLifeTime().toString());

      p.add(value);
    }

    if (node.getType() == TreeNode.LIMIT_NODE) {
View Full Code Here

TOP

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

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.