当前位置: 首页>>代码示例>>Java>>正文


Java GuiDesignerConfiguration类代码示例

本文整理汇总了Java中com.intellij.uiDesigner.GuiDesignerConfiguration的典型用法代码示例。如果您正苦于以下问题:Java GuiDesignerConfiguration类的具体用法?Java GuiDesignerConfiguration怎么用?Java GuiDesignerConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GuiDesignerConfiguration类属于com.intellij.uiDesigner包,在下文中一共展示了GuiDesignerConfiguration类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import com.intellij.uiDesigner.GuiDesignerConfiguration; //导入依赖的package包/类
@NotNull
protected PsiElement[] create(final String newName, final PsiDirectory directory) throws IncorrectOperationException {
  PsiFile sourceFile = PsiFileFactory.getInstance(directory.getProject())
    .createFileFromText(newName + ".java", createClassBody(newName, myRecentGenerateOK, myRecentGenerateCancel, myRecentGenerateMain));
  sourceFile = (PsiFile)directory.add(sourceFile);

  JavaCodeStyleManager.getInstance(directory.getProject()).shortenClassReferences(sourceFile);
  CodeStyleManager.getInstance(directory.getProject()).reformat(sourceFile);

  final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(directory);
  final String packageName = aPackage.getQualifiedName();
  final String fqClassName = packageName.length() == 0 ? newName : packageName + "." + newName;

  final String formBody = createFormBody(fqClassName, "/com/intellij/uiDesigner/NewDialog.xml",
                                         GuiDesignerConfiguration.getInstance(directory.getProject()).DEFAULT_LAYOUT_MANAGER);
  final PsiFile formFile = PsiFileFactory.getInstance(directory.getProject()).createFileFromText(newName + ".form", formBody);
  PsiElement createdFile = directory.add(formFile);

  PsiClass[] classes = ((PsiJavaFile)sourceFile).getClasses();
  return new PsiElement[]{createdFile, classes[0]};
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:CreateDialogAction.java

示例2: create

import com.intellij.uiDesigner.GuiDesignerConfiguration; //导入依赖的package包/类
@NotNull
protected PsiElement[] create(final String newName, final PsiDirectory directory) throws IncorrectOperationException {
  PsiFile sourceFile = PsiFileFactory.getInstance(directory.getProject())
    .createFileFromText(newName + ".java", createClassBody(newName, myRecentGenerateOK, myRecentGenerateCancel, myRecentGenerateMain));
  sourceFile = (PsiFile)directory.add(sourceFile);

  JavaCodeStyleManager.getInstance(directory.getProject()).shortenClassReferences(sourceFile);
  CodeStyleManager.getInstance(directory.getProject()).reformat(sourceFile);

  final PsiJavaPackage aPackage = JavaDirectoryService.getInstance().getPackage(directory);
  final String packageName = aPackage.getQualifiedName();
  final String fqClassName = packageName.length() == 0 ? newName : packageName + "." + newName;

  final String formBody = createFormBody(fqClassName, "/com/intellij/uiDesigner/NewDialog.xml",
                                         GuiDesignerConfiguration.getInstance(directory.getProject()).DEFAULT_LAYOUT_MANAGER);
  final PsiFile formFile = PsiFileFactory.getInstance(directory.getProject()).createFileFromText(newName + ".form", formBody);
  PsiElement createdFile = directory.add(formFile);

  PsiClass[] classes = ((PsiJavaFile)sourceFile).getClasses();
  return new PsiElement[]{createdFile, classes[0]};
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:22,代码来源:CreateDialogAction.java

示例3: doOKAction

import com.intellij.uiDesigner.GuiDesignerConfiguration; //导入依赖的package包/类
protected void doOKAction() {
  if (myCreateBoundClassCheckbox.isSelected()) {
    myLastClassName = myClassNameTextField.getText();
  }
  else {
    myLastClassName = null;
  }
  myLastLayoutManager = myBaseLayoutManagerCombo.getSelectedName();
  GuiDesignerConfiguration.getInstance(myProject).DEFAULT_LAYOUT_MANAGER = myLastLayoutManager;
  final String inputString = myFormNameTextField.getText().trim();
  if (myValidator.checkInput(inputString) && myValidator.canClose(inputString)) {
    close(OK_EXIT_CODE);
  }
  close(OK_EXIT_CODE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:CreateFormAction.java

示例4: createDefaultGridLayoutManager

import com.intellij.uiDesigner.GuiDesignerConfiguration; //导入依赖的package包/类
public static RadLayoutManager createDefaultGridLayoutManager(Project project) {
  final String defaultLayoutManager = GuiDesignerConfiguration.getInstance(project).DEFAULT_LAYOUT_MANAGER;
  if (defaultLayoutManager.equals(UIFormXmlConstants.LAYOUT_GRIDBAG)) {
    return new RadGridBagLayoutManager();
  }
  else if (defaultLayoutManager.equals(UIFormXmlConstants.LAYOUT_FORM)) {
    return new RadFormLayoutManager();
  }
  else {
    return new RadGridLayoutManager();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:LayoutManagerRegistry.java

示例5: canResizeCells

import com.intellij.uiDesigner.GuiDesignerConfiguration; //导入依赖的package包/类
private boolean canResizeCells() {
  return GuiDesignerConfiguration.getInstance(myEditor.getProject()).RESIZE_HEADERS &&
         mySelectedContainer != null &&
         mySelectedContainer.getGridLayoutManager().canResizeCells();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:GridCaptionPanel.java

示例6: canResizeCells

import com.intellij.uiDesigner.GuiDesignerConfiguration; //导入依赖的package包/类
private boolean canResizeCells()
{
	return GuiDesignerConfiguration.getInstance(myEditor.getProject()).RESIZE_HEADERS &&
			mySelectedContainer != null &&
			mySelectedContainer.getGridLayoutManager().canResizeCells();
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:7,代码来源:GridCaptionPanel.java

示例7: FormSourceCodeGenerator

import com.intellij.uiDesigner.GuiDesignerConfiguration; //导入依赖的package包/类
public FormSourceCodeGenerator(@NotNull final Project project)
{
	myProject = project;
	myErrors = new ArrayList<FormErrorInfo>();
	myConfiguration = GuiDesignerConfiguration.getInstance(project);
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:7,代码来源:FormSourceCodeGenerator.java


注:本文中的com.intellij.uiDesigner.GuiDesignerConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。