本文整理汇总了Java中com.intellij.uiDesigner.HSpacer类的典型用法代码示例。如果您正苦于以下问题:Java HSpacer类的具体用法?Java HSpacer怎么用?Java HSpacer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HSpacer类属于com.intellij.uiDesigner包,在下文中一共展示了HSpacer类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processDrop
import com.intellij.uiDesigner.HSpacer; //导入依赖的package包/类
@Override public void processDrop(final GuiEditor editor,
final RadComponent[] components,
final GridConstraints[] constraintsToAdjust,
final ComponentDragObject dragObject) {
RadAbstractGridLayoutManager gridLayout = myContainer.getGridLayoutManager();
if (myContainer.getGridRowCount() == 0 && myContainer.getGridColumnCount() == 0) {
gridLayout.insertGridCells(myContainer, 0, false, true, true);
gridLayout.insertGridCells(myContainer, 0, true, true, true);
}
super.processDrop(editor, components, constraintsToAdjust, dragObject);
Palette palette = Palette.getInstance(editor.getProject());
ComponentItem hSpacerItem = palette.getItem(HSpacer.class.getName());
ComponentItem vSpacerItem = palette.getItem(VSpacer.class.getName());
InsertComponentProcessor icp = new InsertComponentProcessor(editor);
if (myXPart == 0) {
insertSpacer(icp, hSpacerItem, GridInsertMode.ColumnAfter);
}
if (myXPart == 2) {
insertSpacer(icp, hSpacerItem, GridInsertMode.ColumnBefore);
}
if (myYPart == 0) {
insertSpacer(icp, vSpacerItem, GridInsertMode.RowAfter);
}
if (myYPart == 2) {
insertSpacer(icp, vSpacerItem, GridInsertMode.RowBefore);
}
}
示例2: RadHSpacer
import com.intellij.uiDesigner.HSpacer; //导入依赖的package包/类
/**
* Constructor for use in SnapShooter
*/
public RadHSpacer(final String id, final int column) {
super(null, HSpacer.class, id);
getConstraints().setColumn(column);
getConstraints().setHSizePolicy(GridConstraints.SIZEPOLICY_CAN_GROW |
GridConstraints.SIZEPOLICY_WANT_GROW);
getConstraints().setFill(GridConstraints.FILL_HORIZONTAL);
}
示例3: checkAddDependencyOnInsert
import com.intellij.uiDesigner.HSpacer; //导入依赖的package包/类
private boolean checkAddDependencyOnInsert(final ComponentItem item)
{
if(item.getClassName().equals(HSpacer.class.getName()) || item.getClassName().equals(VSpacer.class.getName()))
{
// this is mostly required for IDEA developers, so that developers don't receive prompt to offer ui-designer-impl dependency
return true;
}
PsiManager manager = PsiManager.getInstance(myEditor.getProject());
final GlobalSearchScope projectScope = GlobalSearchScope.allScope(myEditor.getProject());
final GlobalSearchScope moduleScope = GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(myEditor.getModule());
final PsiClass componentClass = JavaPsiFacade.getInstance(manager.getProject()).findClass(item.getClassName(), projectScope);
if(componentClass != null && JavaPsiFacade.getInstance(manager.getProject()).findClass(item.getClassName(), moduleScope) == null)
{
final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myEditor.getProject()).getFileIndex();
List<OrderEntry> entries = fileIndex.getOrderEntriesForFile(componentClass.getContainingFile().getVirtualFile());
if(entries.size() > 0)
{
if(entries.get(0) instanceof ModuleSourceOrderEntry)
{
if(!checkAddModuleDependency(item, (ModuleSourceOrderEntry) entries.get(0)))
{
return false;
}
}
else if(entries.get(0) instanceof LibraryOrderEntry)
{
if(!checkAddLibraryDependency(item, (LibraryOrderEntry) entries.get(0)))
{
return false;
}
}
}
}
return true;
}
示例4: isSpacer
import com.intellij.uiDesigner.HSpacer; //导入依赖的package包/类
public boolean isSpacer() {
return myClassName.equals(HSpacer.class.getName()) || myClassName.equals(VSpacer.class.getName());
}
示例5: newInstance
import com.intellij.uiDesigner.HSpacer; //导入依赖的package包/类
public RadComponent newInstance(ModuleProvider moduleProvider, String className, String id) throws ClassNotFoundException {
return new RadHSpacer(moduleProvider, HSpacer.class, id);
}