• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AttributeList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.swing.text.html.parser.AttributeList的典型用法代码示例。如果您正苦于以下问题:Java AttributeList类的具体用法?Java AttributeList怎么用?Java AttributeList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AttributeList类属于javax.swing.text.html.parser包,在下文中一共展示了AttributeList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: noValueAttribute

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Handle attribute without value. The default method uses
 * the only allowed attribute value from DTD.
 * If the attribute is unknown or allows several values,
 * the HTML.NULL_ATTRIBUTE_VALUE is used. The attribute with
 * this value is added to the attribute set.
 * @param element The name of element.
 * @param attribute The name of attribute without value.
 */
protected void noValueAttribute(String element, String attribute)
{
  Object value = HTML.NULL_ATTRIBUTE_VALUE;

  Element e = dtd.elementHash.get(element.toLowerCase());
  if (e != null)
    {
      AttributeList attr = e.getAttribute(attribute);
      if (attr != null)
        {
          Vector values = attr.values;
          if (values != null && values.size() == 1)
            value = values.get(0);
        }
    }
  attributes.addAttribute(attribute, value);
}
 
开发者ID:vilie,项目名称:javify,代码行数:27,代码来源:Parser.java


示例2: testContentModelElement003

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'*
 * ContentModel(Element( "elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") .
 * It checks if an instance is created, content is equal to el ,type is 0
 * and next is null.
 */
public void testContentModelElement003() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(0);
    bs1.set(1);
    BitSet bs2 = new BitSet(168);
    bs2.set(45);
    AttributeList al = new AttributeList("1");
    Element el = dtd.defineElement("elemento", ',', false, false, cm2,
            bs1, bs2, al);
    cm = new ContentModel(el);
    assertNotNull(cm);
    assertEquals(el, cm.content);
    assertEquals(cm2, el.content);
    assertEquals(el, cm.content);
    assertEquals(0, cm.type);
    assertNull(cm.next);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:27,代码来源:ContentModelCompatilityTest.java


示例3: testContentModelElement004

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'*
 * ContentModel(Element( "",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)) . It checks if an instance is created,
 * content is equal to el ,type is 0 and next is null.
 */
public void testContentModelElement004() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(128);
    bs1.set(1);
    BitSet bs2 = new BitSet(7);
    AttributeList al = new AttributeList("bigC", -2147483648, -1,
            "value", new Vector(), new AttributeList(null));
    Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
            al);
    cm = new ContentModel(el);
    assertNotNull(cm);
    assertEquals(el, cm.content);
    assertEquals(cm2, el.content);
    assertEquals(el, cm.content);
    assertEquals(0, cm.type);
    assertNull(cm.next);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:27,代码来源:ContentModelCompatilityTest.java


示例4: testContentModelIntObjectContentModel045

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object,
 * ContentModel)' Parameters type=-38, (element is defined in a dtd as el=
 * "elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")),
 * null Verifies that an instance is created. content is equal to element,
 * type is -38 and next is null
 */
public void testContentModelIntObjectContentModel045() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(0);
    bs1.set(1);
    BitSet bs2 = new BitSet(168);
    bs2.set(45);
    AttributeList al = new AttributeList("1");
    Element el = dtd.defineElement("elemento", ',', false, false, cm2,
            bs1, bs2, al);
    cm = new ContentModel(-38, el, null);
    assertNotNull(cm);
    assertEquals(el, cm.content);
    assertEquals(-38, cm.type);
    assertNull(cm.next);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:26,代码来源:ContentModelCompatilityTest.java


示例5: testContentModelIntObjectContentModel047

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object,
 * ContentModel)' Parameters type=Integer.MIN_VALUE, el=
 * "",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)), null Verifies that an instance is
 * created. content is equal to el= "",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)), type is Integer.MIN_VALUE and next is
 * null
 */
public void testContentModelIntObjectContentModel047() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(128);
    bs1.set(1);
    BitSet bs2 = new BitSet(7);
    AttributeList al = new AttributeList("bigC", -2147483648, -1,
            "value", new Vector(), new AttributeList(null));
    Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
            al);
    cm = new ContentModel(Integer.MIN_VALUE, el, null);
    assertNotNull(cm);
    assertEquals(el, cm.content);
    assertEquals(Integer.MIN_VALUE, cm.type);
    assertNull(cm.next);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:29,代码来源:ContentModelCompatilityTest.java


