本文整理汇总了Java中org.netbeans.spi.palette.PaletteFactory类的典型用法代码示例。如果您正苦于以下问题:Java PaletteFactory类的具体用法?Java PaletteFactory怎么用?Java PaletteFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PaletteFactory类属于org.netbeans.spi.palette包,在下文中一共展示了PaletteFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOrCreatePalette
import org.netbeans.spi.palette.PaletteFactory; //导入依赖的package包/类
private static PaletteController getOrCreatePalette(String paletteFolder) throws IOException {
PaletteController palette = PALETTES.get(paletteFolder);
if(palette == null) {
palette = PaletteFactory.createPalette(paletteFolder, new HtmlPaletteActions(), null, new HtmlDragAndDropHandler());
PALETTES.put(paletteFolder, palette);
}
return palette;
}
示例2: createPalette
import org.netbeans.spi.palette.PaletteFactory; //导入依赖的package包/类
public static PaletteController createPalette() {
try {
if (null == palette)
palette = PaletteFactory.createPalette(JAVA_PALETTE_FOLDER, new MyActions());
return palette;
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
return null;
}
示例3: createPalette
import org.netbeans.spi.palette.PaletteFactory; //导入依赖的package包/类
@MimeRegistration(mimeType = "text/x-niftygui+xml", service = PaletteController.class)
public static PaletteController createPalette() {
if (null == palette){
AbstractNode paletteRoot = new AbstractNode(Children.create(new CategoryChildFactory(), true));
paletteRoot.setName("Palette Root");
palette = PaletteFactory.createPalette( paletteRoot,new MyActions(),null,new MyHandler());
}
return palette;
}
示例4: createPalette
import org.netbeans.spi.palette.PaletteFactory; //导入依赖的package包/类
public static PaletteController createPalette(ModelerFile file) {
IPaletteConfig config = file.getModelerDiagramModel().getPaletteConfig();
if (paletteConfigs.get(config) == null) {
AbstractNode paletteRoot = new AbstractNode(new CategoryChildren(file));
paletteRoot.setName(file.getName());
PaletteController controller = PaletteFactory.createPalette(paletteRoot, new ModelerPaletteActions(), null, new ModelerPaletteItemDragAndDropHandler());
paletteConfigs.put(config, controller);
}
return paletteConfigs.get(config);
}
示例5: createPalette
import org.netbeans.spi.palette.PaletteFactory; //导入依赖的package包/类
public static PaletteController createPalette() {
try {
if (null == palette)
palette = PaletteFactory.createPalette(PALETTE_FOLDER, new MyActions());
return palette;
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
return null;
}
示例6: createPalette
import org.netbeans.spi.palette.PaletteFactory; //导入依赖的package包/类
public static PaletteController createPalette() {
AbstractNode paletteRoot = new AbstractNode(new CategoryChildren());
paletteRoot.setName("Palette Root");
return PaletteFactory.createPalette( paletteRoot, new MyActions(), null, new MyDnDHandler() );
}