Search in sources :

Example 1 with ReputationDeed

use of delta.games.lotro.lore.reputation.ReputationDeed in project lotro-companion by dmorcellet.

the class ReputationDeedsDisplayController method buildPanel.

private JPanel buildPanel() {
    JPanel panel = GuiFactory.buildPanel(new GridBagLayout());
    FactionsRegistry registry = FactionsRegistry.getInstance();
    int y = 0;
    List<ReputationDeed> deeds = registry.getReputationDeeds();
    for (ReputationDeed deed : deeds) {
        String deedName = deed.getName();
        JLabel label = GuiFactory.buildLabel(deedName + ":");
        label.setToolTipText("Status for the '" + deedName + "' deed");
        GridBagConstraints c = new GridBagConstraints(0, y, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0);
        panel.add(label, c);
        c.gridx++;
        c.weightx = 1.0;
        c.fill = GridBagConstraints.HORIZONTAL;
        JLabel countLabel = GuiFactory.buildLabel("NN / NN");
        panel.add(countLabel, c);
        _countLabels.add(countLabel);
        y++;
    }
    return panel;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) FactionsRegistry(delta.games.lotro.lore.reputation.FactionsRegistry) ReputationDeed(delta.games.lotro.lore.reputation.ReputationDeed) JLabel(javax.swing.JLabel)

Aggregations

FactionsRegistry (delta.games.lotro.lore.reputation.FactionsRegistry)1 ReputationDeed (delta.games.lotro.lore.reputation.ReputationDeed)1 GridBagConstraints (java.awt.GridBagConstraints)1 GridBagLayout (java.awt.GridBagLayout)1 Insets (java.awt.Insets)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1