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); } }
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); }
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)); } }); }
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; }
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); }
@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); }
@Override protected void customize(@NotNull final String value) { setText(LayoutManagerRegistry.getLayoutManagerDisplayName(value)); }