Java 类javax.swing.text.GapContent 实例源码

项目:cn1    文件:HTMLDocumentTest.java   
public void testHTMLDocumentContentStyleSheet() throws MalformedURLException {
    StyleSheet styles = new StyleSheet();
    final GapContent gapContent = new GapContent(10);
    htmlDoc = new PublicHTMLDocument(gapContent, styles);
    assertSame(styles, htmlDoc.getAttributeContextPublicly());
    assertSame(gapContent, htmlDoc.getContentPublicly());

    URL u1 = new URL("http://www.apache.org");
    styles.setBase(u1);
    htmlDoc = new PublicHTMLDocument(gapContent, styles);
    assertNull(htmlDoc.getBase());
}
项目:cn1    文件:HTMLDocumentTest.java   
public void testHTMLDocumentStyleSheet() throws BadLocationException, MalformedURLException {
    StyleSheet styles = new StyleSheet();
    htmlDoc = new PublicHTMLDocument(styles);
    assertSame(styles, htmlDoc.getAttributeContextPublicly());
    final Content content = htmlDoc.getContentPublicly();
    assertTrue(content instanceof GapContent);

    URL u1 = new URL("http://www.apache.org");
    styles.setBase(u1);
    htmlDoc = new PublicHTMLDocument(styles);
    assertNull(htmlDoc.getBase());
}
项目:cn1    文件:HTMLDocumentTest.java   
public void testHTMLDocument() {
    htmlDoc = new PublicHTMLDocument();
    assertTrue(htmlDoc.getContentPublicly() instanceof GapContent);
    AttributeContext styleSheet = htmlDoc.getAttributeContextPublicly();
    assertTrue(styleSheet instanceof StyleSheet);
    final Enumeration styleNames = ((StyleSheet)styleSheet).getStyleNames();
    assertTrue(styleNames.hasMoreElements());
    assertEquals("default", styleNames.nextElement());
    assertFalse(styleNames.hasMoreElements());
    final Style style = ((StyleSheet)styleSheet).getStyle("default");
    assertEquals(1, style.getAttributeCount());
    assertEquals("default", style.getAttribute(StyleConstants.NameAttribute));
}
项目:freeVM    文件:HTMLDocumentTest.java   
public void testHTMLDocumentContentStyleSheet() throws MalformedURLException {
    StyleSheet styles = new StyleSheet();
    final GapContent gapContent = new GapContent(10);
    htmlDoc = new PublicHTMLDocument(gapContent, styles);
    assertSame(styles, htmlDoc.getAttributeContextPublicly());
    assertSame(gapContent, htmlDoc.getContentPublicly());

    URL u1 = new URL("http://www.apache.org");
    styles.setBase(u1);
    htmlDoc = new PublicHTMLDocument(gapContent, styles);
    assertNull(htmlDoc.getBase());
}
项目:freeVM    文件:HTMLDocumentTest.java   
public void testHTMLDocumentStyleSheet() throws BadLocationException, MalformedURLException {
    StyleSheet styles = new StyleSheet();
    htmlDoc = new PublicHTMLDocument(styles);
    assertSame(styles, htmlDoc.getAttributeContextPublicly());
    final Content content = htmlDoc.getContentPublicly();
    assertTrue(content instanceof GapContent);

    URL u1 = new URL("http://www.apache.org");
    styles.setBase(u1);
    htmlDoc = new PublicHTMLDocument(styles);
    assertNull(htmlDoc.getBase());
}
项目:freeVM    文件:HTMLDocumentTest.java   
public void testHTMLDocument() {
    htmlDoc = new PublicHTMLDocument();
    assertTrue(htmlDoc.getContentPublicly() instanceof GapContent);
    AttributeContext styleSheet = htmlDoc.getAttributeContextPublicly();
    assertTrue(styleSheet instanceof StyleSheet);
    final Enumeration styleNames = ((StyleSheet)styleSheet).getStyleNames();
    assertTrue(styleNames.hasMoreElements());
    assertEquals("default", styleNames.nextElement());
    assertFalse(styleNames.hasMoreElements());
    final Style style = ((StyleSheet)styleSheet).getStyle("default");
    assertEquals(1, style.getAttributeCount());
    assertEquals("default", style.getAttribute(StyleConstants.NameAttribute));
}
项目:freeVM    文件:HTMLDocumentTest.java   
public void testHTMLDocumentContentStyleSheet() throws MalformedURLException {
    StyleSheet styles = new StyleSheet();
    final GapContent gapContent = new GapContent(10);
    htmlDoc = new PublicHTMLDocument(gapContent, styles);
    assertSame(styles, htmlDoc.getAttributeContextPublicly());
    assertSame(gapContent, htmlDoc.getContentPublicly());

    URL u1 = new URL("http://www.apache.org");
    styles.setBase(u1);
    htmlDoc = new PublicHTMLDocument(gapContent, styles);
    assertNull(htmlDoc.getBase());
}
项目:freeVM    文件:HTMLDocumentTest.java   
public void testHTMLDocumentStyleSheet() throws BadLocationException, MalformedURLException {
    StyleSheet styles = new StyleSheet();
    htmlDoc = new PublicHTMLDocument(styles);
    assertSame(styles, htmlDoc.getAttributeContextPublicly());
    final Content content = htmlDoc.getContentPublicly();
    assertTrue(content instanceof GapContent);

    URL u1 = new URL("http://www.apache.org");
    styles.setBase(u1);
    htmlDoc = new PublicHTMLDocument(styles);
    assertNull(htmlDoc.getBase());
}
项目:freeVM    文件:HTMLDocumentTest.java   
public void testHTMLDocument() {
    htmlDoc = new PublicHTMLDocument();
    assertTrue(htmlDoc.getContentPublicly() instanceof GapContent);
    AttributeContext styleSheet = htmlDoc.getAttributeContextPublicly();
    assertTrue(styleSheet instanceof StyleSheet);
    final Enumeration styleNames = ((StyleSheet)styleSheet).getStyleNames();
    assertTrue(styleNames.hasMoreElements());
    assertEquals("default", styleNames.nextElement());
    assertFalse(styleNames.hasMoreElements());
    final Style style = ((StyleSheet)styleSheet).getStyle("default");
    assertEquals(1, style.getAttributeCount());
    assertEquals("default", style.getAttribute(StyleConstants.NameAttribute));
}
项目:forgeide    文件:ServerDocumentImpl.java   
/**
 * Creates a new ServerDocumentImpl instance.
 */