示例6: testContentModelIntObjectContentModel080

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object,
 * ContentModel)' Parameters type=Integer.MIN_VALUE, el=
 * "",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)), new ContentModel() Verifies that an
 * instance is created. content is equal to el= "",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)), type is Integer.MIN_VALUE and next is
 * new ContentModel()
 */
public void testContentModelIntObjectContentModel080() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cmnext = new ContentModel();
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(128);
    bs1.set(1);
    BitSet bs2 = new BitSet(7);
    AttributeList al = new AttributeList("bigC", -2147483648, -1,
            "value", new Vector(), new AttributeList(null));
    Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
            al);
    cm = new ContentModel(Integer.MIN_VALUE, el, cmnext);
    assertNotNull(cm);
    assertEquals(el, cm.content);
    assertEquals(Integer.MIN_VALUE, cm.type);
    assertEquals(cmnext, cm.next);
}
 
开发者ID:shannah,项目名称:cn1,代码行数:30,代码来源:ContentModelCompatilityTest.java


示例7: testToString005

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.toString()'
 * ContentModel(Element("",'*',true,false,cm2,bs1,bs2,al)) ""
 */

public void testToString005() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(128);
    bs1.set(1);
    BitSet bs2 = new BitSet(7);
    AttributeList al = new AttributeList("bigC", -2147483648, -1,
            "value", new Vector(), new AttributeList(null));
    Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
            al);
    cm = new ContentModel(el);

    assertEquals("", cm.toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:20,代码来源:ContentModelCompatilityTest.java


示例8: testFirstObject005

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.first(Object)'
 * ContentModel("elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1"))
 * "elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")
 * Expected: true
 */
public void testFirstObject005() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(0);
    bs1.set(1);
    BitSet bs2 = new BitSet(168);
    bs2.set(45);
    AttributeList al = new AttributeList("1");
    Element el = dtd.defineElement("elemento", ',', false, false, cm2,
            bs1, bs2, al);
    cm = new ContentModel(el);
    assertTrue(cm.first(el));
    assertFalse(cm.first(cm));
    assertFalse(cm.first(cm2));
    assertFalse(cm.first(dtd));

    assertFalse(cm.first(bs1));
    assertFalse(cm.first(bs2));
    assertFalse(cm.first(al));
    assertFalse(cm.first(""));
    assertFalse(cm.first("elemento"));
    assertFalse(cm.first(null));
}
 
开发者ID:shannah,项目名称:cn1,代码行数:32,代码来源:ContentModelCompatilityTest.java


示例9: testFirstObject006

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.first(Object)'
 * ContentModel("",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null))) "",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)) Expected: true
 */

public void testFirstObject006() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(128);
    bs1.set(1);
    BitSet bs2 = new BitSet(7);
    AttributeList al = new AttributeList("bigC", -2147483648, -1,
            "value", new Vector(), new AttributeList(null));
    Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
            al);
    cm = new ContentModel(el);
    assertTrue(cm.first(el));
    assertFalse(cm.first(cm));
    assertFalse(cm.first(cm2));
    assertFalse(cm.first(dtd));

    assertFalse(cm.first(bs1));
    assertFalse(cm.first(bs2));
    assertFalse(cm.first(al));
    assertFalse(cm.first(""));
    assertFalse(cm.first(null));
}
 
开发者ID:shannah,项目名称:cn1,代码行数:32,代码来源:ContentModelCompatilityTest.java


示例10: testGetElements004

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")).getElements(null)
 * Expected: NullPointerException
 */
public void testGetElements004() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(0);
        bs1.set(1);
        BitSet bs2 = new BitSet(168);
        bs2.set(45);
        AttributeList al = new AttributeList("1");
        Element el = dtd.defineElement("elemento", ',', false, false, cm2,
                bs1, bs2, al);
        cm = new ContentModel(el);

        cm.getElements(null);

        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:28,代码来源:ContentModelCompatilityTest.java


示例11: testGetElements005

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)).getElements(null) Expected:
 * NullPointerException
 */
