Package org.jwall.web.policy.abstraction

Examples of org.jwall.web.policy.abstraction.ParameterType


        if( ! sel && ! hasFocus ){
            if( row % 2 == 0 )
                setBackground( EVEN_COLOR );               
        }
       
        ParameterType p = (ParameterType) value;
       
        StringBuffer s = new StringBuffer("<html><b>"+p.getName()+"</b><br>");

        s.append("" + p.getRegexp() + "");

        s.append("</html>");
        setText( s.toString() );
        setIcon( WebPolicyEditor.getIcon(p) );
        this.setIconTextGap( 10 );
        if( p.getComment() != null )
            setToolTipText( p.getComment() );

        return this;

    }
View Full Code Here


            setIcon( Application.getIcon( "org.jwall.web.policy.ResourceClasses" ) );
        }


        if( arg1.getType() == TreeNode.PARAMETER_TYPE ){
            ParameterType type = (ParameterType) arg1;
            setText("<html><b>"+type.getName()+"</b><br>Regexp: <code>"+type.getRegexp()+"</code></html>");
            setIcon( Application.getIcon( type ) );
        }
       
        if( arg1.getType() == TreeNode.RESOURCE_CLASS ){
            ResourceClass rc = (ResourceClass) arg1;
View Full Code Here

  @Override
  public String getToolTipText() {
    if( jlist.isSelectionEmpty() )
      return super.getToolTipText();
    else {
      ParameterType rn = (ParameterType) jlist.getSelectedValue();
      return rn.getComment();
    }
  }
View Full Code Here

      return rc;
    }

    if (node.getType() == TreeNode.PARAMETER_TYPE) {
      ParameterType param = (ParameterType) node;

      param.setName(name.getText());
      param.setRegexp(value.getText());

      return param;
    }

    return o;
View Full Code Here

      return;
    }

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

      ParameterType param = (ParameterType) node;
      JLabel l1 = new JLabel("Parameter Type: ");
      l1.setFont(f);
      l1.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(l1);

      String v = param.getName();
      name = new JTextField(v, v.length() + 2);
      name.addKeyListener(this);
      name.setFont(f);
      name.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(name);

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

      v = param.getRegexp();
      value = new JTextField(v, v.length() + 6);
      value.addKeyListener(this);
      value.setFont(f);
      value.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(value);
View Full Code Here

  }

  public void selectionFinished(Object selected, SelectionDialog dialog) {

    if (selected != null && selected instanceof ParameterType) {
      ParameterType pt = (ParameterType) selected;
      if (!cancelled)
        value.setText("${" + pt.getName() + "}");
      else
        value.setText(oldValue);
    } else
      value.setText(oldValue);
View Full Code Here

    }
  }

  public void selectionChanged(Object selected, SelectionDialog dialog) {
    if (selected != null) {
      ParameterType pt = (ParameterType) selected;
      value.setText("${" + pt.getName() + "}");
    }
  }
View Full Code Here

           
        }
       
       
       
        ParameterType p = (ParameterType) value;
       
        StringBuffer s = new StringBuffer("<html><b>"+p.getName()+"</b>");

        if( p.getId() != null )
            s.append( " [" + p.getId() + "]" );
        else
            s.append(" [missing]" );
        s.append("<br>");
       
        s.append("" + p.getRegexp() + "");

        s.append("</html>");
        setText( s.toString() );
        setIcon( WebPolicyEditor.getIcon(p) );

        if( p.getComment() != null )
            setToolTipText( p.getComment() );

        return this;
    }
View Full Code Here

      while (hasTypeCalled(newName)) {
        newName = name + "-" + i;
        i++;
      }

      ParameterType type = new ParameterType(newName, "\\d{1,10}");
      lm.add(type);
      list.treeDidChange();
    }

    if (ParameterTypeListAction.LIST_DELETE_PARAMETER_TYPE == e
View Full Code Here

   */
  public boolean hasTypeCalled(String typeName) {

    for (int i = 0; i < lm.getSize(); i++) {

      ParameterType type = (ParameterType) lm.getElementAt(i);
      if (type.getName().equals(typeName))
        return true;
    }

    return false;
  }
View Full Code Here

TOP

Related Classes of org.jwall.web.policy.abstraction.ParameterType

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.