本文整理匯總了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();
}
}