当前位置: 首页>>代码示例>>Java>>正文


Java MultiViewElementCallback类代码示例

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


MultiViewElementCallback类属于org.netbeans.core.spi.multiview包,在下文中一共展示了MultiViewElementCallback类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MultiViewModel

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
/**
     * constructor used at deserialization...
     */
    MultiViewModel(MultiViewDescription[] descs, MultiViewDescription defaultDescr, 
                   MultiViewModel.ActionRequestObserverFactory factory, Map<MultiViewDescription, MultiViewElement> existingElements) {
        observerFactory = factory;
        nestedElements = new HashMap<MultiViewDescription, MultiViewElement>();
//        nestedPerspectiveComponents = new HashMap();
        nestedPerspectives = new HashMap<MultiViewDescription,MultiViewPerspective>();
        nestedCallbacks = new HashMap<MultiViewElement, MultiViewElementCallback>();
        shownElements = new HashSet<MultiViewElement>(descs.length + 3);
        descriptions = descs;
        for (int i = 0; i < descriptions.length; i++) {
            MultiViewElement element = existingElements.get(descriptions[i]);
            nestedElements.put(descriptions[i], element);
            nestedPerspectives.put(descriptions[i], Accessor.DEFAULT.createPerspective(descriptions[i]));
            if (element != null) {
                // set the observer..
                MultiViewElementCallback call = factory.createElementCallback(descriptions[i]);
                nestedCallbacks.put(element, call);
                element.setMultiViewCallback(call);
//                nestedPerspectiveComponents.put(descriptions[i], Accessor.DEFAULT.createPersComponent(element));
            }
        }
        currentEditor = (defaultDescr == null || !nestedElements.containsKey(defaultDescr) ? descriptions[0] : defaultDescr);
        group = new BtnGroup();
	groupSplit = new BtnGroup();
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:MultiViewModel.java

示例2: setMultiViewCallback

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
@Override
public void setMultiViewCallback(MultiViewElementCallback callback) {
    multiViewObserver = callback;
    
    // needed for deserialization...
    if (dataObject instanceof FormDataObject) {
        // this is used (or misused?) to obtain the deserialized
        // multiview topcomponent and set it to FormEditorSupport
        FormDataObject formDataObject = (FormDataObject) dataObject;
        FormEditorSupport fes = (FormEditorSupport)formDataObject.getFormEditorSupport();
        if (javaEditor == null) {
            javaEditor = fes;
        }
        fes.setTopComponent(callback.getTopComponent());
    }
    super.setMultiViewCallback(callback);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:FormEditorSupport.java

示例3: setMultiViewCallback

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
@Override
public void setMultiViewCallback(MultiViewElementCallback callback) {
    multiViewObserver = callback;

    // add FormDesigner as a client property so it can be obtained
    // from multiview TopComponent (it is not sufficient to put
    // it into lookup - only content of the lookup of the active
    // element is accessible)
    callback.getTopComponent().putClientProperty("formDesigner", this); // NOI18N

    // needed for deserialization...
    if (formEditorSupport != null) {
        // this is used (or misused?) to obtain the deserialized multiview
        // topcomponent and set it to FormEditorSupport
        formEditorSupport.setTopComponent(callback.getTopComponent());
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:FormDesignerTC.java

示例4: run

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
public void run() {
    MultiViewElementCallback c = callback;
    if (c == null) {
        return;
    }
    TopComponent tc = c.getTopComponent();
    if (tc == null) {
        return;
    }
    
    super.updateName();
    Node nd = ((JrxmlDataObject)((JrxmlEditorSupport)cloneableEditorSupport()).getDataObject()).getNodeDelegate();
    tc.setName(nd.getName() );
    tc.setDisplayName(nd.getDisplayName());
    tc.setHtmlDisplayName(nd.getHtmlDisplayName());
    //tc.setIcon( nd.getIcon( BeanInfo.ICON_COLOR_16x16));
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:18,代码来源:JrxmlSourceEditor.java

示例5: updateName

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
public void updateName() {

        Runnable run = new Runnable() {
            public void run() {
                MultiViewElementCallback c = callback;

                if (c == null) {
                    return;
                }
                TopComponent tc = c.getTopComponent();
                if (tc == null) {
                    return;
                }
                Node nd = ((JRTXDataObject)support.getDataObject()).getNodeDelegate();
                tc.setName(nd.getName() );
                tc.setDisplayName(nd.getDisplayName());
                tc.setHtmlDisplayName(nd.getHtmlDisplayName());
                tc.setToolTipText( nd.getShortDescription() );
            }
        };

        if (SwingUtilities.isEventDispatchThread ())
            run.run();
        else
            SwingUtilities.invokeLater (run);
    }
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:27,代码来源:JRTXVisualView.java

示例6: run

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
public void run() {
    MultiViewElementCallback c = callback;
    if (c == null) {
        return;
    }
    TopComponent tc = c.getTopComponent();
    if (tc == null) {
        return;
    }
    
    super.updateName();
    Node nd = ((JRTXDataObject)((JRTXEditorSupport)cloneableEditorSupport()).getDataObject()).getNodeDelegate();
    tc.setName(nd.getName() );
    tc.setDisplayName(nd.getDisplayName());
    tc.setHtmlDisplayName(nd.getHtmlDisplayName());
    //tc.setIcon( nd.getIcon( BeanInfo.ICON_COLOR_16x16));
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:18,代码来源:JRTXSourceEditor.java

示例7: updateName

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
public void updateName() {
    
    Runnable run = new Runnable() {
        public void run() {
            MultiViewElementCallback c = callback;
            
            if (c == null) {
                return;
            }
            TopComponent tc = c.getTopComponent();
            if (tc == null) {
                return;
            }
            Node nd = ((JrxmlDataObject)support.getDataObject()).getNodeDelegate();
            tc.setName(nd.getName() );
            tc.setDisplayName(nd.getDisplayName());
            tc.setHtmlDisplayName(nd.getHtmlDisplayName());
            tc.setToolTipText( nd.getShortDescription() );
        }
    };
    
    if (SwingUtilities.isEventDispatchThread ())
        run.run();
    else
        SwingUtilities.invokeLater (run);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:27,代码来源:JrxmlVisualView.java

示例8: run

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
public void run() {
    MultiViewElementCallback c = callback;
    if (c == null) {
        return;
    }
    TopComponent tc = c.getTopComponent();
    if (tc == null) {
        return;
    }
    
    super.updateName();
    Node nd = ((JRCTXDataObject)((JRCTXEditorSupport)cloneableEditorSupport()).getDataObject()).getNodeDelegate();
    tc.setName(nd.getName() );
    tc.setDisplayName(nd.getDisplayName());
    tc.setHtmlDisplayName(nd.getHtmlDisplayName());
    //tc.setIcon( nd.getIcon( BeanInfo.ICON_COLOR_16x16));
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:18,代码来源:JRCTXSourceEditor.java

示例9: updateName

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
public void updateName() {

        Runnable run = new Runnable() {
            public void run() {
                MultiViewElementCallback c = callback;

                if (c == null) {
                    return;
                }
                TopComponent tc = c.getTopComponent();
                if (tc == null) {
                    return;
                }
                Node nd = ((JRCTXDataObject)support.getDataObject()).getNodeDelegate();
                tc.setName(nd.getName() );
                tc.setDisplayName(nd.getDisplayName());
                tc.setHtmlDisplayName(nd.getHtmlDisplayName());
                tc.setToolTipText( nd.getShortDescription() );
            }
        };

        if (SwingUtilities.isEventDispatchThread ())
            run.run();
        else
            SwingUtilities.invokeLater (run);
    }
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:27,代码来源:JRCTXVisualView.java

示例10: getElementForDescription

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
/**
    * used primarily at deserialization time.
    */
    synchronized MultiViewElement getElementForDescription(MultiViewDescription description, boolean create) {
       MultiViewElement element = nestedElements.get(description);
       if (element == null && create) {
           element = description.createElement();
           MultiViewElementCallback call = observerFactory.createElementCallback(description);
           nestedCallbacks.put(element, call);
           element.setMultiViewCallback(call);
           nestedElements.put(description, element);
//           nestedPerspectiveComponents.put(description, Accessor.DEFAULT.createPersComponent(element));
       }
       return element;
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:MultiViewModel.java

示例11: ensureVisible

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
/**
 * callback for the Pane implementation to adjust itself to the openAt() request.
 */
public void ensureVisible() {
    MultiViewElement paneEl = findPaneElement();
    if (paneEl != null) {
        open();
        MultiViewElementCallback call = peer.getModel().getCallbackForElement(paneEl);
        call.requestVisible();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:MultiViewCloneableTopComponent.java

示例12: setMultiViewCallback

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
public void setMultiViewCallback(MultiViewElementCallback callback) {
    this.callback = callback;
    if (dObj!=null) {
        XmlMultiViewEditorSupport support = dObj.getEditorSupport();
        if (support!=null) {
            support.setMVTC(callback.getTopComponent());
            support.updateDisplayName();
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:AbstractMultiViewElement.java

示例13: setMultiViewCallback

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
@Override
public void setMultiViewCallback(MultiViewElementCallback callback) {
    this.callback = callback;
    // Needed as Title and Tooltip could be calculated from currently set
    // jdbc connection - which changes after deserialization (none is set)
    updateName();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:SQLCloneableEditor.java

示例14: copyNameToCallbackTopComponent

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
private void copyNameToCallbackTopComponent() {
  final MultiViewElementCallback c = this.callback;
  if (c != null) {
    final TopComponent tc = c.getTopComponent();
    if (tc != null) {
      tc.setHtmlDisplayName(this.getHtmlDisplayName());
      tc.setDisplayName(this.getDisplayName());
      tc.setName(this.getName());
      tc.setToolTipText(this.getToolTipText());
    }
  }
  if (this.editorSupport != null) {
    this.editorSupport.updateTitles();
  }
}
 
开发者ID:raydac,项目名称:netbeans-mmd-plugin,代码行数:16,代码来源:MMDGraphEditor.java

示例15: updateName

import org.netbeans.core.spi.multiview.MultiViewElementCallback; //导入依赖的package包/类
public void updateName() {
   // Mutex.EVENT.readAccess(this);
   //IOUtils.runInAWTNoBlocking(
    
    Runnable run = new Runnable() {
        public void run() {
            MultiViewElementCallback c = callback;
            
            if (c == null) {
                return;
            }
            TopComponent tc = c.getTopComponent();
            if (tc == null) {
                return;
            }
            Node nd = ((JrxmlDataObject)((JrxmlEditorSupport)cloneableEditorSupport()).getDataObject()).getNodeDelegate();
            tc.setName(nd.getName() );
            tc.setDisplayName(nd.getDisplayName());
            tc.setHtmlDisplayName(nd.getHtmlDisplayName());
            tc.setIcon( nd.getIcon( BeanInfo.ICON_COLOR_16x16));
        }
    };
    
    if (SwingUtilities.isEventDispatchThread ())
        run.run();
    else
        SwingUtilities.invokeLater (run);
}
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:29,代码来源:JrxmlSourceEditor.java


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