1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* updated miglayout, nekohtml, args4j and junit

* fixed layout issues that came with the new miglayout
This commit is contained in:
Reinhard Pointner 2009-03-13 14:22:36 +00:00
parent 10a7fd5b4c
commit bfe459b50c
12 changed files with 19 additions and 16 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -38,7 +38,7 @@ import ca.odell.glazedlists.swing.AutoCompleteSupport;
public abstract class AbstractSearchPanel<S, E> extends FileBotPanel { public abstract class AbstractSearchPanel<S, E> extends FileBotPanel {
protected final JPanel tabbedPaneGroup = new JPanel(new MigLayout("nogrid, fill, insets 0")); protected final JPanel tabbedPaneGroup = new JPanel(new MigLayout("nogrid, fill, insets 0", "align center", "[fill]8px[pref!]4px"));
protected final JTabbedPane tabbedPane = new JTabbedPane(); protected final JTabbedPane tabbedPane = new JTabbedPane();
@ -60,11 +60,12 @@ public abstract class AbstractSearchPanel<S, E> extends FileBotPanel {
tabbedPane.addTab("History", ResourceManager.getIcon("tab.history"), historyScrollPane); tabbedPane.addTab("History", ResourceManager.getIcon("tab.history"), historyScrollPane);
tabbedPaneGroup.setBorder(BorderFactory.createTitledBorder("Search Results")); tabbedPaneGroup.setBorder(BorderFactory.createTitledBorder("Search Results"));
tabbedPaneGroup.add(tabbedPane, "grow, wrap 8px"); tabbedPaneGroup.add(tabbedPane, "grow, wrap");
setLayout(new MigLayout("nogrid, fill, insets 10px 10px 15px 10px")); setLayout(new MigLayout("nogrid, fill, insets 10px 10px 15px 10px", "align center", "[pref!]10px[fill]"));
add(searchTextField, "alignx center, gapafter indent");
add(new JButton(searchAction), "gap 18px, wrap 10px"); add(searchTextField, "gapafter indent");
add(new JButton(searchAction), "gap 18px, wrap");
add(tabbedPaneGroup, "grow"); add(tabbedPaneGroup, "grow");
searchTextField.getEditor().setAction(searchAction); searchTextField.getEditor().setAction(searchAction);

View File

@ -153,11 +153,10 @@ public class FileTree extends JTree {
} }
@SuppressWarnings("unchecked")
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
try { try {
for (File file : (Collection<File>) getValue("files")) { for (Object file : (Collection<?>) getValue("files")) {
Desktop.getDesktop().open(file); Desktop.getDesktop().open((File) file);
} }
} catch (Exception e) { } catch (Exception e) {
Logger.getLogger("ui").log(Level.WARNING, ExceptionUtilities.getRootCauseMessage(e), e); Logger.getLogger("ui").log(Level.WARNING, ExceptionUtilities.getRootCauseMessage(e), e);

View File

@ -35,7 +35,7 @@ class FileTreePanel extends JComponent {
setBorder(BorderFactory.createTitledBorder("File Tree")); setBorder(BorderFactory.createTitledBorder("File Tree"));
setLayout(new MigLayout("insets 0, nogrid, fill", "align center")); setLayout(new MigLayout("insets 0, nogrid, fill", "align center", "[fill][pref!]"));
add(new LoadingOverlayPane(new JScrollPane(fileTree), this), "grow, wrap 1.2mm"); add(new LoadingOverlayPane(new JScrollPane(fileTree), this), "grow, wrap 1.2mm");
add(new JButton(loadAction)); add(new JButton(loadAction));
add(new JButton(clearAction), "gap 1.2mm, wrap 1.2mm"); add(new JButton(clearAction), "gap 1.2mm, wrap 1.2mm");

View File

@ -43,7 +43,7 @@ public class SplitTool extends Tool<TreeModel> implements ChangeListener {
JSpinner spinner = new JSpinner(spinnerModel); JSpinner spinner = new JSpinner(spinnerModel);
spinner.setEditor(new JSpinner.NumberEditor(spinner, "#")); spinner.setEditor(new JSpinner.NumberEditor(spinner, "#"));
setLayout(new MigLayout("insets 0, nogrid, fill", "align center")); setLayout(new MigLayout("insets 0, nogrid, fill", "align center", "[fill][pref!]"));
add(treeScrollPane, "grow, wrap"); add(treeScrollPane, "grow, wrap");

View File

@ -63,7 +63,7 @@ public class EpisodeListPanel extends AbstractSearchPanel<EpisodeListClient, Epi
// add after text field // add after text field
add(seasonSpinner, 1); add(seasonSpinner, 1);
// add after tabbed pane // add after tabbed pane
tabbedPaneGroup.add(new JButton(new SaveAction(new SelectedTabExportHandler())), "align center, wrap 5px"); tabbedPaneGroup.add(new JButton(new SaveAction(new SelectedTabExportHandler())));
searchTextField.getSelectButton().addPropertyChangeListener(SelectButton.SELECTED_VALUE, selectButtonListener); searchTextField.getSelectButton().addPropertyChangeListener(SelectButton.SELECTED_VALUE, selectButtonListener);

View File

@ -68,7 +68,7 @@ public class ListPanel extends FileBotPanel {
fromSpinner.setEditor(new NumberEditor(fromSpinner, "#")); fromSpinner.setEditor(new NumberEditor(fromSpinner, "#"));
toSpinner.setEditor(new NumberEditor(toSpinner, "#")); toSpinner.setEditor(new NumberEditor(toSpinner, "#"));
setLayout(new MigLayout("nogrid, fill, insets dialog", "align center")); setLayout(new MigLayout("nogrid, fill, insets dialog", "align center", "[pref!][fill]"));
add(new JLabel("Pattern:"), "gapbefore indent"); add(new JLabel("Pattern:"), "gapbefore indent");
add(textField, "gap related, wmin 2cm"); add(textField, "gap related, wmin 2cm");

View File

@ -112,11 +112,14 @@ public class RenamePanel extends FileBotPanel {
renameButton.setVerticalTextPosition(SwingConstants.BOTTOM); renameButton.setVerticalTextPosition(SwingConstants.BOTTOM);
renameButton.setHorizontalTextPosition(SwingConstants.CENTER); renameButton.setHorizontalTextPosition(SwingConstants.CENTER);
// set fetch action popup // setup fetch action popup
matchButton.setComponentPopupMenu(createFetchPopup()); ActionPopup fetchPopup = createFetchPopup();
namesList.getListComponent().setComponentPopupMenu(fetchPopup);
matchButton.setComponentPopupMenu(fetchPopup);
matchButton.addActionListener(showPopupAction); matchButton.addActionListener(showPopupAction);
setLayout(new MigLayout("fill, insets dialog, gapx 10px", null, "align 33%")); setLayout(new MigLayout("fill, insets dialog, gapx 10px", "[fill][align center, pref!][fill]", "align 33%"));
add(new LoadingOverlayPane(namesList, namesList, "28px", "30px"), "grow, sizegroupx list"); add(new LoadingOverlayPane(namesList, namesList, "28px", "30px"), "grow, sizegroupx list");

View File

@ -57,7 +57,7 @@ public class ChecksumPanel extends FileBotPanel {
table.setTransferHandler(new DefaultTransferHandler(transferablePolicy, exportHandler)); table.setTransferHandler(new DefaultTransferHandler(transferablePolicy, exportHandler));
JPanel contentPane = new JPanel(new MigLayout("insets 0, fill", "", "[fill]10px[nogrid, bottom]4px")); JPanel contentPane = new JPanel(new MigLayout("insets 0, nogrid, fill", "", "[fill]10px[bottom, pref!]4px"));
contentPane.setBorder(new TitledBorder(getPanelName())); contentPane.setBorder(new TitledBorder(getPanelName()));
setLayout(new MigLayout("insets dialog, fill")); setLayout(new MigLayout("insets dialog, fill"));