use of delta.games.lotro.lore.deeds.DeedDescription in project lotro-companion by dmorcellet.
the class DeedLinksDisplayPanelController method buildController.
private void buildController(String label, DeedProxy proxy) {
if (proxy != null) {
String name = proxy.getName();
final DeedDescription deed = proxy.getDeed();
ActionListener listener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
_parent.setDeed(deed);
}
};
LocalHyperlinkAction action = new LocalHyperlinkAction(name, listener);
HyperLinkController controller = new HyperLinkController(action);
_labels.add(label);
_links.add(controller);
}
}
use of delta.games.lotro.lore.deeds.DeedDescription in project lotro-companion by dmorcellet.
the class DeedEditionWindowController method okImpl.
@Override
protected void okImpl() {
DeedDescription deed = _panelController.getItem();
DeedEvent event = new DeedEvent(DeedEventType.DEED_UPDATED, deed);
EventsManager.invokeEvent(event);
}
use of delta.games.lotro.lore.deeds.DeedDescription in project lotro-companion by dmorcellet.
the class MainTestRewardsDisplay method main.
/**
* Main method for this test.
* @param args Not used.
*/
public static void main(String[] args) {
DeedsManager deedsManager = DeedsManager.getInstance();
List<DeedDescription> deeds = deedsManager.getAll();
for (int i = 0; i < 50; i++) {
DeedDescription deed = deeds.get(i);
Rewards rewards = deed.getRewards();
ObjectsSet objects = rewards.getObjects();
int lotroPoints = rewards.getLotroPoints();
if ((objects.getNbObjectItems() > 0) || (lotroPoints > 0)) {
RewardsPanelController panelCtrl = new RewardsPanelController(rewards);
JPanel panel = panelCtrl.getPanel();
JFrame frame = new JFrame();
JPanel background = GuiFactory.buildBackgroundPanel(new BorderLayout());
background.add(panel, BorderLayout.CENTER);
frame.add(background);
frame.pack();
frame.setVisible(true);
}
}
}
use of delta.games.lotro.lore.deeds.DeedDescription in project lotro-tools by dmorcellet.
the class DeedsContainer method resolveProxies.
private void resolveProxies() {
for (DeedDescription deed : _deeds) {
DeedProxy previousProxy = deed.getPreviousDeedProxy();
if (previousProxy != null) {
resolveProxy(previousProxy);
}
DeedProxy nextProxy = deed.getNextDeedProxy();
if (nextProxy != null) {
resolveProxy(nextProxy);
}
}
}
use of delta.games.lotro.lore.deeds.DeedDescription in project lotro-tools by dmorcellet.
the class DeedsContainer method resolveProxy.
private void resolveProxy(DeedProxy proxy) {
int idToSearch = proxy.getId();
for (DeedDescription deed : _deeds) {
if (deed.getIdentifier() == idToSearch) {
proxy.setDeed(deed);
proxy.setKey(deed.getKey());
proxy.setName(deed.getName());
break;
}
}
if (proxy.getDeed() == null) {
System.out.println("Unresolved deed: id=" + idToSearch);
}
}
Aggregations