Examples of removeAttributes()


Examples of javax.swing.text.MutableAttributeSet.removeAttributes()

        if (!keys.isUnderline() && !keys.isLineThrough()) {
            return super.removeAttributes(toModify, keys);
        }

        final MutableAttributeSet result = new SimpleAttributeSet(toModify);
        result.removeAttributes(keys);
        TextDecoration td =
            (TextDecoration)result.getAttribute(Attribute.TEXT_DECORATION);
        td = (TextDecoration)td.clone();

        if (keys.isUnderline() && td.isUnderline()) {
View Full Code Here

Examples of javax.swing.text.SimpleAttributeSet.removeAttributes()

    Vector v = new Vector();
    v.add("B");
    v.add("D");
    v.add("F");
    Enumeration e = v.elements();
    s.removeAttributes(e);
    harness.check(s.getAttributeCount(), 3);
    harness.check(s.getAttribute("A"), "1");
    harness.check(s.getAttribute("C"), "3");
    harness.check(s.getAttribute("E"), "5");
   
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        entry.removeAttributes( "badId" );
        entry.removeAttributes( "l" );
        entry.removeAttributes( ( String ) null );
    }


    /**
     * Test method for remove( String, byte[]... )
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        Value<byte[]> testB1 = new BinaryValue( atPassword, b1 );
        Value<byte[]> testB2 = new BinaryValue( atPassword, b2 );

        // test a removal of an non existing attribute
        entry.removeAttributes( atCN );

        // Test a simple removal
        entry.add( "cN", atCN, test1 );
        assertEquals( 1, entry.size() );
        assertNotNull( entry.get( atCN ) );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        // Test a simple removal
        entry.add( "cN", atCN, test1 );
        assertEquals( 1, entry.size() );
        assertNotNull( entry.get( atCN ) );
        entry.removeAttributes( "CN" );
        assertEquals( 0, entry.size() );
        assertNull( entry.get( atCN ) );

        // Test a removal of many elements
        entry.put( "CN", test1, test2 );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        assertNotNull( entry.get( atCN ) );
        assertNotNull( entry.get( atPassword ) );

        AttributeType OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );

        entry.removeAttributes( "cN", "UsErPaSsWoRd" );
        assertEquals( 0, entry.size() );
        assertNull( entry.get( atCN ) );
        assertNull( entry.get( atPassword ) );
        assertFalse( entry.contains( OBJECT_CLASS_AT, "top" ) );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        entry.put( "userPassword", testB1, testB2 );
        assertEquals( 2, entry.size() );
        assertNotNull( entry.get( atCN ) );
        assertNotNull( entry.get( atPassword ) );

        entry.removeAttributes( "badAttribute" );
    }


    /**
     * Test method for setDN( Dn )
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        assertEquals( 1, entry.size() );
        assertNotNull( entry.get( "domainComponent" ) );
        assertEquals( 1, entry.get( "domainComponent" ).size() );
        assertNotNull( entry.get( "domainComponent" ).get() );
        assertNull( entry.get( "domainComponent" ).get().getValue() );
        entry.removeAttributes( "dc" );

        replaced = entry.put( "DC", strValue3 );
        assertNull( replaced );
        assertEquals( 1, entry.size() );
        assertNotNull( entry.get( "dc" ) );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        Attribute attrSN = new DefaultAttribute( atSN, "Test1", "Test2" );
        Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, BYTES2 );

        entry.put( attrOC, attrCN, attrSN, attrPWD );

        entry.removeAttributes( atCN, atSN );

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        Attribute attrSN = new DefaultAttribute( atSN, "Test1", "Test2" );
        Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, BYTES2 );

        entry.put( attrOC, attrCN, attrSN, attrPWD );

        entry.removeAttributes( "CN", "SN" );

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        entry.removeAttributes( "badId" );
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.