本文整理汇总了Java中org.netbeans.spi.project.ui.CustomizerProvider2类的典型用法代码示例。如果您正苦于以下问题:Java CustomizerProvider2类的具体用法?Java CustomizerProvider2怎么用?Java CustomizerProvider2使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CustomizerProvider2类属于org.netbeans.spi.project.ui包,在下文中一共展示了CustomizerProvider2类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createVaadinPropertiesItem
import org.netbeans.spi.project.ui.CustomizerProvider2; //导入依赖的package包/类
@NbBundle.Messages("vaadinProperties=Vaadin Properties")
private JMenuItem createVaadinPropertiesItem() {
JMenuItem item = new JMenuItem(Bundle.vaadinProperties());
item.addActionListener(new ActionListener() {
@Override
public void actionPerformed( ActionEvent e ) {
CustomizerProvider2 customizer =
getProject().getLookup().lookup(
CustomizerProvider2.class);
customizer.showCustomizer(VaadinCustomizer.VAADIN_CATEGORY,
null);
}
});
return item;
}
示例2: actionPerformed
import org.netbeans.spi.project.ui.CustomizerProvider2; //导入依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
CustomizerProvider2 cp2 = project.getLookup().lookup(CustomizerProvider2.class);
if (cp2 != null) {
cp2.showCustomizer(nodeName, panelName);
} else {
CustomizerProvider cp = project.getLookup().lookup(CustomizerProvider.class);
if (cp != null) {
cp.showCustomizer();
}
}
}
示例3: showCustomizer
import org.netbeans.spi.project.ui.CustomizerProvider2; //导入依赖的package包/类
public static void showCustomizer(Project project) {
if (project == null) {
return;
}
CustomizerProvider provider = project.getLookup().lookup(CustomizerProvider.class);
if (provider != null) {
if (provider instanceof CustomizerProvider2) {
((CustomizerProvider2) provider).showCustomizer(CodicCustomizerProvider.CATEGORY_NAME, null);
return;
}
provider.showCustomizer();
}
}