private boolean select(CvsRootConfiguration cvs2Configuration) { if (mySelection != null) { if (!myCvs2SettingsEditPanel.saveTo(mySelection, true)) { return false; } } mySelection = cvs2Configuration; editSelectedConfiguration(); return true; }
public CvsConfigurationsListEditor(List<CvsRootConfiguration> configs, Project project) { super(true); myCvs2SettingsEditPanel = new Cvs2SettingsEditPanel(project); setTitle(CvsBundle.message("operation.name.edit.configurations")); myList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); selectNone(); fillModel(configs); myCvs2SettingsEditPanel.addCvsRootChangeListener( new CvsRootChangeListener() { public void onCvsRootChanged() { if (mySelection == null) return; myCvs2SettingsEditPanel.saveTo(mySelection, false); myList.repaint(); } }); setTitle(CvsBundle.message("dialog.title.cvs.roots")); if (!configs.isEmpty()) { myList.setSelectedIndex(0); } init(); }
private void setReadOnly() { myIsReadOnly = true; myList.setEnabled(false); myCvs2SettingsEditPanel.setReadOnly(); }
public JComponent getPreferredFocusedComponent() { if (myModel.isEmpty()) return null; return myCvs2SettingsEditPanel.getPreferredFocusedComponent(); }
private void selectNone() { myCvs2SettingsEditPanel.disable(); mySelection = null; }
private void editConfiguration(CvsRootConfiguration newConfig) { myCvs2SettingsEditPanel.updateFrom(newConfig); }
private boolean saveSelectedConfiguration() { if (getSelectedConfiguration() == null) return true; return myCvs2SettingsEditPanel.saveTo(getSelectedConfiguration(), true); }
private JComponent createCvsConfigurationPanel() { return myCvs2SettingsEditPanel.getPanel(); }