本文整理汇总了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();
}
示例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);
}
示例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());
}
}
示例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));
}
示例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);
}
示例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));
}
示例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);
}
示例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));
}
示例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);
}
示例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;
}
示例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();
}
}
示例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();
}
}
}
示例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();
}
示例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();
}
}
示例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);
}