1 /* 2 * The contents of this file are subject to the terms of the Common Development 3 * and Distribution License (the License). You may not use this file except in 4 * compliance with the License. 5 * 6 * You can obtain a copy of the License at http://www.netbeans.org/cddl.html 7 * or http://www.netbeans.org/cddl.txt. 8 * 9 * When distributing Covered Code, include this CDDL Header Notice in each file 10 * and include the License file at http://www.netbeans.org/cddl.txt. 11 * If applicable, add the following below the CDDL Header, with the fields 12 * enclosed by brackets [] replaced by your own identifying information: 13 * "Portions Copyrighted [year] [name of copyright owner]" 14 * 15 * The Original Software is NetBeans. The Initial Developer of the Original 16 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun 17 * Microsystems, Inc. All Rights Reserved. 18 */ 19 20 package org.netbeans.lib.editor.view; 21 22 import java.awt.Component; 23 import java.awt.Graphics; 24 import java.awt.Rectangle; 25 import java.awt.Shape; 26 import javax.swing.event.DocumentEvent; 27 import javax.swing.text.AbstractDocument; 28 import javax.swing.text.AttributeSet; 29 import javax.swing.text.BadLocationException; 30 import javax.swing.text.Element; 31 import javax.swing.text.LayoutQueue; 32 import javax.swing.text.Position; 33 import javax.swing.text.StyleConstants; 34 import javax.swing.text.Utilities; 35 import javax.swing.text.View; 36 import javax.swing.text.ViewFactory; 37 import org.netbeans.editor.view.spi.ViewLayoutState; 38 39 //import org.netbeans.spi.lexer.util.GapObjectArray; 40 41 /** 42 * Maintainer of the children of the {@link GapBoxView}. 43 * <br> 44 * It also acts as a runnable task for flushing requirement 45 * changes of the view it works for. 46 * 47 * Besides the current implementation there could be 48 * an implementation for small number of children (e.g. up to 20) 49 * which would not have to use index gap and which would use indexes 50 * <= 127 that could be merged into shorts by pairs. 51 * This approach could save about 40 bytes. 52 * <br> 53 * However the GapBoxView is able to unload its children 54 * dynamically which can save much more memory 55 * than the described simplified implementation. 56 * 57 * @author Miloslav Metelka 58 * @version 1.00 59 */ 60 61 class GapDocumentViewChildren extends GapBoxViewChildren { 62 63 GapDocumentViewChildren(GapBoxView view) { 64 super(view); 65 } 66 67 } 68