Java 类com.intellij.uiDesigner.radComponents.LayoutManagerRegistry 实例源码

项目:intellij-ce-playground    文件:CreateSnapShotAction.java   
private void collectUnknownLayoutManagerClasses(final Project project, final SnapShotRemoteComponent rc,
                                                final Set<String> layoutManagerClasses) throws IOException {
  RadComponentFactory factory = InsertComponentProcessor.getRadComponentFactory(project, rc.getClassName());
  if (factory instanceof RadContainer.Factory && rc.getLayoutManager().length() > 0 &&
      !LayoutManagerRegistry.isKnownLayoutClass(rc.getLayoutManager())) {
    layoutManagerClasses.add(rc.getLayoutManager());
  }

  SnapShotRemoteComponent[] children = rc.getChildren();
  if (children == null) {
    children = myClient.listChildren(rc.getId());
    rc.setChildren(children);
  }
  for(SnapShotRemoteComponent child: children) {
    collectUnknownLayoutManagerClasses(project, child, layoutManagerClasses);
  }
}
项目:intellij-ce-playground    文件:GuiDesignerConfigurable.java   
public void reset() {
  final GuiDesignerConfiguration configuration = GuiDesignerConfiguration.getInstance(myProject);

  /*general*/
  if (configuration.INSTRUMENT_CLASSES) {
    myGeneralUI.myRbInstrumentClasses.setSelected(true);
  }
  else {
    myGeneralUI.myRbInstrumentSources.setSelected(true);
  }
  myGeneralUI.myChkCopyFormsRuntime.setSelected(configuration.COPY_FORMS_RUNTIME_TO_OUTPUT);

  myGeneralUI.myLayoutManagerCombo.setModel(new DefaultComboBoxModel(LayoutManagerRegistry.getNonDeprecatedLayoutManagerNames()));
  myGeneralUI.myLayoutManagerCombo.setRenderer(new ListCellRendererWrapper<String>() {
    @Override
    public void customize(JList list, String value, int index, boolean selected, boolean hasFocus) {
      setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
    }
  });
  myGeneralUI.myLayoutManagerCombo.setSelectedItem(configuration.DEFAULT_LAYOUT_MANAGER);

  myGeneralUI.myDefaultFieldAccessibilityCombo.setSelectedItem(configuration.DEFAULT_FIELD_ACCESSIBILITY);

  myGeneralUI.myResizeHeaders.setSelected(configuration.RESIZE_HEADERS);
}
项目:tools-idea    文件:CreateSnapShotAction.java   
private void collectUnknownLayoutManagerClasses(final Project project, final SnapShotRemoteComponent rc,
                                                final Set<String> layoutManagerClasses) throws IOException {
  RadComponentFactory factory = InsertComponentProcessor.getRadComponentFactory(project, rc.getClassName());
  if (factory instanceof RadContainer.Factory && rc.getLayoutManager().length() > 0 &&
      !LayoutManagerRegistry.isKnownLayoutClass(rc.getLayoutManager())) {
    layoutManagerClasses.add(rc.getLayoutManager());
  }

  SnapShotRemoteComponent[] children = rc.getChildren();
  if (children == null) {
    children = myClient.listChildren(rc.getId());
    rc.setChildren(children);
  }
  for(SnapShotRemoteComponent child: children) {
    collectUnknownLayoutManagerClasses(project, child, layoutManagerClasses);
  }
}
项目:tools-idea    文件:GuiDesignerConfigurable.java   
public void reset() {
  final GuiDesignerConfiguration configuration = GuiDesignerConfiguration.getInstance(myProject);

  /*general*/
  if (configuration.INSTRUMENT_CLASSES) {
    myGeneralUI.myRbInstrumentClasses.setSelected(true);
  }
  else {
    myGeneralUI.myRbInstrumentSources.setSelected(true);
  }
  myGeneralUI.myChkCopyFormsRuntime.setSelected(configuration.COPY_FORMS_RUNTIME_TO_OUTPUT);

  myGeneralUI.myLayoutManagerCombo.setModel(new DefaultComboBoxModel(LayoutManagerRegistry.getNonDeprecatedLayoutManagerNames()));
  myGeneralUI.myLayoutManagerCombo.setRenderer(new ListCellRendererWrapper<String>() {
    @Override
    public void customize(JList list, String value, int index, boolean selected, boolean hasFocus) {
      setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
    }
  });
  myGeneralUI.myLayoutManagerCombo.setSelectedItem(configuration.DEFAULT_LAYOUT_MANAGER);

  myGeneralUI.myDefaultFieldAccessibilityCombo.setSelectedItem(configuration.DEFAULT_FIELD_ACCESSIBILITY);

  myGeneralUI.myResizeHeaders.setSelected(configuration.RESIZE_HEADERS);
}
项目:consulo-ui-designer    文件:CreateSnapShotAction.java   
private void collectUnknownLayoutManagerClasses(final Project project, final SnapShotRemoteComponent rc,
                                                final Set<String> layoutManagerClasses) throws IOException {
  RadComponentFactory factory = InsertComponentProcessor.getRadComponentFactory(project, rc.getClassName());
  if (factory instanceof RadContainer.Factory && rc.getLayoutManager().length() > 0 &&
      !LayoutManagerRegistry.isKnownLayoutClass(rc.getLayoutManager())) {
    layoutManagerClasses.add(rc.getLayoutManager());
  }

  SnapShotRemoteComponent[] children = rc.getChildren();
  if (children == null) {
    children = myClient.listChildren(rc.getId());
    rc.setChildren(children);
  }
  for(SnapShotRemoteComponent child: children) {
    collectUnknownLayoutManagerClasses(project, child, layoutManagerClasses);
  }
}
项目:intellij-ce-playground    文件:LayoutManagerProperty.java   
public LayoutManagerEditor() {
  myCbx.setRenderer(new ListCellRendererWrapper<String>() {
    @Override
    public void customize(JList list, String value, int index, boolean selected, boolean hasFocus) {
      setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
    }
  });
}
项目:intellij-ce-playground    文件:LayoutManagerProperty.java   
public JComponent getComponent(RadComponent component, String value, InplaceContext inplaceContext) {
  if (UIFormXmlConstants.LAYOUT_XY.equals(value)) {
    myCbx.setModel(new DefaultComboBoxModel(LayoutManagerRegistry.getLayoutManagerNames()));
  }
  else {
    myCbx.setModel(new DefaultComboBoxModel(LayoutManagerRegistry.getNonDeprecatedLayoutManagerNames()));
  }
  myCbx.setSelectedItem(value);
  return myCbx;
}
项目:intellij-ce-playground    文件:LayoutManagerProperty.java   
protected void setValueImpl(RadContainer component, String value) throws Exception {
  final RadLayoutManager oldLayout = component.getLayoutManager();
  if (oldLayout != null && Comparing.equal(oldLayout.getName(), value)) {
    return;
  }

  RadLayoutManager newLayoutManager = LayoutManagerRegistry.createLayoutManager(value);
  newLayoutManager.changeContainerLayout(component);
}
项目:tools-idea    文件:LayoutManagerProperty.java   
public LayoutManagerEditor() {
  myCbx.setRenderer(new ListCellRendererWrapper<String>() {
    @Override
    public void customize(JList list, String value, int index, boolean selected, boolean hasFocus) {
      setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
    }
  });
}
项目:tools-idea    文件:LayoutManagerProperty.java   
public JComponent getComponent(RadComponent component, String value, InplaceContext inplaceContext) {
  if (UIFormXmlConstants.LAYOUT_XY.equals(value)) {
    myCbx.setModel(new DefaultComboBoxModel(LayoutManagerRegistry.getLayoutManagerNames()));
  }
  else {
    myCbx.setModel(new DefaultComboBoxModel(LayoutManagerRegistry.getNonDeprecatedLayoutManagerNames()));
  }
  myCbx.setSelectedItem(value);
  return myCbx;
}
项目:tools-idea    文件:LayoutManagerProperty.java   
protected void setValueImpl(RadContainer component, String value) throws Exception {
  final RadLayoutManager oldLayout = component.getLayoutManager();
  if (oldLayout != null && Comparing.equal(oldLayout.getName(), value)) {
    return;
  }

  RadLayoutManager newLayoutManager = LayoutManagerRegistry.createLayoutManager(value);
  newLayoutManager.changeContainerLayout(component);
}
项目:consulo-ui-designer    文件:LayoutManagerProperty.java   
public LayoutManagerEditor() {
  myCbx.setRenderer(new ListCellRendererWrapper<String>() {
    @Override
    public void customize(JList list, String value, int index, boolean selected, boolean hasFocus) {
      setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
    }
  });
}
项目:consulo-ui-designer    文件:LayoutManagerProperty.java   
public JComponent getComponent(RadComponent component, String value, InplaceContext inplaceContext) {
  if (UIFormXmlConstants.LAYOUT_XY.equals(value)) {
    myCbx.setModel(new DefaultComboBoxModel(LayoutManagerRegistry.getLayoutManagerNames()));
  }
  else {
    myCbx.setModel(new DefaultComboBoxModel(LayoutManagerRegistry.getNonDeprecatedLayoutManagerNames()));
  }
  myCbx.setSelectedItem(value);
  return myCbx;
}
项目:consulo-ui-designer    文件:LayoutManagerProperty.java   
protected void setValueImpl(RadContainer component, String value) throws Exception {
  final RadLayoutManager oldLayout = component.getLayoutManager();
  if (oldLayout != null && Comparing.equal(oldLayout.getName(), value)) {
    return;
  }

  RadLayoutManager newLayoutManager = LayoutManagerRegistry.createLayoutManager(value);
  newLayoutManager.changeContainerLayout(component);
}
项目:consulo-ui-designer    文件:GuiDesignerConfigurable.java   
@Override
public void reset()
{
    final GuiDesignerConfiguration configuration = GuiDesignerConfiguration.getInstance(myProject);

   /*general*/
    if(configuration.INSTRUMENT_CLASSES)
    {
        myGeneralUI.myRbInstrumentClasses.setSelected(true);
    }
    else
    {
        myGeneralUI.myRbInstrumentSources.setSelected(true);
    }
    myGeneralUI.myChkCopyFormsRuntime.setSelected(configuration.COPY_FORMS_RUNTIME_TO_OUTPUT);
    myGeneralUI.myChkCopyForms.setSelected(configuration.COPY_FORMS_TO_OUTPUT);

    myGeneralUI.myLayoutManagerCombo.setModel(new DefaultComboBoxModel(LayoutManagerRegistry
            .getNonDeprecatedLayoutManagerNames()));
    myGeneralUI.myLayoutManagerCombo.setRenderer(new ListCellRendererWrapper<String>()
    {
        @Override
        public void customize(JList list, String value, int index, boolean selected, boolean hasFocus)
        {
            setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
        }
    });
    myGeneralUI.myLayoutManagerCombo.setSelectedItem(configuration.DEFAULT_LAYOUT_MANAGER);

    myGeneralUI.myDefaultFieldAccessibilityCombo.setSelectedItem(configuration.DEFAULT_FIELD_ACCESSIBILITY);

    myGeneralUI.myResizeHeaders.setSelected(configuration.RESIZE_HEADERS);
    myGeneralUI.myUseJBScalingCheckBox.setSelected(configuration.USE_JB_SCALING);
}
项目:intellij-ce-playground    文件:LayoutManagerProperty.java   
@Override
protected void customize(@NotNull final String value) {
  setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
}
项目:tools-idea    文件:LayoutManagerProperty.java   
@Override
protected void customize(@NotNull final String value) {
  setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
}
项目:consulo-ui-designer    文件:LayoutManagerProperty.java   
@Override
protected void customize(@NotNull final String value) {
  setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value));
}