private void createUIComponents() { impexLabel = new JBLabel(); impexLabel.setBorder(IdeBorderFactory.createTitledBorder(HybrisI18NBundleUtils.message( "hybris.import.settings.impex.title"), false)); hybrisRemoteControlLabel = new JBLabel(); hybrisRemoteControlLabel.setBorder(IdeBorderFactory.createTitledBorder(HybrisI18NBundleUtils.message( "hybris.import.settings.tools.remote.title"), false)); projectImportLabel = new JBLabel(); projectImportLabel.setBorder(IdeBorderFactory.createTitledBorder(HybrisI18NBundleUtils.message( "hybris.import.settings.project.title"))); junkListPanel = new JunkListPanel("hybris.import.settings.junk.directory.name", new ArrayList<String>()); junkDirectoriesPanel = junkListPanel; projectTreeViewSettingsLabel = new JBLabel(); projectTreeViewSettingsLabel.setBorder(IdeBorderFactory.createTitledBorder(HybrisI18NBundleUtils.message( "hybris.project.view.tree.settings"))); }
public TablePanel(Table table) { $$$setupUI$$$(); rootPanel.setBorder(IdeBorderFactory.createTitledBorder(table.getTableName(), false)); //不可整列移动 fieldTable.getTableHeader().setReorderingAllowed(false); //不可拉动表格 fieldTable.getTableHeader().setResizingAllowed(false); fieldTable.getEmptyText().setText("No Columns"); JPanel panel = ToolbarDecorator.createDecorator(fieldTable) .setAddAction(it -> addAction()) .setRemoveAction(it -> removeAction()) .setEditAction(it -> editAction()) .createPanel(); panel.setPreferredSize(JBUI.size(300, 200)); columnsPanel.setBorder(IdeBorderFactory.createTitledBorder("Columns", false)); columnsPanel.add(panel, BorderLayout.CENTER); mainPanel.add(columnsPanel); modelTextField.setText(table.getModelName()); tableTextField.setText(table.getTableName()); initFields(table.getFields()); this.getRootComponent().registerKeyboardAction(e -> this.getRootComponent().disable(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); }
private void createProgressPanel() { myProgressIcon = new AsyncProcessIcon("Designer progress"); myProgressMessage = new JLabel(); JPanel progressBlock = new JPanel(); progressBlock.add(myProgressIcon); progressBlock.add(myProgressMessage); progressBlock.setBorder(IdeBorderFactory.createRoundedBorder()); myProgressPanel = new JPanel(new GridBagLayout()); myProgressPanel.add(progressBlock, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0) ); myProgressPanel.setOpaque(false); }
private JPanel createFieldPanel() { myDoNotReplaceRadioButton = new JBRadioButton(UIUtil.replaceMnemonicAmpersand("Do n&ot replace")); myReplaceFieldsInaccessibleInRadioButton = new JBRadioButton(UIUtil.replaceMnemonicAmpersand("Replace fields &inaccessible in usage context")); myReplaceAllFieldsRadioButton = new JBRadioButton(UIUtil.replaceMnemonicAmpersand("&Replace all fields")); myDoNotReplaceRadioButton.setFocusable(false); myReplaceFieldsInaccessibleInRadioButton.setFocusable(false); myReplaceAllFieldsRadioButton.setFocusable(false); final ButtonGroup group = new ButtonGroup(); group.add(myDoNotReplaceRadioButton); group.add(myReplaceFieldsInaccessibleInRadioButton); group.add(myReplaceAllFieldsRadioButton); final JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.add(myDoNotReplaceRadioButton); panel.add(myReplaceFieldsInaccessibleInRadioButton); panel.add(myReplaceAllFieldsRadioButton); panel.setBorder(IdeBorderFactory.createTitledBorder("Replace fields used in expression with their getters", true)); return panel; }
protected JComponent createCenterPanel() { myScopePanel.setBorder(IdeBorderFactory.createTitledBorder( AnalysisScopeBundle.message("analysis.scope.title", myAnalysisNoun), true)); myProjectButton.setText(AnalysisScopeBundle.message("cyclic.dependencies.scope.dialog.project.button", myAnalysisVerb)); ButtonGroup group = new ButtonGroup(); group.add(myProjectButton); if (myModuleName != null) { myModuleButton.setText(AnalysisScopeBundle.message("cyclic.dependencies.scope.dialog.module.button", myAnalysisVerb, myModuleName)); group.add(myModuleButton); } myModuleButton.setVisible(myModuleName != null); mySelectedScopeButton.setVisible(mySelectedScope != null); if (mySelectedScope != null) { mySelectedScopeButton.setText(mySelectedScope.getShortenName()); group.add(mySelectedScopeButton); } if (mySelectedScope != null) { mySelectedScopeButton.setSelected(true); } else if (myModuleName != null) { myModuleButton.setSelected(true); } else { myProjectButton.setSelected(true); } return myWholePanel; }
@Override protected JPanel createFindWhatPanel() { JPanel findWhatPanel = new JPanel(); findWhatPanel.setBorder(IdeBorderFactory.createTitledBorder(FindBundle.message("find.what.group"), true)); findWhatPanel.setLayout(new BoxLayout(findWhatPanel, BoxLayout.Y_AXIS)); myCbUsages = addCheckboxToPanel(FindBundle.message("find.what.usages.checkbox"), getFindUsagesOptions().isUsages, findWhatPanel, true); PsiClass psiClass = (PsiClass)getPsiElement(); myCbMethodsUsages = addCheckboxToPanel(FindBundle.message("find.what.methods.usages.checkbox"), getFindUsagesOptions().isMethodsUsages, findWhatPanel, true); if (!psiClass.isAnnotationType()) { myCbFieldsUsages = addCheckboxToPanel(FindBundle.message("find.what.fields.usages.checkbox"), getFindUsagesOptions().isFieldsUsages, findWhatPanel, true); if (psiClass.isInterface()){ myCbImplementingClasses = addCheckboxToPanel(FindBundle.message("find.what.implementing.classes.checkbox"), getFindUsagesOptions().isImplementingClasses, findWhatPanel, true); myCbDerivedInterfaces = addCheckboxToPanel(FindBundle.message("find.what.derived.interfaces.checkbox"), getFindUsagesOptions().isDerivedInterfaces, findWhatPanel, true); } else if (!psiClass.hasModifierProperty(PsiModifier.FINAL)){ myCbDerivedClasses = addCheckboxToPanel(FindBundle.message("find.what.derived.classes.checkbox"), getFindUsagesOptions().isDerivedClasses, findWhatPanel, true); } } return findWhatPanel; }
@Override protected JPanel createFindWhatPanel() { final JPanel findWhatPanel = new JPanel(); findWhatPanel.setBorder(IdeBorderFactory.createTitledBorder(FindBundle.message("find.what.group"), true)); findWhatPanel.setLayout(new BoxLayout(findWhatPanel, BoxLayout.Y_AXIS)); myCbUsages = addCheckboxToPanel(FindBundle.message("find.what.usages.checkbox") , myFindUsagesOptions.isUsages, findWhatPanel, true); //final ThrowSearchUtil.Root[] searchRoots = ThrowSearchUtil.getSearchRoots(getPsiElement ()); //final PsiThrowStatement throwStatement = (PsiThrowStatement)getPsiElement(); //final boolean exactExnType = ThrowSearchUtil.isExactExnType(throwStatement.getException ()); //if (exactExnType) { // myCbStrict.setEnabled(false); //} myHasFindWhatPanel = true; return findWhatPanel; }
private JComponent createParametersPanel() { JPanel panel = new ParameterTablePanel(myProject, myVariableData, myAnonClass) { protected void updateSignature() { } protected void doEnterAction() { clickDefaultButton(); } protected void doCancelAction() { AnonymousToInnerDialog.this.doCancelAction(); } }; panel.setBorder(IdeBorderFactory.createTitledBorder( RefactoringBundle.message("anonymousToInner.parameters.panel.border.title"), false)); return panel; }
@Nullable @Override protected JComponent createCenterPanel() { final Project project = myOldMethod.getProject(); final DiffPanelEx diffPanel = (DiffPanelEx)DiffManager.getInstance().createDiffPanel(null, project, getDisposable(), null); diffPanel.setComparisonPolicy(ComparisonPolicy.IGNORE_SPACE); diffPanel.setHighlightMode(HighlightMode.BY_WORD); DiffPanelOptions diffPanelOptions = diffPanel.getOptions(); diffPanelOptions.setShowSourcePolicy(DiffPanelOptions.ShowSourcePolicy.OPEN_EDITOR); diffPanelOptions.setRequestFocusOnNewContent(false); SimpleDiffRequest request = new SimpleDiffRequest(project, null); final String oldContent = myOldMethod.getText() + "\n\n\nmethod call:\n " + myOldCall.getText(); final String newContent = myNewMethod.getText() + "\n\n\nmethod call:\n " + myNewCall.getText(); request.setContents(new SimpleContent(oldContent), new SimpleContent(newContent)); request.setContentTitles("Before", "After"); diffPanel.setDiffRequest(request); final JPanel panel = new JPanel(new BorderLayout()); panel.add(diffPanel.getComponent(), BorderLayout.CENTER); panel.setBorder(IdeBorderFactory.createEmptyBorder(new Insets(5, 0, 0, 0))); return panel; }
protected JComponent createCenterPanel() { final JLabel label = new JLabel("<html>Super class \'" + mySuperClass.getQualifiedName() + "\' inheritors: " + (myTargetClasses.length > 1 ? " <br> \'" : "\'") + StringUtil.join(myTargetClasses, new Function<PsiClass, String>() { public String fun(final PsiClass psiClass) { return psiClass.getQualifiedName(); } }, "\',<br> \'") + "\'</html>"); label.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 5)); final JPanel panel = new JPanel(new GridBagLayout()); final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0); panel.add(myDocPanel, gc); panel.add(label, gc); gc.weighty = 1; gc.fill = GridBagConstraints.BOTH; panel.add(super.createCenterPanel(), gc); return panel; }
@Override protected JComponent createComponentImpl() { final JPanel panel = new JPanel(new GridBagLayout()); panel.setBorder(new EmptyBorder(UIUtil.PANEL_SMALL_INSETS)); final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0); panel.add(myCompilerOutputEditor.createComponentImpl(), gc); final JPanel javadocPanel = (JPanel)myJavadocEditor.createComponentImpl(); javadocPanel.setBorder(IdeBorderFactory.createTitledBorder(myJavadocEditor.getDisplayName(), false)); gc.weighty = 1; panel.add(javadocPanel, gc); final JPanel annotationsPanel = (JPanel)myAnnotationsEditor.createComponentImpl(); annotationsPanel.setBorder(IdeBorderFactory.createTitledBorder(myAnnotationsEditor.getDisplayName(), false)); panel.add(annotationsPanel, gc); return panel; }
public ProjectSettingsStep(WizardContext context) { myWizardContext = context; myFormatPanel = new ProjectFormatPanel(); myNamePathComponent = NamePathComponent.initNamePathComponent(context); myNamePathComponent.setShouldBeAbsolute(true); JPanel modulePanel = getModulePanel(); if (context.isCreatingNewProject()) { mySettingsPanel.add(myNamePathComponent, BorderLayout.NORTH); addExpertPanel(modulePanel); } else { mySettingsPanel.add(modulePanel, BorderLayout.NORTH); } myModuleNameLocationComponent.bindModuleSettings(myNamePathComponent); myExpertDecorator = new HideableDecorator(myExpertPlaceholder, "Mor&e Settings", false); myExpertPanel.setBorder(IdeBorderFactory.createEmptyBorder(0, IdeBorderFactory.TITLED_BORDER_INDENT, 5, 0)); myExpertDecorator.setContentComponent(myExpertPanel); if (myWizardContext.isCreatingNewProject()) { addProjectFormat(modulePanel); } }
@NotNull public static JComponent createTitle(@NotNull String title, @Nullable Charset charset, @Nullable LineSeparator separator, boolean readOnly) { if (readOnly) title += " " + DiffBundle.message("diff.content.read.only.content.title.suffix"); JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(IdeBorderFactory.createEmptyBorder(0, 4, 0, 4)); panel.add(createTitlePanel(title), BorderLayout.CENTER); if (charset != null && separator != null) { JPanel panel2 = new JPanel(); panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS)); panel2.add(createCharsetPanel(charset)); panel2.add(Box.createRigidArea(new Dimension(4, 0))); panel2.add(createSeparatorPanel(separator)); panel.add(panel2, BorderLayout.EAST); } else if (charset != null) { panel.add(createCharsetPanel(charset), BorderLayout.EAST); } else if (separator != null) { panel.add(createSeparatorPanel(separator), BorderLayout.EAST); } return panel; }
public CommentsTabForm() { myErrorComponent = new LabeledTextComponent(); myErrorComponent.setTitle(DiagnosticBundle.message("error.dialog.error.prompt")); myCommentsArea = new LabeledTextComponent(); myCommentsArea.setTitle(DiagnosticBundle.message("error.dialog.comment.prompt")); JTextArea errorArea = myErrorComponent.getTextComponent(); //errorArea.setPreferredSize(new Dimension(IdeErrorsDialog.COMPONENTS_WIDTH, -1)); errorArea.setLineWrap(true); errorArea.setEditable(false); errorArea.setBackground(UIUtil.getTextFieldBackground()); errorArea.setBorder(IdeBorderFactory.createBorder()); myCommentsArea.getTextComponent().setLineWrap(true); myErrorPanel.add(myErrorComponent.getContentPane()); myCommentsPanel.add(myCommentsArea.getContentPane()); }
public DetailsTabForm(@Nullable Action analyzeAction, boolean internalMode) { myCommentsArea.setTitle(DiagnosticBundle.message("error.dialog.comment.prompt")); myDetailsPane.setBackground(UIUtil.getTextFieldBackground()); myDetailsHolder.setPreferredSize(new Dimension(IdeErrorsDialog.COMPONENTS_WIDTH, internalMode ? 500 : 205)); myDetailsHolder.setBorder(IdeBorderFactory.createBorder()); if (analyzeAction != null) { myAnalyzeStacktraceButton.setAction(analyzeAction); } else { myAnalyzeStacktraceButton.setVisible(false); } myAssigneeComboBox.setRenderer(new DeveloperRenderer(myAssigneeComboBox.getRenderer())); myAssigneeComboBox.setPrototypeDisplayValue(new Developer(0, "Here Goes Some Very Long String")); myAssigneeComboBox.addActionListener(new ActionListenerProxy(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { myAssigneeId = getAssigneeId(); } })); new ComboboxSpeedSearch(myAssigneeComboBox) { @Override protected String getElementText(Object element) { return element == null ? "" : ((Developer) element).getSearchableText(); } }; }
public VcsCommitInfoBalloon(@NotNull JTree tree) { myTree = tree; myEditorPane = new JEditorPane(UIUtil.HTML_MIME, ""); myEditorPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE); myEditorPane.setEditable(false); myEditorPane.setBackground(HintUtil.INFORMATION_COLOR); myEditorPane.setFont(UIUtil.getToolTipFont()); myEditorPane.setBorder(HintUtil.createHintBorder()); Border margin = IdeBorderFactory.createEmptyBorder(3, 3, 3, 3); myEditorPane.setBorder(new CompoundBorder(myEditorPane.getBorder(), margin)); myEditorPane.addHyperlinkListener(new HyperlinkAdapter() { @Override protected void hyperlinkActivated(HyperlinkEvent e) { BrowserUtil.browse(e.getURL()); } }); myWrapper = new Wrapper(myEditorPane); myPopupBuilder = JBPopupFactory.getInstance().createComponentPopupBuilder(myWrapper, null); myPopupBuilder.setCancelOnClickOutside(true).setResizable(true).setMovable(true).setRequestFocus(false) .setMinSize(new Dimension(80, 30)); }
@Override protected JComponent createCenterPanel() { myTitle.setText(myText); myOptionsPanel.setBorder(IdeBorderFactory.createTitledBorder(CodeInsightBundle.message("reformat.directory.dialog.options"))); myFiltersPanel.setBorder(IdeBorderFactory.createTitledBorder(CodeInsightBundle.message("reformat.directory.dialog.filters"))); myMaskWarningLabel.setIcon(AllIcons.General.Warning); myMaskWarningLabel.setVisible(false); myIncludeSubdirsCb.setVisible(shouldShowIncludeSubdirsCb()); initFileTypeFilter(); initScopeFilter(); restoreCbsStates(); return myWholePanel; }
public ArrangementGroupingRulesControl(@NotNull ArrangementStandardSettingsManager settingsManager, @NotNull ArrangementColorsProvider colorsProvider) { super(new DefaultTableModel(0, 1)); mySettingsManager = settingsManager; setDefaultRenderer(Object.class, new MyRenderer()); getColumnModel().getColumn(0).setCellEditor(new MyEditor()); setShowColumns(false); setShowGrid(false); setBorder(IdeBorderFactory.createBorder()); setSelectionMode(ListSelectionModel.SINGLE_SELECTION); putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); List<CompositeArrangementSettingsToken> groupingTokens = settingsManager.getSupportedGroupingTokens(); if (groupingTokens != null) { for (CompositeArrangementSettingsToken token : groupingTokens) { ArrangementGroupingComponent component = new ArrangementGroupingComponent(token, colorsProvider, settingsManager); myComponents.put(token.getToken(), component); getModel().addRow(new Object[]{component}); } } }
private void init() { setLayout(new GridBagLayout()); add(myRowIndexControl, new GridBag().anchor(GridBagConstraints.CENTER) .insets(0, ArrangementConstants.HORIZONTAL_PADDING, 0, ArrangementConstants.HORIZONTAL_GAP * 2) ); add(myGroupingTypeToken.getUiComponent(), new GridBag().anchor(GridBagConstraints.WEST).insets(0, 0, 0, 2)); if (myOrderTypeToken != null) { add(myOrderTypeToken.getUiComponent(), new GridBag().anchor(GridBagConstraints.WEST)); } add(new JLabel(" "), new GridBag().weightx(1).fillCellHorizontally()); setBackground(UIUtil.getListBackground()); setBorder(IdeBorderFactory.createEmptyBorder(ArrangementConstants.VERTICAL_GAP)); setOpaque(!UIUtil.isUnderIntelliJLaF() && !UIUtil.isUnderNativeMacLookAndFeel() && !UIUtil.isUnderDarcula()); }
private JPanel createOrientationPanel() { JPanel panel = new JPanel(); panel.setBorder(IdeBorderFactory.createTitledBorder(CodeEditorBundle.message("print.orientation.group"), true)); panel.setLayout(new GridBagLayout()); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.gridy = 0; gbConstraints.gridx = 0; gbConstraints.gridwidth = 1; gbConstraints.gridheight = 1; gbConstraints.weightx = 1; gbConstraints.fill = GridBagConstraints.BOTH; myRbPortrait = new JRadioButton(CodeEditorBundle.message("print.orientation.portrait.radio")); panel.add(myRbPortrait, gbConstraints); myRbLandscape = new JRadioButton(CodeEditorBundle.message("print.orientation.landscape.radio")); gbConstraints.gridy++; panel.add(myRbLandscape, gbConstraints); ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(myRbPortrait); buttonGroup.add(myRbLandscape); return panel; }
private JPanel createStylePanel() { JPanel panel = new JPanel(); panel.setBorder(IdeBorderFactory.createTitledBorder(CodeEditorBundle.message("print.style.group"), true)); panel.setLayout(new GridBagLayout()); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.gridy = 0; gbConstraints.gridx = 0; gbConstraints.gridwidth = 1; gbConstraints.gridheight = 1; gbConstraints.weightx = 1; gbConstraints.fill = GridBagConstraints.BOTH; myCbColorPrinting = new JCheckBox(CodeEditorBundle.message("print.style.color.printing.checkbox")); panel.add(myCbColorPrinting, gbConstraints); myCbSyntaxPrinting = new JCheckBox(CodeEditorBundle.message("print.style.syntax.printing.checkbox")); gbConstraints.gridy++; panel.add(myCbSyntaxPrinting, gbConstraints); myCbPrintAsGraphics = new JCheckBox(CodeEditorBundle.message("print.style.print.as.graphics.checkbox")); gbConstraints.gridy++; panel.add(myCbPrintAsGraphics, gbConstraints); return panel; }
private JPanel createWrappingPanel() { JPanel panel = new JPanel(); panel.setBorder(IdeBorderFactory.createTitledBorder(CodeEditorBundle.message("print.wrapping.group"), true)); panel.setLayout(new GridBagLayout()); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.gridy = 0; gbConstraints.gridx = 0; gbConstraints.gridwidth = 1; gbConstraints.gridheight = 1; gbConstraints.weightx = 1; gbConstraints.fill = GridBagConstraints.BOTH; myRbNoWrap = new JRadioButton(CodeEditorBundle.message("print.wrapping.none.radio")); panel.add(myRbNoWrap, gbConstraints); myRbWrapAtWordBreaks = new JRadioButton(CodeEditorBundle.message("print.wrapping.word.breaks.radio")); gbConstraints.gridy++; panel.add(myRbWrapAtWordBreaks, gbConstraints); ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(myRbNoWrap); buttonGroup.add(myRbWrapAtWordBreaks); return panel; }
@Override public void setPropertiesPanel(@Nullable final JPanel panel) { if (panel == null) { if (myDetailPanelWrapper != null) { myDetailPanelWrapper.removeAll(); } myLabel.setText(myEmptyLabel); add(myLabel, BorderLayout.CENTER); } else if (panel != myDetailPanel) { remove(myLabel); if (myDetailPanelWrapper == null) { myDetailPanelWrapper = new JPanel(new GridLayout(1, 1)); myDetailPanelWrapper.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 5)); myDetailPanelWrapper.add(panel); add(myDetailPanelWrapper, BorderLayout.NORTH); } else { myDetailPanelWrapper.removeAll(); myDetailPanelWrapper.add(panel); } } myDetailPanel = panel; revalidate(); repaint(); }
/** * Creates panel and fills its table (see {@link #init(com.intellij.refactoring.classMembers.MemberInfoModel, java.util.Collection)} ) with members info * * @param title Title for panel * @param memberInfo list of members * @param model model */ public PyMemberSelectionPanel(String title, List<PyMemberInfo<PyElement>> memberInfo, final MemberInfoModel<PyElement, PyMemberInfo<PyElement>> model, final boolean supportAbstract) { Border titledBorder = IdeBorderFactory.createTitledBorder(title, false); Border emptyBorder = BorderFactory.createEmptyBorder(0, 5, 5, 5); Border border = BorderFactory.createCompoundBorder(titledBorder, emptyBorder); setBorder(border); setLayout(new BorderLayout()); myTable = new PyMemberSelectionTable(memberInfo, model, supportAbstract); JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable); add(scrollPane, BorderLayout.CENTER); }
public DynamicDialog(PsiElement context, DynamicElementSettings settings, TypeConstraint[] typeConstraints, boolean isTableVisible) { super(context.getProject(), true); myProject = context.getProject(); mySettings = settings; myContext = context; myDynamicManager = DynamicManager.getInstance(myProject); if (isTableVisible) { myTablePane.setBorder(IdeBorderFactory.createTitledBorder(GroovyBundle.message("dynamic.properties.table.name"), false)); } else { myTablePane.setVisible(false); } setTitle(GroovyInspectionBundle.message("dynamic.element")); setUpTypeComboBox(typeConstraints); setUpContainingClassComboBox(); setUpStaticComboBox(); init(); }
public XmlEmmetConfigurable() { myEnableEmmetJBCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { boolean selected = myEnableEmmetJBCheckBox.isSelected(); myEnablePreviewJBCheckBox.setEnabled(selected); myFiltersListPanel.setEnabled(selected); myEnableHrefAutodetectJBCheckBox.setEnabled(selected); for (JBCheckBox checkBox : myFilterCheckboxes.values()) { checkBox.setEnabled(selected); } } }); myFiltersListPanel.setBorder(IdeBorderFactory.createTitledBorder(XmlBundle.message("emmet.filters.enabled.by.default"))); createFiltersCheckboxes(); }
private void createFeedback() { if (myFeedback == null) { FeedbackLayer layer = myContext.getArea().getFeedbackLayer(); myInsertFeedback = new InsertFeedback(DrawingStyle.DROP_ZONE_ACTIVE); layer.add(myInsertFeedback); myBounds = myContainer.getBounds(layer); myFeedback = new GridFeedback(); myFeedback.setBounds(myBounds); layer.add(myFeedback); myTextFeedback = new TextFeedback(); myTextFeedback.setBorder(IdeBorderFactory.createEmptyBorder(0, 3, 2, 0)); layer.add(myTextFeedback); layer.repaint(); } }
public JComponent createOptionsPanel() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); HyperlinkLabel settingsLink = createHyperLink(); panel.setBorder(IdeBorderFactory.createTitledBorder(getDisplayName() + " options")); panel.add(settingsLink); return panel; }
public RunHotswapDialog(Project project, List<DebuggerSession> sessions, boolean displayHangWarning) { super(project); myDisplayHangWarning = displayHangWarning; myPanel = new JPanel(new BorderLayout()); final List<SessionItem> items = new ArrayList<SessionItem>(sessions.size()); for (DebuggerSession session : sessions) { items.add(new SessionItem(session)); } Collections.sort(items, new Comparator<SessionItem>() { public int compare(SessionItem debuggerSession, SessionItem debuggerSession1) { return debuggerSession.getSession().getSessionName().compareTo(debuggerSession1.getSession().getSessionName()); } }); myElementsChooser = new ElementsChooser<SessionItem>(items, true); myPanel.setBorder(IdeBorderFactory.createEmptyBorder(10, 0, 5, 0)); //myElementsChooser.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 0, 0)); if (sessions.size() > 0) { myElementsChooser.selectElements(items.subList(0, 1)); } myPanel.add(myElementsChooser, BorderLayout.CENTER); //myPanel.add(new JLabel("Choose debug sessions to reload classes:"), BorderLayout.NORTH); if(sessions.size() == 1) { setTitle(DebuggerBundle.message("hotswap.dialog.title.with.session", sessions.get(0).getSessionName())); myPanel.setVisible(false); } else { setTitle(DebuggerBundle.message("hotswap.dialog.title")); } setButtonsAlignment(SwingUtilities.CENTER); this.init(); }
@Override public JComponent getComponent(){ if (myComponent == null) { myComponent = createComponent(); final IdeaTitledBorder border = IdeBorderFactory.createTitledBorder(myDescription, false); myComponent.setBorder(border); } return myComponent; }
@Nullable @Override public JComponent createComponent() { myEnabled = new JBCheckBox("Enable EditorConfig support"); final JPanel panel = new JPanel(new VerticalFlowLayout()); panel.setBorder(IdeBorderFactory.createTitledBorder("EditorConfig", false)); panel.add(myEnabled); final JLabel warning = new JLabel("EditorConfig may override the IDE code style settings"); warning.setFont(UIUtil.getLabelFont(UIUtil.FontSize.SMALL)); warning.setBorder(IdeBorderFactory.createEmptyBorder(0, 20, 0, 0)); panel.add(warning); return panel; }
public ConfigurationArgumentsHelpArea() { super(new BorderLayout()); add(myPanel); setBorder(IdeBorderFactory.createEmptyBorder(10, 0, 0, 0)); final DefaultActionGroup group = new DefaultActionGroup(); group.add(new MyCopyAction()); myHelpArea.addMouseListener( new PopupHandler(){ @Override public void invokePopup(final Component comp,final int x,final int y){ ActionManager.getInstance().createActionPopupMenu(ActionPlaces.UNKNOWN, group).getComponent().show(comp, x, y); } } ); FixedSizeButton copyButton = new FixedSizeButton(22); copyButton.setIcon(PlatformIcons.COPY_ICON); copyButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final StringSelection contents = new StringSelection(myHelpArea.getText().trim()); CopyPasteManager.getInstance().setContents(contents); } }); myToolbarPanel.add(copyButton, BorderLayout.NORTH); myToolbarPanel.setVisible(false); }
/** * Creates panel located at the south of the content pane. By default that * panel contains dialog's buttons. This default implementation uses <code>createActions()</code> * and <code>createJButtonForAction(Action)</code> methods to construct the panel. * * @return south panel */ @NotNull private JComponent createSouthPanel() { Action[] actions = createActions(); List<JButton> buttons = new ArrayList<JButton>(); JPanel panel = new JPanel(new BorderLayout()); final JPanel lrButtonsPanel = new JPanel(new GridBagLayout()); final Insets insets = SystemInfo.isMacOSLeopard ? new Insets(0, 0, 0, 0) : new Insets(8, 0, 0, 0); if (actions.length > 0) { int gridX = 0; lrButtonsPanel.add(Box.createHorizontalGlue(), // left strut new GridBagConstraints(gridX++, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0)); if (actions.length > 0) { JPanel buttonsPanel = createButtons(actions, buttons); lrButtonsPanel.add(buttonsPanel, new GridBagConstraints(gridX, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, insets, 0, 0)); } } panel.add(lrButtonsPanel, BorderLayout.CENTER); panel.setBorder(IdeBorderFactory.createEmptyBorder(WizardConstants.STUDIO_WIZARD_INSETS)); return panel; }
@Override protected JPanel createReplaceFieldsWithGettersPanel() { final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>(); myReplaceFieldsCb = new JComboBox(new Integer[]{IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_ALL, IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_INACCESSIBLE, IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE}); myReplaceFieldsCb.setRenderer(new ListCellRendererWrapper<Integer>() { @Override public void customize(JList list, Integer value, int index, boolean selected, boolean hasFocus) { switch (value) { case IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE: setText(UIUtil.removeMnemonic(RefactoringBundle.message("do.not.replace"))); break; case IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_INACCESSIBLE: setText(UIUtil.removeMnemonic(RefactoringBundle.message("replace.fields.inaccessible.in.usage.context"))); break; default: setText(UIUtil.removeMnemonic(RefactoringBundle.message("replace.all.fields"))); } } }); myReplaceFieldsCb.setSelectedItem(JavaRefactoringSettings.getInstance().INTRODUCE_PARAMETER_REPLACE_FIELDS_WITH_GETTERS); KeyboardComboSwitcher.setupActions(myReplaceFieldsCb, myProject); component.setComponent(myReplaceFieldsCb); component.setText(RefactoringBundle.message("replace.fields.used.in.expressions.with.their.getters")); component.getLabel().setDisplayedMnemonic('u'); component.setLabelLocation(BorderLayout.NORTH); component.setBorder(IdeBorderFactory.createEmptyBorder(3, 3, 2, 2)); return component; }
public void updateStep() { fileChooser.clear(); for (T element : getContext().getList()) { boolean isEnabled = isElementEnabled(element); fileChooser.addElement(element, isEnabled && getContext().isMarked(element)); if (!isEnabled) { fileChooser.disableElement(element); } } fileChooser.setBorder(IdeBorderFactory.createTitledBorder( IdeBundle.message("project.import.select.title", getContext().getName()), false)); openModuleSettingsCheckBox.setSelected(getBuilder().isOpenProjectSettingsAfter()); }
private static JScrollPane wrapInScrollPane(JPanel panel) { JPanel wrapper = new JPanel(new BorderLayout()); wrapper.add(panel); wrapper.setBorder(IdeBorderFactory.createEmptyBorder(5)); return ScrollPaneFactory.createScrollPane(wrapper, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); }
@Override protected String addStepComponent(Component component) { if (component instanceof JComponent) { ((JComponent)component).setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 0, 0)); } return super.addStepComponent(component); }
public StatusPanel() { super(new BorderLayout()); myTextLabel = new JLabel(""); myTextLabel.setVisible(false); myBusySpinner = new AsyncProcessIcon("StatusPanelSpinner"); myBusySpinner.setVisible(false); add(myTextLabel, BorderLayout.CENTER); add(myBusySpinner, BorderLayout.WEST); setBorder(IdeBorderFactory.createEmptyBorder(0, 4, 0, 4)); }
private void addUiForGroup(@NotNull GradleEditorEntityGroup group) { JBPanel panel = new JBPanel(new BorderLayout()); panel.setBackground(UIUtil.getTableBackground()); panel.setBorder(IdeBorderFactory.createTitledBorder(group.getName())); GradleEditorEntityTable table = new GradleEditorEntityTable(myProject); for (GradleEditorEntity entity : group.getEntities()) { table.getModel().add(entity); } panel.add(table); addUiForGroup(group.getName(), panel, table); }