Search in sources :

Example 41 with JToolBar

use of javax.swing.JToolBar in project ffx by mjschnie.

the class LogPanel method initToolBar.

private void initToolBar() {
    toolBar = new JToolBar("Results");
    toolBar.setLayout(new FlowLayout(FlowLayout.LEFT));
    JButton jbrefresh = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/page_refresh.png")));
    jbrefresh.setActionCommand("Refresh");
    jbrefresh.setToolTipText("Refresh the Logs Panel");
    jbrefresh.addActionListener(this);
    Insets insets = jbrefresh.getInsets();
    insets.top = 2;
    insets.bottom = 2;
    insets.left = 2;
    insets.right = 2;
    jbrefresh.setMargin(insets);
    toolBar.add(jbrefresh);
    toolBar.addSeparator();
    JButton jbopen = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/page_open.png")));
    jbopen.setActionCommand("Open...");
    jbopen.setToolTipText("Open any Text File");
    jbopen.addActionListener(this);
    jbopen.setMargin(insets);
    toolBar.add(jbopen);
    JButton jbsave = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/disk.png")));
    jbsave.setActionCommand("Save");
    jbsave.setToolTipText("Save the Active File");
    jbsave.addActionListener(this);
    jbsave.setMargin(insets);
    toolBar.add(jbsave);
    JButton jbsaveas = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/page_save.png")));
    jbsaveas.setActionCommand("Save As...");
    jbsaveas.setToolTipText("Save the Active Text File Under a New Name");
    jbsaveas.addActionListener(this);
    jbsaveas.setMargin(insets);
    toolBar.add(jbsaveas);
    JButton jbclose = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/cancel.png")));
    jbclose.setActionCommand("Close");
    jbclose.setToolTipText("Close the Active Text File");
    jbclose.addActionListener(this);
    jbclose.setMargin(insets);
    toolBar.add(jbclose);
    JButton jbcloseall = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/stop.png")));
    jbcloseall.setActionCommand("Close All");
    jbcloseall.setToolTipText("Close All Open Text Files");
    jbcloseall.addActionListener(this);
    jbcloseall.setMargin(insets);
    toolBar.add(jbcloseall);
    toolBar.setFloatable(false);
    toolBar.setRollover(true);
    toolBar.setOrientation(JToolBar.HORIZONTAL);
}
Also used : ImageIcon(javax.swing.ImageIcon) FlowLayout(java.awt.FlowLayout) Insets(java.awt.Insets) JButton(javax.swing.JButton) JToolBar(javax.swing.JToolBar)

Example 42 with JToolBar

use of javax.swing.JToolBar in project lotro-companion by dmorcellet.

the class MainFrameController method buildContents.

@Override
protected JComponent buildContents() {
    JPanel ret = GuiFactory.buildPanel(new BorderLayout());
    _toolbar = buildToolBar();
    JToolBar toolbar = _toolbar.getToolBar();
    ret.add(toolbar, BorderLayout.NORTH);
    JTabbedPane tabbedPane = GuiFactory.buildTabbedPane();
    // Characters
    JPanel toonsPanel = _toonsManager.getPanel();
    tabbedPane.add("Characters", toonsPanel);
    // Accounts
    JPanel accountsPanel = _accountsManager.getPanel();
    tabbedPane.add("Accounts", accountsPanel);
    // Deeds
    JPanel deedsPanel = _deedsManager.getPanel();
    tabbedPane.add("Deeds", deedsPanel);
    ret.add(tabbedPane, BorderLayout.CENTER);
    return ret;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JTabbedPane(javax.swing.JTabbedPane) JToolBar(javax.swing.JToolBar)

Example 43 with JToolBar

use of javax.swing.JToolBar in project lotro-companion by dmorcellet.

the class ToonsManagementController method buildPanel.

private JPanel buildPanel() {
    JPanel ret = GuiFactory.buildBackgroundPanel(new BorderLayout());
    _toolbar = buildToolBar();
    JToolBar toolbar = _toolbar.getToolBar();
    ret.add(toolbar, BorderLayout.NORTH);
    _toonsTable = buildToonsTable();
    JTable table = _toonsTable.getTable();
    JScrollPane scroll = GuiFactory.buildScrollPane(table);
    ret.add(scroll, BorderLayout.CENTER);
    return ret;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JTable(javax.swing.JTable) JToolBar(javax.swing.JToolBar)

Example 44 with JToolBar

use of javax.swing.JToolBar in project lotro-companion by dmorcellet.

the class CharacterFileWindowController method buildTablePanel.

private JPanel buildTablePanel() {
    JPanel ret = GuiFactory.buildBackgroundPanel(new BorderLayout());
    _toolbar = buildToolBar();
    JToolBar toolbar = _toolbar.getToolBar();
    ret.add(toolbar, BorderLayout.NORTH);
    _toonsTable = buildToonsTable();
    JTable table = _toonsTable.getTable();
    JScrollPane scroll = GuiFactory.buildScrollPane(table);
    ret.add(scroll, BorderLayout.CENTER);
    return ret;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JTable(javax.swing.JTable) JToolBar(javax.swing.JToolBar)

Example 45 with JToolBar

use of javax.swing.JToolBar in project lotro-companion by dmorcellet.

the class DeedsManagementController method buildPanel.

private JPanel buildPanel() {
    JPanel ret = GuiFactory.buildBackgroundPanel(new BorderLayout());
    _toolbar = buildToolBar();
    JToolBar toolbar = _toolbar.getToolBar();
    ret.add(toolbar, BorderLayout.NORTH);
    _deedsTable = buildDeedsTable();
    JTable table = _deedsTable.getTable();
    JScrollPane scroll = GuiFactory.buildScrollPane(table);
    ret.add(scroll, BorderLayout.CENTER);
    return ret;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JTable(javax.swing.JTable) JToolBar(javax.swing.JToolBar)

Aggregations

JToolBar (javax.swing.JToolBar)124 JButton (javax.swing.JButton)51 BorderLayout (java.awt.BorderLayout)45 JPanel (javax.swing.JPanel)37 JScrollPane (javax.swing.JScrollPane)30 Dimension (java.awt.Dimension)25 Insets (java.awt.Insets)25 ActionEvent (java.awt.event.ActionEvent)24 JLabel (javax.swing.JLabel)23 ActionListener (java.awt.event.ActionListener)19 ImageIcon (javax.swing.ImageIcon)17 Component (java.awt.Component)14 JSplitPane (javax.swing.JSplitPane)14 JTable (javax.swing.JTable)14 JTextField (javax.swing.JTextField)14 JPopupMenu (javax.swing.JPopupMenu)13 JToggleButton (javax.swing.JToggleButton)12 GridBagConstraints (java.awt.GridBagConstraints)10 GridBagLayout (java.awt.GridBagLayout)10 JComponent (javax.swing.JComponent)10