本文整理汇总了Java中org.eclipse.gef.palette.PaletteDrawer.setInitialState方法的典型用法代码示例。如果您正苦于以下问题:Java PaletteDrawer.setInitialState方法的具体用法?Java PaletteDrawer.setInitialState怎么用?Java PaletteDrawer.setInitialState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.gef.palette.PaletteDrawer
的用法示例。
在下文中一共展示了PaletteDrawer.setInitialState方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFieldDrawer
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
private PaletteContainer createFieldDrawer() {
List<PaletteEntry> entries = new ArrayList<PaletteEntry>();
String group = "表单控件";
PaletteDrawer drawer = new PaletteDrawer(group,
ImageDescriptor.createFromFile(TaskFigure.class,
"icons/home.png"));
List<Component> listComp = ConfigManager.getComponents();
for (int i = 0; i < listComp.size(); i++) {
Component comp = (Component) listComp.get(i);
if (!validate(ConfigManager.COMPONENT_TYPE_FIELD, comp)) {
continue;
}
PaletteEntry paletteEntry = createCombinedEntry(comp);
if (paletteEntry == null) {
continue;
}
entries.add(paletteEntry);
}
drawer.addAll(entries);
drawer.setInitialState(2);
return drawer;
}
示例2: showClosedPaletteContainersWhenSearchTextBoxIsEmpty
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
private void showClosedPaletteContainersWhenSearchTextBoxIsEmpty(List list) {
for (int i = 0; i < list.size(); i++) {
PaletteDrawer paletteDrawer = (PaletteDrawer) list.get(i);
paletteDrawer.setInitialState(PaletteDrawer.INITIAL_STATE_CLOSED);
paletteDrawer.setVisible(true);
}
}
示例3: showOpenPaletteContainers
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
private void showOpenPaletteContainers(List list) {
for (int i = 0; i < list.size(); i++) {
PaletteDrawer paletteDrawer = (PaletteDrawer) list.get(i);
paletteDrawer.setInitialState(PaletteDrawer.INITIAL_STATE_OPEN);
paletteDrawer.setVisible(true);
}
}
示例4: createPaletteContainer
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
/**
* Creates the palette container.
*
* @param CategoryName
* the category name
* @return the palette drawer
*/
public PaletteDrawer createPaletteContainer(String CategoryName) {
String name = CategoryName.substring(0, 1).toUpperCase()
+ CategoryName.substring(1).toLowerCase();
PaletteDrawer p = new PaletteDrawer(name, ImageDescriptor.createFromURL(prepareIconPathURL("/icons/"+ name + "_categoryIcon.png")));
p.setInitialState(PaletteDrawer.INITIAL_STATE_CLOSED);
return p;
}