List of usage examples for javax.swing DefaultComboBoxModel DefaultComboBoxModel
public DefaultComboBoxModel()
From source file:gtu._work.ui.RegexTestUI.java
private void jText1OrJArea1Change(DocumentEvent doc) { try {/*from w w w .ja va 2 s . c o m*/ String complie1 = regexText.getText(); String complie2 = regexText0.getText(); String complie = complie1; if (StringUtils.isBlank(complie1)) { complie = complie2; } String matcherStr = srcArea.getText(); if (StringUtils.isBlank(complie)) { setTitle("Regex"); return; } if (StringUtils.isBlank(matcherStr)) { setTitle("content"); return; } Pattern pattern = Pattern.compile(complie); Matcher matcher = pattern.matcher(matcherStr); DefaultComboBoxModel model1 = new DefaultComboBoxModel(); groupList.setModel(model1); while (matcher.find()) { model1.addElement("---------------------"); for (int ii = 0; ii <= matcher.groupCount(); ii++) { model1.addElement(ii + " : [" + matcher.group(ii) + "]"); } } DefaultComboBoxModel model2 = new DefaultComboBoxModel(); scannerList.setModel(model2); Scanner scanner = new Scanner(matcherStr); scanner.useDelimiter(pattern); while (scanner.hasNext()) { model2.addElement("[" + scanner.next() + "]"); } scanner.close(); this.setTitle("?"); } catch (Exception ex) { this.setTitle(ex.getMessage()); ex.printStackTrace(); } }
From source file:org.pentaho.reporting.designer.extensions.legacycharts.LegacyChartEditModel.java
public LegacyChartEditModel() { propertyChangeSupport = new PropertyChangeSupport(this); chartExpressionsModel = new DefaultComboBoxModel(); chartExpressionsModel.addListDataListener(new ChartExpressionTypeSelectionHandler()); primaryDataSourcesModel = new DefaultComboBoxModel(); primaryDataSourcesModel.addListDataListener(new PrimaryDataSourceSelectionHandler()); secondaryDataSourcesModel = new DefaultComboBoxModel(); secondaryDataSourcesModel.addListDataListener(new SecondaryDataSourceSelectionHandler()); populateExpressionSelectorModel(chartExpressionsModel, JFreeChart.class); }
From source file:ch.zhaw.simulation.diagram.charteditor.DefaultPlotEditor.java
/** * Standard constructor - constructs a panel for editing the properties of * the specified plot.//w ww . ja va2 s . c o m * <P> * In designing the panel, we need to be aware that subclasses of Plot will * need to implement subclasses of PlotPropertyEditPanel - so we need to * leave one or two 'slots' where the subclasses can extend the user * interface. * * @param plot * the plot, which should be changed. */ public DefaultPlotEditor(Plot plot) { this.plotInsets = plot.getInsets(); this.backgroundPaintSample = new PaintSample(plot.getBackgroundPaint()); this.outlineStrokeSample = new StrokeSample(plot.getOutlineStroke()); this.outlinePaintSample = new PaintSample(plot.getOutlinePaint()); // Disabled because makes no sense for us // if (plot instanceof CategoryPlot) { // this.plotOrientation = ((CategoryPlot) plot).getOrientation(); // } else if (plot instanceof XYPlot) { // this.plotOrientation = ((XYPlot) plot).getOrientation(); // } if (plot instanceof CategoryPlot) { CategoryItemRenderer renderer = ((CategoryPlot) plot).getRenderer(); if (renderer instanceof LineAndShapeRenderer) { LineAndShapeRenderer r = (LineAndShapeRenderer) renderer; this.drawLines = BooleanUtilities.valueOf(r.getBaseLinesVisible()); this.drawShapes = BooleanUtilities.valueOf(r.getBaseShapesVisible()); } } else if (plot instanceof XYPlot) { XYItemRenderer renderer = ((XYPlot) plot).getRenderer(); if (renderer instanceof StandardXYItemRenderer) { StandardXYItemRenderer r = (StandardXYItemRenderer) renderer; this.drawLines = BooleanUtilities.valueOf(r.getPlotLines()); this.drawShapes = BooleanUtilities.valueOf(r.getBaseShapesVisible()); } } setLayout(new BorderLayout()); this.availableStrokeSamples = new StrokeSample[4]; this.availableStrokeSamples[0] = new StrokeSample(null); this.availableStrokeSamples[1] = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples[2] = new StrokeSample(new BasicStroke(2.0f)); this.availableStrokeSamples[3] = new StrokeSample(new BasicStroke(3.0f)); // create a panel for the settings... JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), plot.getPlotType() + localizationResources.getString(":"))); JPanel general = new JPanel(new BorderLayout()); general.setBorder(BorderFactory.createTitledBorder(localizationResources.getString("General"))); JPanel interior = new JPanel(new LCBLayout(7)); interior.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); interior.add(new JLabel(localizationResources.getString("Outline_stroke"))); DefaultComboBoxModel model = new DefaultComboBoxModel(); for (StrokeSample s : this.availableStrokeSamples) { model.addElement(s.getStroke()); } this.cbOutlineStroke = new JComboBox(model); this.cbOutlineStroke.setSelectedItem(this.outlineStrokeSample.getStroke()); this.cbOutlineStroke.setRenderer(new StrokeComboboxRenderer()); interior.add(this.cbOutlineStroke); interior.add(new JLabel()); interior.add(new JLabel(localizationResources.getString("Outline_Paint"))); JButton button = new JButton(localizationResources.getString("Select...")); button.setActionCommand("OutlinePaint"); button.addActionListener(this); interior.add(this.outlinePaintSample); interior.add(button); interior.add(new JLabel(localizationResources.getString("Background_paint"))); button = new JButton(localizationResources.getString("Select...")); button.setActionCommand("BackgroundPaint"); button.addActionListener(this); interior.add(this.backgroundPaintSample); interior.add(button); // Disabled because makes no sense for us // if (this.plotOrientation != null) { // boolean isVertical = // this.plotOrientation.equals(PlotOrientation.VERTICAL); // int index = isVertical ? ORIENTATION_VERTICAL : // ORIENTATION_HORIZONTAL; // interior.add(new // JLabel(localizationResources.getString("Orientation"))); // this.orientationCombo = new JComboBox(orientationNames); // this.orientationCombo.setSelectedIndex(index); // this.orientationCombo.setActionCommand("Orientation"); // this.orientationCombo.addActionListener(this); // interior.add(this.orientationCombo); // interior.add(new JPanel()); // } if (this.drawLines != null) { interior.add(new JLabel(localizationResources.getString("Draw_lines"))); this.drawLinesCheckBox = new JCheckBox(); this.drawLinesCheckBox.setSelected(this.drawLines.booleanValue()); this.drawLinesCheckBox.setActionCommand("DrawLines"); this.drawLinesCheckBox.addActionListener(this); interior.add(new JPanel()); interior.add(this.drawLinesCheckBox); } if (this.drawShapes != null) { interior.add(new JLabel(localizationResources.getString("Draw_shapes"))); this.drawShapesCheckBox = new JCheckBox(); this.drawShapesCheckBox.setSelected(this.drawShapes.booleanValue()); this.drawShapesCheckBox.setActionCommand("DrawShapes"); this.drawShapesCheckBox.addActionListener(this); interior.add(new JPanel()); interior.add(this.drawShapesCheckBox); } general.add(interior, BorderLayout.NORTH); JPanel appearance = new JPanel(new BorderLayout()); appearance.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); appearance.add(general, BorderLayout.NORTH); JTabbedPane tabs = new JTabbedPane(); tabs.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); Axis domainAxis = null; if (plot instanceof CategoryPlot) { domainAxis = ((CategoryPlot) plot).getDomainAxis(); } else if (plot instanceof XYPlot) { domainAxis = ((XYPlot) plot).getDomainAxis(); } this.domainAxisPropertyPanel = DefaultAxisEditor.getInstance(domainAxis); if (this.domainAxisPropertyPanel != null) { this.domainAxisPropertyPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); tabs.add(localizationResources.getString("Domain_Axis"), this.domainAxisPropertyPanel); } Axis rangeAxis = null; if (plot instanceof CategoryPlot) { rangeAxis = ((CategoryPlot) plot).getRangeAxis(); } else if (plot instanceof XYPlot) { rangeAxis = ((XYPlot) plot).getRangeAxis(); } this.rangeAxisPropertyPanel = DefaultAxisEditor.getInstance(rangeAxis); if (this.rangeAxisPropertyPanel != null) { this.rangeAxisPropertyPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); tabs.add(localizationResources.getString("Range_Axis"), this.rangeAxisPropertyPanel); } tabs.add(localizationResources.getString("Appearance"), appearance); panel.add(tabs); add(panel); }
From source file:com.rapidminer.gui.new_plotter.gui.ColorSchemeDialog.java
/** * @param key/*from w w w . j a v a 2s. c o m*/ * @param arguments */ public ColorSchemeDialog(Component actionComp, String key, PlotConfiguration plotConfig, Object... arguments) { super(actionComp != null ? SwingUtilities.getWindowAncestor(actionComp) : null, key, ModalityType.APPLICATION_MODAL, arguments); this.plotConfig = plotConfig; initializing = true; nominalColorListModel = new DefaultListModel<Color>(); gradientStartColorComboBoxModel = new DefaultComboBoxModel<Color>(); gradientEndColorComboBoxModel = new DefaultComboBoxModel<Color>(); colorSchemeComboBoxModel = new DefaultComboBoxModel<Object>(); this.setResizable(false); createPreviewPlotBackend(new JPanel().getBackground(), plotConfig.getActiveColorScheme().getColors().size()); createComponents(); save(plotConfig.getColorSchemes(), plotConfig.getActiveColorScheme().getName()); initializing = false; adaptPreviewPlots(); setLocationRelativeTo(actionComp); }
From source file:com.rapidminer.gui.new_plotter.gui.GlobalConfigurationPanel.java
private void createComponents() { // create panel for global configuration {/* w w w .j a v a2 s . co m*/ // add title label JLabel titleLabel = new ResourceLabel("plotter.configuration_dialog.chart_title"); String title = getPlotConfiguration().getTitleText(); if (title == null) { title = ""; } titleTextField = new JTextField(title); titleLabel.setLabelFor(titleTextField); titleTextField.addKeyListener(new KeyListener() { @Override public void keyTyped(KeyEvent e) { return; } @Override public void keyReleased(KeyEvent e) { String newTitle = titleTextField.getText(); String titleText = getCurrentPlotInstance().getMasterPlotConfiguration().getTitleText(); if (titleText != null) { if (!titleText.equals(newTitle) || titleText == null && newTitle.length() > 0) { if (newTitle.length() > 0) { getPlotConfiguration().setTitleText(newTitle); } else { getPlotConfiguration().setTitleText(null); } } } else { if (newTitle.length() > 0) { getPlotConfiguration().setTitleText(newTitle); } else { getPlotConfiguration().setTitleText(null); } } if (newTitle.equals("Iris") && SwingTools.isControlOrMetaDown(e) && e.getKeyCode() == KeyEvent.VK_D) { startAnimation(); } } @Override public void keyPressed(KeyEvent e) { return; } }); titleTextField.setPreferredSize(new Dimension(115, 23)); titleConfigButton = new JToggleButton(new PopupAction(true, "plotter.configuration_dialog.open_popup", chartTitleConfigurationContainer, PopupPosition.HORIZONTAL)); addThreeComponentRow(this, titleLabel, titleTextField, titleConfigButton); } // add orientation check box { JLabel plotOrientationLabel = new ResourceLabel( "plotter.configuration_dialog.global_config_panel.plot_orientation"); PlotOrientation[] orientations = { PlotOrientation.HORIZONTAL, PlotOrientation.VERTICAL }; plotOrientationComboBox = new JComboBox(orientations); plotOrientationLabel.setLabelFor(plotOrientationComboBox); plotOrientationComboBox.setRenderer(new EnumComboBoxCellRenderer("plotter")); plotOrientationComboBox.setSelectedIndex(0); plotOrientationComboBox.addPopupMenuListener(new PopupMenuListener() { @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { return; } @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { getPlotConfiguration() .setOrientation((PlotOrientation) plotOrientationComboBox.getSelectedItem()); } @Override public void popupMenuCanceled(PopupMenuEvent e) { return; } }); addTwoComponentRow(this, plotOrientationLabel, plotOrientationComboBox); } // add legend popup button { JLabel legendStyleConfigureLabel = new ResourceLabel( "plotter.configuration_dialog.global_config_panel.legend_style"); JToggleButton legendStyleConfigButton = new JToggleButton( new PopupAction(true, "plotter.configuration_dialog.open_popup", legendConfigContainer, PopupAction.PopupPosition.HORIZONTAL)); legendStyleConfigureLabel.setLabelFor(legendStyleConfigButton); addTwoComponentRow(this, legendStyleConfigureLabel, legendStyleConfigButton); } // add legend popup button { JLabel axisStyleConfigureLabel = new ResourceLabel( "plotter.configuration_dialog.global_config_panel.axis_style"); JToggleButton axisStyleConfigureButton = new JToggleButton( new PopupAction(true, "plotter.configuration_dialog.open_popup", axisConfigurationContainer, PopupAction.PopupPosition.HORIZONTAL)); axisStyleConfigureLabel.setLabelFor(axisStyleConfigureButton); addTwoComponentRow(this, axisStyleConfigureLabel, axisStyleConfigureButton); } // add color scheme dialog button { JLabel colorConfigureLabel = new ResourceLabel( "plotter.configuration_dialog.global_config_panel.color_scheme"); colorsSchemesComboBoxModel = new DefaultComboBoxModel(); colorSchemesComboBox = new JComboBox(colorsSchemesComboBoxModel); colorConfigureLabel.setLabelFor(colorSchemesComboBox); colorSchemesComboBox.setRenderer(new ColorSchemeComboBoxRenderer()); colorSchemesComboBox.addPopupMenuListener(new PopupMenuListener() { @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { return; } @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { ColorScheme colorScheme = (ColorScheme) colorSchemesComboBox.getSelectedItem(); if (colorScheme != null) { getPlotConfiguration().setActiveColorScheme(colorScheme.getName()); } } @Override public void popupMenuCanceled(PopupMenuEvent e) { return; } }); JButton colorConfigButton = new JButton( new ResourceAction(true, "plotter.configuration_dialog.open_color_scheme_dialog") { private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { createColorSchemeDialog(); } }); addThreeComponentRow(this, colorConfigureLabel, colorSchemesComboBox, colorConfigButton); } // add plot background color { plotBackGroundColorLabel = new ResourceLabel( "plotter.configuration_dialog.global_config_panel.select_plot_background_color"); plotBackgroundColorChooserButton = new JButton( new ResourceAction(true, "plotter.configuration_dialog.select_plot_color") { private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { createPlotBackgroundColorDialog(); } }); plotBackGroundColorLabel.setLabelFor(plotBackgroundColorChooserButton); addTwoComponentRow(this, plotBackGroundColorLabel, plotBackgroundColorChooserButton); } // add chart background color { frameBackGroundColorLabel = new ResourceLabel( "plotter.configuration_dialog.global_config_panel.select_frame_background_color"); frameBackgroundColorChooserButton = new JButton( new ResourceAction(true, "plotter.configuration_dialog.select_frame_color") { private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { createFrameBackgroundColorDialog(); } }); frameBackGroundColorLabel.setLabelFor(frameBackgroundColorChooserButton); addTwoComponentRow(this, frameBackGroundColorLabel, frameBackgroundColorChooserButton); // GridBagConstraints itemConstraint = new GridBagConstraints(); // itemConstraint.gridwidth = GridBagConstraints.REMAINDER; // itemConstraint.weightx = 1.0; // this.add(frameBackgroundColorChooserButton, itemConstraint); } // add spacer panel { JPanel spacerPanel = new JPanel(); GridBagConstraints itemConstraint = new GridBagConstraints(); itemConstraint.fill = GridBagConstraints.BOTH; itemConstraint.weightx = 1; itemConstraint.weighty = 1; itemConstraint.gridwidth = GridBagConstraints.REMAINDER; this.add(spacerPanel, itemConstraint); } }
From source file:de.naoth.xabsleditor.graphpanel.AgentVisualizer.java
private void recreateAgentSelector(XABSLContext context) { DefaultComboBoxModel model = new DefaultComboBoxModel(); model.addElement("(all)"); for (String agent : context.getAgentMap().keySet()) { model.addElement(agent);/*from ww w .j ava 2s . c o m*/ } cbAgentSelector.setModel(model); if (lastSelectedAgentName != null) { model.setSelectedItem(lastSelectedAgentName); } }
From source file:be.nbb.demetra.dfm.output.simulation.RMSEGraphView.java
private void updateComboBox() { filterPanel = null;/*from ww w . j a va 2 s. c om*/ if (dfmSimulation.isPresent()) { comboBox.setModel(toComboBoxModel(dfmSimulation.get().getDescriptions())); comboBox.setEnabled(true); } else { comboBox.setModel(new DefaultComboBoxModel()); comboBox.setEnabled(false); } }
From source file:br.upe.ecomp.dosa.view.mainwindow.MainWindowActions.java
private void initResultsTab() { chartTypeComboBox.setModel(new DefaultComboBoxModel()); chartTypeComboBox.addItem("Boxplot"); chartTypeComboBox.addItem("Line"); chartTypeComboBox.addActionListener(new ActionListener() { @Override/*from w w w.j a v a 2s. c o m*/ public void actionPerformed(ActionEvent arg0) { if (chartTypeComboBox.getSelectedIndex() == 0) { ((CardLayout) chartPanel.getLayout()).first(chartPanel); } else { ((CardLayout) chartPanel.getLayout()).last(chartPanel); } } }); ((CardLayout) chartPanel.getLayout()).first(chartPanel); resultsAnalyzer = new FileResultsAnalyzer(); // rtManager = new FileBoxplotChartManager(); // chartManager = new FileLineChartManager(); measurementResultComboBox.setEnabled(false); // createBoxplotChartButton.setEnabled(false); resultsSplitPane.setRightComponent(new Panel()); // stepResultTextField.addKeyListener(new TextFieldKeyListener()); }
From source file:au.org.ala.delta.intkey.ui.TaxonInformationDialog.java
private void initialize() { // fill combobox with taxa names DefaultComboBoxModel comboModel = new DefaultComboBoxModel(); for (Item taxon : _taxa) { String formattedItemName = _itemFormatter.formatItemDescription(taxon); formattedItemName = formattedItemName.replace("<", ""); formattedItemName = formattedItemName.replace(">", ""); comboModel.addElement(formattedItemName); }/*from w w w .jav a 2 s . c om*/ _comboBox.setModel(comboModel); displayTaxon(0); }
From source file:gtu._work.ui.DirectoryCompareUI.java
private void initGUI() { try {/* www. jav a 2 s . c om*/ BorderLayout thisLayout = new BorderLayout(); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); getContentPane().setLayout(thisLayout); { jTabbedPane1 = new JTabbedPane(); getContentPane().add(jTabbedPane1, BorderLayout.CENTER); { jPanel1 = new JPanel(); BorderLayout jPanel1Layout = new BorderLayout(); jPanel1.setLayout(jPanel1Layout); jTabbedPane1.addTab("jPanel1", null, jPanel1, null); { jPanel2 = new JPanel(); BoxLayout jPanel2Layout = new BoxLayout(jPanel2, javax.swing.BoxLayout.X_AXIS); jPanel2.setLayout(jPanel2Layout); jPanel1.add(jPanel2, BorderLayout.NORTH); jPanel2.setPreferredSize(new java.awt.Dimension(660, 36)); { leftDirText = new JTextArea(); leftDirText.setPreferredSize(leftDirText.getPreferredSize()); leftDirText.setBorder(new LineBorder(new java.awt.Color(0, 0, 0), 1, false)); JCommonUtil.jTextFieldSetFilePathMouseEvent(leftDirText, true); leftDirText.getDocument() .addDocumentListener(JCommonUtil.getDocumentListener(new HandleDocumentEvent() { @Override public void process(DocumentEvent event) { } })); jPanel2.add(leftDirText); JTextFieldUtil.setupDragDropFilePath(leftDirText, null); } { rightDirText = new JTextArea(); rightDirText.setPreferredSize(rightDirText.getPreferredSize()); rightDirText.setBorder(new LineBorder(new java.awt.Color(0, 0, 0), 1, false)); JCommonUtil.jTextFieldSetFilePathMouseEvent(rightDirText, true); rightDirText.getDocument() .addDocumentListener(JCommonUtil.getDocumentListener(new HandleDocumentEvent() { @Override public void process(DocumentEvent event) { } })); jPanel2.add(rightDirText); JTextFieldUtil.setupDragDropFilePath(rightDirText, null); } { executeBtn = new JButton(); jPanel2.add(executeBtn); jPanel2.add(getResetBtn()); executeBtn.setText("\u958b\u59cb\u6bd4\u5c0d"); executeBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { compareStart(); } }); } } { jScrollPane1 = new JScrollPane(); jPanel1.add(jScrollPane1, BorderLayout.CENTER); jScrollPane1.setPreferredSize(new java.awt.Dimension(660, 362)); { dirCompareTable = new JTable(); // JTableUtil.defaultSetting(dirCompareTable); JTableUtil.defaultSetting_AutoResize(dirCompareTable); jScrollPane1.setViewportView(dirCompareTable); dirCompareTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { dirCompareTableMouseClicked(evt); } }); dirCompareTable.setModel(getDefaultTableModel()); } } { jPanel3 = new JPanel(); FlowLayout jPanel3Layout = new FlowLayout(); jPanel3Layout.setAlignOnBaseline(true); jPanel1.add(jPanel3, BorderLayout.SOUTH); jPanel3.setLayout(jPanel3Layout); jPanel3.setPreferredSize(new java.awt.Dimension(843, 62)); { jLabel1 = new JLabel(); jPanel3.add(jLabel1); jLabel1.setText("\u526f\u6a94\u540d"); } { DefaultComboBoxModel extensionNameComboBoxModel = new DefaultComboBoxModel(); extensionNameComboBox = new JComboBox(); jPanel3.add(extensionNameComboBox); jPanel3.add(getDiffToolComboBox()); jPanel3.add(getJLabel2()); jPanel3.add(getSearchText()); jPanel3.add(getCompareStyleComboBox()); jPanel3.add(getResetQueryBtn()); addDiffMergeChkBox(); extensionNameComboBox.setModel(extensionNameComboBoxModel); { panel = new JPanel(); jTabbedPane1.addTab("New tab", null, panel, null); panel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow"), }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, })); { lblCustomCommand = new JLabel("custom command"); panel.add(lblCustomCommand, "2, 2, right, default"); } { customCompareText = new JTextField(); customCompareText.setText( "\"C:\\Program Files\\TortoiseGit\\bin\\TortoiseGitMerge.exe\" /base:\"%s\" /theirs:\"%s\""); panel.add(customCompareText, "4, 2, fill, default"); customCompareText.setColumns(10); } { configSaveBtn = new JButton(""); configSaveBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { boolean configChange = false; String customCompareUrl = customCompareText.getText(); if (StringUtils.isNotBlank(customCompareUrl)) { configBean.getConfigProp().setProperty(CUSTOM_COMPARE_URL_KEY, customCompareUrl); configChange = true; } if (configChange) { configBean.store(); JCommonUtil._jOptionPane_showMessageDialog_info( "?!"); } } catch (Exception ex) { JCommonUtil.handleException(ex); } } }); panel.add(configSaveBtn, "2, 36"); } } extensionNameComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { totalScanFiles(null); } }); } } } } pack(); this.setSize(864, 563); JCommonUtil.setJFrameIcon(getOwner(), "images/ico/file_merge.ico"); initConfigBean(); } catch (Exception e) { e.printStackTrace(); } }