Search in sources :

Example 1 with TableColumnsChooserController

use of delta.common.ui.swing.tables.TableColumnsChooserController in project lotro-companion by dmorcellet.

the class ItemChoicePanelController method build.

private JPanel build() {
    JPanel panel = GuiFactory.buildPanel(new BorderLayout());
    TitledBorder itemsFrameBorder = GuiFactory.buildTitledBorder("Items");
    panel.setBorder(itemsFrameBorder);
    // Table
    JTable table = _tableController.getTable();
    JScrollPane scroll = GuiFactory.buildScrollPane(table);
    panel.add(scroll, BorderLayout.CENTER);
    // Stats
    JPanel statsPanel = GuiFactory.buildPanel(new FlowLayout(FlowLayout.LEFT));
    _statsLabel = GuiFactory.buildLabel("-");
    statsPanel.add(_statsLabel);
    JButton choose = GuiFactory.buildButton("Choose columns...");
    ActionListener al = new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            TableColumnsChooserController<Item> chooser = new TableColumnsChooserController<Item>(_parent, _tableController.getTableController());
            chooser.editModal();
        }
    };
    choose.addActionListener(al);
    statsPanel.add(choose);
    panel.add(statsPanel, BorderLayout.NORTH);
    return panel;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) Item(delta.games.lotro.lore.items.Item) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JTable(javax.swing.JTable) JButton(javax.swing.JButton) TableColumnsChooserController(delta.common.ui.swing.tables.TableColumnsChooserController) TitledBorder(javax.swing.border.TitledBorder)

Example 2 with TableColumnsChooserController

use of delta.common.ui.swing.tables.TableColumnsChooserController in project lotro-companion by dmorcellet.

the class DeedExplorerPanelController method build.

private JPanel build() {
    JPanel panel = GuiFactory.buildPanel(new BorderLayout());
    TitledBorder itemsFrameBorder = GuiFactory.buildTitledBorder("Items");
    panel.setBorder(itemsFrameBorder);
    // Table
    JTable table = _tableController.getTable();
    JScrollPane scroll = GuiFactory.buildScrollPane(table);
    panel.add(scroll, BorderLayout.CENTER);
    // Stats
    JPanel statsPanel = GuiFactory.buildPanel(new FlowLayout(FlowLayout.LEFT));
    _statsLabel = GuiFactory.buildLabel("-");
    statsPanel.add(_statsLabel);
    JButton choose = GuiFactory.buildButton("Choose columns...");
    ActionListener al = new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            TableColumnsChooserController<DeedDescription> chooser = new TableColumnsChooserController<DeedDescription>(_parent, _tableController.getTableController());
            chooser.editModal();
        }
    };
    choose.addActionListener(al);
    statsPanel.add(choose);
    panel.add(statsPanel, BorderLayout.NORTH);
    return panel;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) DeedDescription(delta.games.lotro.lore.deeds.DeedDescription) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JTable(javax.swing.JTable) JButton(javax.swing.JButton) TableColumnsChooserController(delta.common.ui.swing.tables.TableColumnsChooserController) TitledBorder(javax.swing.border.TitledBorder)

Aggregations

TableColumnsChooserController (delta.common.ui.swing.tables.TableColumnsChooserController)2 BorderLayout (java.awt.BorderLayout)2 FlowLayout (java.awt.FlowLayout)2 ActionEvent (java.awt.event.ActionEvent)2 ActionListener (java.awt.event.ActionListener)2 JButton (javax.swing.JButton)2 JPanel (javax.swing.JPanel)2 JScrollPane (javax.swing.JScrollPane)2 JTable (javax.swing.JTable)2 TitledBorder (javax.swing.border.TitledBorder)2 DeedDescription (delta.games.lotro.lore.deeds.DeedDescription)1 Item (delta.games.lotro.lore.items.Item)1