public ServerDocumentImpl(RemoteUserProxy publisher) {
    super(new GapContent());
    defaultRoot = (BranchElement) createDefaultRoot();
    addParticipant(0, publisher);
    setCaretHandler(0, new CaretHandler(0, 0));
}
项目:incubator-netbeans    文件:TextComponentBuilders.java   
static ContentTextBuilder fromField(Instance instance, String field, Heap heap) {
    Object model = instance.getValueOfField(field);
    if (!(model instanceof Instance)) return null;
    if (!DetailsUtils.isSubclassOf((Instance)model, GapContent.class.getName())) return null;
    return new ContentTextBuilder((Instance)model, heap);
}
项目:erp    文件:IntegerDocument.java   
public IntegerDocument() {
    this(new GapContent(), 10);
}
项目:erp    文件:IntegerDocument.java   
public IntegerDocument(final int size) {
    this(new GapContent(), size);
}
项目:erp    文件:StringDocument.java   
public StringDocument() {
    this(new GapContent(), null);
}
项目:erp    文件:StringDocument.java   
public StringDocument(final int size) {
    this(new GapContent(), size);
}
项目:erp    文件:StringDocument.java   
public StringDocument(final String mask) {
    this(new GapContent(), new Mask(mask));
}
项目:erp    文件:StringDocument.java   
public StringDocument(final Mask mask) {
    this(new GapContent(), mask);
}
项目:erp    文件:DecimalDocument.java   
public DecimalDocument() {
    this(new GapContent(), 15, 5);
}
项目:erp    文件:DecimalDocument.java   
public DecimalDocument(final int size, final int precision) {
    this(new GapContent(), size, precision);
}
项目:javify    文件:HTMLDocument.java   
/**
 * Constructs an HTML document using the default buffer size and a default
 * StyleSheet.
 */
public HTMLDocument()
{
  this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
}
项目:jvm-stm    文件:HTMLDocument.java   
/**
 * Constructs an HTML document using the default buffer size and a default
 * StyleSheet.
 */
public HTMLDocument()
{
  this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
}
项目:cn1    文件:HTMLDocumentTestCase.java   
public PublicHTMLDocument(final GapContent content, final StyleSheet styles) {
    super(content, styles);
}
项目:JamVM-PH    文件:HTMLDocument.java   
/**
 * Constructs an HTML document using the default buffer size and a default
 * StyleSheet.
 */