public void testGetElements005() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(128);
        bs1.set(1);
        BitSet bs2 = new BitSet(7);
        AttributeList al = new AttributeList("bigC", -2147483648, -1,
                "value", new Vector(), new AttributeList(null));
        Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
                al);
        cm = new ContentModel(el);
        cm.getElements(null);
        fail("Should raise NullPointerException");
    } catch (NullPointerException e) {
        // Expected
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:27,代码来源:ContentModelCompatilityTest.java


示例12: testGetElements010

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")).getElements(new
 * Vector()) Expected: "elemento"
 */
public void testGetElements010() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(0);
    bs1.set(1);
    BitSet bs2 = new BitSet(168);
    bs2.set(45);
    AttributeList al = new AttributeList("1");
    Element el = dtd.defineElement("elemento", ',', false, false, cm2,
            bs1, bs2, al);
    cm = new ContentModel(el);
    Vector v = new Vector();
    cm.getElements(v);
    assertEquals("[elemento]", v.toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:23,代码来源:ContentModelCompatilityTest.java


示例13: testGetElements011

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)).getElements(new Vector()) Expected: ""
 */
public void testGetElements011() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(128);
    bs1.set(1);
    BitSet bs2 = new BitSet(7);
    AttributeList al = new AttributeList("bigC", -2147483648, -1,
            "value", new Vector(), new AttributeList(null));
    Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
            al);
    cm = new ContentModel(el);
    Vector v = new Vector();
    cm.getElements(v);
    assertEquals("[]", v.toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:23,代码来源:ContentModelCompatilityTest.java


示例14: testGetElements014

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)'
 * ContentModel("elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")).getElements(new
 * Vector()) method is called 4 times Expected: "[elemento, elemento,
 * elemento, elemento]"
 */
public void testGetElements014() {
    dtd = new DTDGetter("TestContentModelSemantic");
    ContentModel cm2 = new ContentModel('*', new ContentModel());
    BitSet bs1 = new BitSet(0);
    bs1.set(1);
    BitSet bs2 = new BitSet(168);
    bs2.set(45);
    AttributeList al = new AttributeList("1");
    Element el = dtd.defineElement("elemento", ',', false, false, cm2,
            bs1, bs2, al);
    cm = new ContentModel(el);
    Vector v = new Vector();
    cm.getElements(v);
    cm.getElements(v);
    cm.getElements(v);
    cm.getElements(v);
    assertEquals("[elemento, elemento, elemento, elemento]", v
            .toString());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:28,代码来源:ContentModelCompatilityTest.java


示例15: testContentModelElement003

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'*
 * ContentModel(Element( "elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") .
 * It checks if an instance is created, content is equal to el ,type is 0
 * and next is null.
 */
public void testContentModelElement003() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(0);
        bs1.set(1);
        BitSet bs2 = new BitSet(168);
        bs2.set(45);
        AttributeList al = new AttributeList("1");
        Element el = dtd.defineElement("elemento", ',', false, false, cm2,
                bs1, bs2, al);
        cm = new ContentModel(el);
        assertNotNull(cm);
        assertEquals(el, cm.content);
        assertEquals(cm2, el.content);
        assertEquals(el, cm.content);
        assertEquals(0, cm.type);
        assertNull(cm.next);

    } catch (Exception e) {
        fail("Should not throw any exception but was: " + e);
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:32,代码来源:ContentModelCompatilityTest.java


示例16: testContentModelElement004

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'*
 * ContentModel(Element( "",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)) . It checks if an instance is created,
 * content is equal to el ,type is 0 and next is null.
 */
public void testContentModelElement004() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(128);
        bs1.set(1);
        BitSet bs2 = new BitSet(7);
        AttributeList al = new AttributeList("bigC", -2147483648, -1,
                "value", new Vector(), new AttributeList(null));
        Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
                al);
        cm = new ContentModel(el);
        assertNotNull(cm);
        assertEquals(el, cm.content);
        assertEquals(cm2, el.content);
        assertEquals(el, cm.content);
        assertEquals(0, cm.type);
        assertNull(cm.next);
    } catch (Exception e) {
        fail("Should not throw any exception but was: " + e);
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:31,代码来源:ContentModelCompatilityTest.java


示例17: testContentModelIntContentModel034

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int,
 * ContentModel)' ContentModel(Element( "elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1") .
 * It checks if an instance is created, content is equal to el ,type is 0
 * and next is null.
 */
