Search in sources :

Example 1 with PushToApplications

use of org.jabref.gui.push.PushToApplications in project jabref by JabRef.

the class JabRefFrame method initLayout.

private void initLayout() {
    tabbedPane.putClientProperty(Options.NO_CONTENT_BORDER_KEY, Boolean.TRUE);
    setProgressBarVisible(false);
    pushApplications = new PushToApplications();
    pushExternalButton = new PushToApplicationButton(this, pushApplications.getApplications());
    fillMenu();
    createToolBar();
    setJMenuBar(mb);
    getContentPane().setLayout(new BorderLayout());
    JPanel toolbarPanel = new JPanel(new WrapLayout(FlowLayout.LEFT));
    toolbarPanel.add(tlb);
    toolbarPanel.add(globalSearchBar);
    getContentPane().add(toolbarPanel, BorderLayout.PAGE_START);
    splitPane.setDividerSize(2);
    splitPane.setBorder(null);
    splitPane.setRightComponent(tabbedPane);
    splitPane.setLeftComponent(sidePaneManager.getPanel());
    getContentPane().add(splitPane, BorderLayout.CENTER);
    UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
    sidePaneManager.updateView();
    GridBagLayout gbl = new GridBagLayout();
    GridBagConstraints con = new GridBagConstraints();
    con.fill = GridBagConstraints.BOTH;
    con.anchor = GridBagConstraints.WEST;
    JPanel status = new JPanel();
    status.setLayout(gbl);
    con.weighty = 0;
    con.weightx = 0;
    con.gridwidth = 1;
    con.insets = new Insets(0, 2, 0, 0);
    gbl.setConstraints(statusLabel, con);
    status.add(statusLabel);
    con.weightx = 1;
    con.insets = new Insets(0, 4, 0, 0);
    con.gridwidth = 1;
    gbl.setConstraints(statusLine, con);
    status.add(statusLine);
    con.weightx = 0;
    con.gridwidth = GridBagConstraints.REMAINDER;
    con.insets = new Insets(2, 4, 2, 2);
    gbl.setConstraints(progressBar, con);
    status.add(progressBar);
    statusLabel.setForeground(GUIGlobals.ENTRY_EDITOR_LABEL_COLOR.darker());
    getContentPane().add(status, BorderLayout.PAGE_END);
    // Drag and drop for tabbedPane:
    TransferHandler xfer = new EntryTableTransferHandler(null, this, null);
    tabbedPane.setTransferHandler(xfer);
    tlb.setTransferHandler(xfer);
    mb.setTransferHandler(xfer);
    sidePaneManager.getPanel().setTransferHandler(xfer);
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) EntryTableTransferHandler(org.jabref.gui.groups.EntryTableTransferHandler) Insets(java.awt.Insets) BorderLayout(java.awt.BorderLayout) GridBagLayout(java.awt.GridBagLayout) PushToApplications(org.jabref.gui.push.PushToApplications) EntryTableTransferHandler(org.jabref.gui.groups.EntryTableTransferHandler) TransferHandler(javax.swing.TransferHandler) PushToApplicationButton(org.jabref.gui.push.PushToApplicationButton)

Aggregations

BorderLayout (java.awt.BorderLayout)1 GridBagConstraints (java.awt.GridBagConstraints)1 GridBagLayout (java.awt.GridBagLayout)1 Insets (java.awt.Insets)1 JPanel (javax.swing.JPanel)1 TransferHandler (javax.swing.TransferHandler)1 EntryTableTransferHandler (org.jabref.gui.groups.EntryTableTransferHandler)1 PushToApplicationButton (org.jabref.gui.push.PushToApplicationButton)1 PushToApplications (org.jabref.gui.push.PushToApplications)1