public HTMLDocument()
{
  this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
}
项目:jif    文件:JifDocument.java   
public JifDocument(InformContext styles) {
    this(new GapContent(BUFFER_SIZE_DEFAULT), (StyleContext)styles);
}
项目:jif    文件:JifDocument.java   
public JifDocument() {
    this(new GapContent(BUFFER_SIZE_DEFAULT), (StyleContext) new InformContext());
}
项目:classpath    文件:HTMLDocument.java   
/**
 * Constructs an HTML document using the default buffer size and a default
 * StyleSheet.
 */
public HTMLDocument()
{
  this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
}
项目:freeVM    文件:HTMLDocumentTestCase.java   
public PublicHTMLDocument(final GapContent content, final StyleSheet styles) {
    super(content, styles);
}
项目:freeVM    文件:HTMLDocumentTestCase.java   
public PublicHTMLDocument(final GapContent content, final StyleSheet styles) {
    super(content, styles);
}
项目:ablaze    文件:XMLDocument.java   
/**
 * Constructs the XML Document with a new GapContent buffer.
 * 
 * @param editor the editor component.
 */
public XMLDocument( JEditorPane editor) {
    super( new GapContent( 1024));

    this.editor = editor;
}
项目:javify    文件:HTMLDocument.java   
/**
 * Constructs an HTML document with the default content storage
 * implementation and the specified style/attribute storage mechanism.
 *
 * @param styles - the style sheet
 */
public HTMLDocument(StyleSheet styles)
{
 this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
项目:jvm-stm    文件:HTMLDocument.java   
/**
 * Constructs an HTML document with the default content storage 
 * implementation and the specified style/attribute storage mechanism.
 * 
 * @param styles - the style sheet
 */
public HTMLDocument(StyleSheet styles)
{
 this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
项目:JamVM-PH    文件:HTMLDocument.java   
/**
 * Constructs an HTML document with the default content storage 
 * implementation and the specified style/attribute storage mechanism.
 * 
 * @param styles - the style sheet
 */
public HTMLDocument(StyleSheet styles)
{
 this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
项目:jif    文件:JifProjectDocument.java   
/**
 * Constructs a JifProject document with the default content storage
 * implementation and a shared set of styles for syntax highlighting.
 * 
 * @param styles
 *            the set of styles for Inform syntax highlighting
 */
protected JifProjectDocument(StyleContext styles) {
    this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
项目:jif    文件:JifProjectDocument.java   
/**
 * Constructs a JifProject document with the default content storage
 * implementation and a default set of styles for syntax highlighting.
 * 
 */
public JifProjectDocument() {
    this(new GapContent(BUFFER_SIZE_DEFAULT), (StyleContext) new InformContext());
}
项目:jif    文件:ResourceDocument.java   
/**
 * Constructs a Resource document with the default content storage
 * implementation and a shared set of styles for syntax highlighting.
 * 
 * @param styles
 *            the set of styles for Inform syntax highlighting
 */
protected ResourceDocument(StyleContext styles) {
    this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
项目:jif    文件:ResourceDocument.java   
/**
 * Constructs a Resource document with the default content storage
 * implementation and a default set of styles for syntax highlighting.
 * 
 */
public ResourceDocument() {
    this(new GapContent(BUFFER_SIZE_DEFAULT), (StyleContext) new InformContext());
}
项目:jif    文件:JifConfigurationDocument.java   
/**
 * Constructs a JifConfiguration document with the default content storage
 * implementation and a shared set of styles for syntax highlighting.
 * 
 * @param styles
 *            the set of styles for Inform syntax highlighting
 */
protected JifConfigurationDocument(StyleContext styles) {
    this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
项目:jif    文件:JifConfigurationDocument.java   
/**
 * Constructs a JifConfiguration document with the default content storage
 * implementation and a default set of styles for syntax highlighting.
 * 
 */
public JifConfigurationDocument() {
    this(new GapContent(BUFFER_SIZE_DEFAULT), (StyleContext) new InformContext());
}
项目:jif    文件:InformDocument.java   
/**
 * Constructs an Inform document with the default content storage
 * implementation and a shared set of styles for syntax highlighting.
 * 
 * @param styles
 *            the set of styles for Inform syntax highlighting
 */
protected InformDocument(StyleContext styles) {
    this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
项目:jif    文件:InformDocument.java   
/**
 * Constructs an Inform document with the default content storage
 * implementation and a default set of styles for syntax highlighting.
 * 
 */
public InformDocument() {
    this(new GapContent(BUFFER_SIZE_DEFAULT), (StyleContext) new InformContext());
}