public void testContentModelIntContentModel034() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(0);
        bs1.set(1);
        BitSet bs2 = new BitSet(168);
        bs2.set(45);
        AttributeList al = new AttributeList("1");
        Element el = dtd.defineElement("elemento", ',', false, false, cm2,
                bs1, bs2, al);
        cm2 = new ContentModel(el);
        ContentModel cm = new ContentModel(0, cm2);
        assertNotNull(cm);

        assertEquals(cm2, cm.content);
        assertEquals(0, cm.type);
        assertNull(cm.next);
    } catch (Exception e) {
        fail("Should not throw any exception but was: " + e);
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:31,代码来源:ContentModelCompatilityTest.java


示例18: testContentModelIntContentModel035

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int,
 * ContentModel)' ContentModel(Element( "",',',false,false,('*',new
 * ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
 * Vector(),new AttributeList(null)) . It checks if an instance is created,
 * content is equal to el ,type is 0 and next is null.
 */
public void testContentModelIntContentModel035() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(128);
        bs1.set(1);
        BitSet bs2 = new BitSet(7);
        AttributeList al = new AttributeList("bigC", -2147483648, -1,
                "value", new Vector(), new AttributeList(null));
        Element el = dtd.defineElement("", '*', true, false, cm2, bs1, bs2,
                al);
        cm2 = new ContentModel(el);
        ContentModel cm = new ContentModel(43, cm2);
        assertNotNull(cm);

        assertEquals(cm2, cm.content);
        assertEquals(43, cm.type);
        assertNull(cm.next);
    } catch (Exception e) {
        fail("Should not throw any exception but was: " + e);
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:31,代码来源:ContentModelCompatilityTest.java


示例19: testContentModelIntObjectContentModel045

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object,
 * ContentModel)' Parameters type=-38, (element is defined in a dtd as el=
 * "elemento",',',false,false,('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")),
 * null Verifies that an instance is created. content is equal to element,
 * type is -38 and next is null
 */
public void testContentModelIntObjectContentModel045() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(0);
        bs1.set(1);
        BitSet bs2 = new BitSet(168);
        bs2.set(45);
        AttributeList al = new AttributeList("1");
        Element el = dtd.defineElement("elemento", ',', false, false, cm2,
                bs1, bs2, al);
        cm = new ContentModel(-38, el, null);
        assertNotNull(cm);
        assertEquals(el, cm.content);
        assertEquals(-38, cm.type);
        assertNull(cm.next);
    } catch (Exception e) {
        fail("Should not throw any exception but was: " + e);
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:30,代码来源:ContentModelCompatilityTest.java


示例20: testContentModelIntObjectContentModel046

import javax.swing.text.html.parser.AttributeList; //导入依赖的package包/类
/**
 * Test method for
 * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object,
 * ContentModel)' Parameters type=0,
 * ContentModel(Element:"elemento",',',false,false,('*',new
 * ContentModel('*',new
 * ContentModel()),BitSet(0).set(1),BitSet(168).set(45),AttributeList("1")),
 * null Verifies that an instance is created. content is equal to null, type
 * is 0 and next is null
 */
public void testContentModelIntObjectContentModel046() {
    try {
        dtd = new DTDGetter("TestContentModelSemantic");
        ContentModel cm2 = new ContentModel('*', new ContentModel());
        BitSet bs1 = new BitSet(3);
        bs1.set(1);
        BitSet bs2 = new BitSet(168);
        bs2.set(45);
        AttributeList al = new AttributeList("1");
        Element el = dtd.defineElement("elemento", '.', false, false, cm2,
                bs1, bs2, al);
        cm2 = new ContentModel(el);
        cm = new ContentModel(0, cm2, null);
        assertNotNull(cm);
        assertEquals(cm2, cm.content);
        assertEquals(0, cm.type);
        assertNull(cm.next);
    } catch (Exception e) {
        fail("Should not throw any exception but was: " + e);
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:32,代码来源:ContentModelCompatilityTest.java



注:本文中的javax.swing.text.html.parser.AttributeList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IEncodedStreamContentAccessor类代码示例发布时间:2022-05-23
下一篇:
Java NetworkInfo类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap