Examples of addAttribute()


Examples of javassist.bytecode.FieldInfo.addAttribute()

               {
                  AnnotationsAttribute invisible = (AnnotationsAttribute) mi.getAttribute(AnnotationsAttribute.invisibleTag);
                  if (invisible == null)
                  {
                     invisible = new AnnotationsAttribute(mi.getConstPool(), AnnotationsAttribute.invisibleTag);
                     mi.addAttribute(invisible);
                  }
                  changed = true;
                  invisible.addAnnotation(info);
               }
               else

Examples of javassist.bytecode.MethodInfo.addAttribute()

        final javassist.bytecode.annotation.Annotation copy = toJavassistAnnotation(annotation);

        attribute.addAnnotation(copy);

        methodInfo.addAttribute(attribute);

    }

   
    private ClassFile getClassFile()

Examples of javax.swing.text.AbstractDocument.AbstractElement.addAttribute()

        assertEquals("paragraph", block.getName());
        htmlDoc.lockWrite();

        final String name = "asddsa";
        block = htmlDoc.new BlockElement(null, null);
        block.addAttribute(StyleConstants.NameAttribute, name);
        assertEquals(name, block.getName());
    }

    public void testGetElement() {
        if (isHarmony()) {

Examples of javax.swing.text.AbstractDocument.AttributeContext.addAttribute()

     * Non-mutable (<code>StyleContext.SmallAttributeSet</code>) is passed
     * as parameter.
     */
    public void testOptionSmallAttrSet() {
        AttributeContext context = new StyleContext();
        attrs = context.addAttribute(context.getEmptySet(), "key", "value");

        item = new Option(attrs);
        final AttributeSet itAttrs = item.getAttributes();
        assertFalse(itAttrs instanceof MutableAttributeSet);
        assertTrue(itAttrs instanceof StyleContext.SmallAttributeSet);

Examples of javax.swing.text.AbstractDocument.BranchElement.addAttribute()

        doc.buffer = buf;
        doc.writeLock();
        try {
            doc.getContent().insertString(0, "\n0000");
            final BranchElement html = (BranchElement) root;
            html.addAttribute(ELEMENT_NAME, "html");
            final BranchElement head = createBranch(html);
            head.addAttribute(ELEMENT_NAME, "head");
            final BranchElement implied = createBranch(head);
            implied.addAttribute(ELEMENT_NAME, "p-implied");
            final LeafElement content0 = createLeaf(implied, 0, 1);

Examples of javax.swing.text.AbstractDocument.LeafElement.addAttribute()

            final BranchElement head = createBranch(html);
            head.addAttribute(ELEMENT_NAME, "head");
            final BranchElement implied = createBranch(head);
            implied.addAttribute(ELEMENT_NAME, "p-implied");
            final LeafElement content0 = createLeaf(implied, 0, 1);
            content0.addAttribute(ELEMENT_NAME, "head-content");
            final BranchElement body = createBranch(html);
            body.addAttribute(ELEMENT_NAME, "body");
            final BranchElement p1 = createBranch(body);
            p1.addAttribute(ELEMENT_NAME, "p1");
            final LeafElement content1 = createLeaf(p1, 1, 5);

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

    /** {@inheritDoc} */
    public void figureGraphics( String src, SinkEventAttributes attributes )
    {
        MutableAttributeSet atts = config.getAttributeSet( "figure.graphics" );
        atts.addAttribute( Attribute.SRC.toString(), src );

        // http://xmlgraphics.apache.org/fop/graphics.html#resolution

        final String[] valids = new String[] {"content-height", "content-width", "height", "width"};
        final MutableAttributeSet filtered = SinkUtils.filterAttributes( attributes, valids );

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

        assertNull( "Non existent attribute ID should return null AttributeSet!",
                    config.getAttributeSet( "a.dummy.attribute" ) );

        MutableAttributeSet expected = new SimpleAttributeSet();
        expected.addAttribute( "font-style", "italic" );
        MutableAttributeSet actual = config.getAttributeSet( "italic" );

        assertTrue( "Wrong AttributeSet returned for italic!", expected.isEqual( actual ) );
    }

Examples of javax.swing.text.Style.addAttribute()

        assertEquals(1, parent.getAttributeCount());
        assertNull(parent.getResolveParent());
        assertEquals(2, child.getAttributeCount());
        assertNotNull(child.getResolveParent());
        parent.addAttribute(StyleConstants.Bold, Boolean.FALSE);
        child.addAttribute(StyleConstants.Bold, Boolean.TRUE);
        assertFalse(((Boolean) parent.getAttribute(StyleConstants.Bold)).booleanValue());
        assertTrue(((Boolean) child.getAttribute(StyleConstants.Bold)).booleanValue());
        // Add styles with diff parameters
        Style parent1 = textPane.addStyle("p1", null);
        Style parent2 = textPane.addStyle("p2", null);

Examples of javax.swing.text.StyleContext.addAttribute()

    StyleContext sc = new StyleContext();
    SimpleAttributeSet as = new SimpleAttributeSet();

    try
      {
        sc.addAttribute(as, "key", null);
        h.fail("StyleContext.addAttribute must not accept null value");
      }
    catch (NullPointerException ex)
      {
        h.check(true);
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.