Changeset 14052 in josm for trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
- Timestamp:
- 2018-07-26T22:01:31+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
r13842 r14052 7 7 import java.awt.BorderLayout; 8 8 import java.awt.Component; 9 import java.awt.GraphicsEnvironment;10 9 import java.awt.GridBagConstraints; 11 10 import java.awt.GridBagLayout; … … 159 158 } 160 159 sb.append("</html>"); 161 if (!GraphicsEnvironment.isHeadless()) { 162 GuiHelper.runInEDTAndWait(() -> HelpAwareOptionPane.showOptionDialog( 163 parent, 164 sb.toString(), 165 tr("Update plugins"), 166 !failed.isEmpty() ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE, 167 HelpUtil.ht("/Preferences/Plugins") 168 )); 169 } 160 GuiHelper.runInEDTAndWait(() -> HelpAwareOptionPane.showOptionDialog( 161 parent, 162 sb.toString(), 163 tr("Update plugins"), 164 !failed.isEmpty() ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE, 165 HelpUtil.ht("/Preferences/Plugins") 166 )); 170 167 } 171 168 … … 212 209 } 213 210 211 private static Component addButton(JPanel pnl, JButton button, String buttonName) { 212 button.setName(buttonName); 213 return pnl.add(button); 214 } 215 214 216 private JPanel buildActionPanel() { 215 217 JPanel pnl = new JPanel(new GridLayout(1, 4)); 216 218 217 pnl.add(new JButton(new DownloadAvailablePluginsAction())); 218 pnl.add(new JButton(new UpdateSelectedPluginsAction())); 219 ExpertToggleAction.addVisibilitySwitcher(pnl.add(new JButton(new SelectByListAction()))); 220 ExpertToggleAction.addVisibilitySwitcher(pnl.add(new JButton(new ConfigureSitesAction()))); 219 // assign some component names to these as we go to aid testing 220 addButton(pnl, new JButton(new DownloadAvailablePluginsAction()), "downloadListButton"); 221 addButton(pnl, new JButton(new UpdateSelectedPluginsAction()), "updatePluginsButton"); 222 ExpertToggleAction.addVisibilitySwitcher(addButton(pnl, new JButton(new SelectByListAction()), "loadFromListButton")); 223 ExpertToggleAction.addVisibilitySwitcher(addButton(pnl, new JButton(new ConfigureSitesAction()), "configureSitesButton")); 221 224 return pnl; 222 225 }
Note:
See TracChangeset
for help on using the changeset viewer.
