X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix_swing%2Fgui%2Futils%2FUiHelper.java;h=08a65b0710b76e0cca1d2aaa7ceabbad89d2fbf0;hb=30c4d6ed834b52aa4ce4b252295c41b63375ecba;hp=3318bcc2464e23bcba5342892161c4daf248a1fa;hpb=59253323f07e6a67ef6c8e197fd1065a81c7069a;p=fanfix.git diff --git a/src/be/nikiroo/fanfix_swing/gui/utils/UiHelper.java b/src/be/nikiroo/fanfix_swing/gui/utils/UiHelper.java index 3318bcc..08a65b0 100644 --- a/src/be/nikiroo/fanfix_swing/gui/utils/UiHelper.java +++ b/src/be/nikiroo/fanfix_swing/gui/utils/UiHelper.java @@ -7,6 +7,7 @@ import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.JScrollPane; +import javax.swing.JTree; import javax.swing.SwingUtilities; import be.nikiroo.fanfix.Instance; @@ -39,19 +40,25 @@ public class UiHelper { static public JComponent scroll(JComponent pane) { JScrollPane scroll = new JScrollPane(pane); scroll.getVerticalScrollBar().setUnitIncrement(16); - scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); + scroll.setHorizontalScrollBarPolicy( + JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); return scroll; } /** * Display an error message and log the linked {@link Exception}. * - * @param owner the owner of the error (to link the messagebox to it) - * @param message the message - * @param title the title of the error message - * @param e the exception to log if any + * @param owner + * the owner of the error (to link the messagebox to it) + * @param message + * the message + * @param title + * the title of the error message + * @param e + * the exception to log if any */ - static public void error(final Component owner, final String message, final String title, Exception e) { + static public void error(final Component owner, final String message, + final String title, Exception e) { Instance.getInstance().getTraceHandler().error(title + ": " + message); if (e != null) { Instance.getInstance().getTraceHandler().error(e); @@ -60,7 +67,8 @@ public class UiHelper { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - JOptionPane.showMessageDialog(owner, message, title, JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(owner, message, title, + JOptionPane.ERROR_MESSAGE); } }); }