當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。