本文整理汇总了Java中org.netbeans.core.spi.multiview.MultiViewElement.getVisualRepresentation方法的典型用法代码示例。如果您正苦于以下问题:Java MultiViewElement.getVisualRepresentation方法的具体用法?Java MultiViewElement.getVisualRepresentation怎么用?Java MultiViewElement.getVisualRepresentation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.core.spi.multiview.MultiViewElement
的用法示例。
在下文中一共展示了MultiViewElement.getVisualRepresentation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addPropertyChangeListeners
import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
private void addPropertyChangeListeners() {
if( null != model ) {
for (MultiViewDescription mvd : model.getDescriptions()) {
if( mvd instanceof ContextAwareDescription && ((ContextAwareDescription)mvd).isSplitDescription() )
continue; //#240371 - don't update name from spit elements
MultiViewElement el = model.getElementForDescription( mvd, false );
if (el == null) {
continue;
}
if (el.getVisualRepresentation() instanceof Pane) {
Pane pane = (Pane)el.getVisualRepresentation();
final CloneableTopComponent tc = pane.getComponent();
if (!Arrays.asList(tc.getPropertyChangeListeners()).contains(propListener)) {
tc.addPropertyChangeListener(propListener);
}
}
}
}
}
示例2: updateName
import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
public void updateName() {
// is called before setMultiViewDescriptions() need to check for null.
if (model != null) {
for (MultiViewDescription mvd : model.getDescriptions()) {
if( mvd instanceof ContextAwareDescription && ((ContextAwareDescription)mvd).isSplitDescription() )
continue; //#240371 - don't update name from spit elements
MultiViewElement el = model.getElementForDescription(
mvd, MultiViewCloneableTopComponent.isSourceView(mvd)
);
if (el == null) {
continue;
}
if (el.getVisualRepresentation() instanceof Pane) {
Pane pane = (Pane)el.getVisualRepresentation();
pane.updateName();
final CloneableTopComponent tc = pane.getComponent();
peer.setDisplayName(tc.getDisplayName());
peer.setIcon(tc.getIcon());
if (!Arrays.asList(tc.getPropertyChangeListeners()).contains(propListener)) {
tc.addPropertyChangeListener(propListener);
}
}
}
}
}
示例3: getEditorPane
import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
JEditorPane getEditorPane() {
if (model != null) {
MultiViewElement el = model.getActiveElement();
if (el != null && el.getVisualRepresentation() instanceof Pane) {
Pane pane = (Pane)el.getVisualRepresentation();
return pane.getEditorPane();
}
}
return null;
}
示例4: getEditorPane
import org.netbeans.core.spi.multiview.MultiViewElement; //导入方法依赖的package包/类
public javax.swing.JEditorPane getEditorPane() {
if (peer == null || peer.model == null) {
return null;
}
MultiViewElement paneEl = findPaneElement();
if (paneEl != null) {
CloneableEditorSupport.Pane pane = (CloneableEditorSupport.Pane)paneEl.getVisualRepresentation();
return pane.getEditorPane();
}
// hopeless case, don't try to create new elements. it's users responsibility to
// switch to the editor element before getEditorPane()
return null;
}