Examples of AbstractDocument


Examples of javax.swing.text.AbstractDocument

    }

    public void testGetRootView() {
        BasicTextUI ui = getBasicTextUI(jta);
        View rootView = ui.getRootView(jta);
        AbstractDocument doc = (AbstractDocument) jta.getDocument();
        Element rootElement = jta.getDocument().getDefaultRootElement();
        assertEquals(1, rootView.getViewCount());
        View sonRootView = rootView.getView(0);
        assertNotNull(sonRootView);
        assertEquals(0, sonRootView.getViewCount());
        assertEquals(rootElement, rootView.getElement());
        assertEquals(sonRootView.getElement(), rootElement);
        assertEquals(rootView.getView(0).getElement(), rootElement);
        assertEquals(doc, rootView.getDocument());
        assertEquals(jta, rootView.getContainer());
        assertEquals(doc.getLength() + 1, rootView.getEndOffset());
        assertEquals(ui, rootView.getViewFactory());
        assertNull(rootView.getParent());
        /*
         * Next Functionality is not required try { rootView.setParent(new
         * PlainView(rootElement)); } catch (Error error) { bWasException =
View Full Code Here

Examples of org.apache.batik.dom.AbstractDocument

     */
    public CompositeGraphicsNode buildCompositeGraphicsNode
        (BridgeContext ctx, Element e, CompositeGraphicsNode cgn) {

        XBLOMContentElement content = (XBLOMContentElement) e;
        AbstractDocument doc = (AbstractDocument) e.getOwnerDocument();
        DefaultXBLManager xm = (DefaultXBLManager) doc.getXBLManager();
        contentManager = xm.getContentManager(e);

        if (cgn == null) {
            cgn = new CompositeGraphicsNode();
            associateSVGContext(ctx, e, cgn);
View Full Code Here

Examples of org.apache.flex.forks.batik.dom.AbstractDocument

     */
    protected EventException createEventException(short code,
                                                  String key,
                                                  Object[] args) {
        try {
            AbstractDocument doc = (AbstractDocument) node.getOwnerDocument();
            return new EventException(code, doc.formatMessage(key, args));
        } catch (Exception e) {
            return new EventException(code, key);
        }
    }
View Full Code Here

Examples of org.eclipse.jface.text.AbstractDocument

   */
  private Iterator getRegionAnnotationIterator(int offset, int length, boolean canStartBefore, boolean canEndAfter) {
    if (!(fDocument instanceof AbstractDocument))
      return new RegionIterator(getAnnotationIterator(true), this, offset, length, canStartBefore, canEndAfter);

    AbstractDocument document= (AbstractDocument) fDocument;
    cleanup(true);

    try {
      Position[] positions= document.getPositions(IDocument.DEFAULT_CATEGORY, offset, length, canStartBefore, canEndAfter);
      return new AnnotationsInterator(positions, fPositions);
    } catch (BadPositionCategoryException e) {
      //can not happen
      Assert.isTrue(false);
      return null;
View Full Code Here

Examples of org.locationtech.udig.document.model.AbstractDocument

     * @param info
     * @param descriptors
     * @return document
     */
    private IDocument create(String info, List<HotlinkDescriptor> descriptors) {
        AbstractDocument doc = null;
        switch (descriptors.get(0).getType()) {
        case FILE:
            doc = new FileHotlinkDocument(info, descriptors);
            break;
        case WEB:
            doc = new WebHotlinkDocument(info, descriptors);
            break;
        case ACTION:
            doc = new ActionHotlinkDocument(info, descriptors);
            break;
        default:
            break;
        }
        if (doc != null) {
            doc.setSource(this);   
        }
        return doc;
    }
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.