use of delta.common.ui.swing.labels.LocalHyperlinkAction in project lotro-companion by dmorcellet.
the class DetailedCharacterStatsPanelController method buildLabelForStat.
private JLabel buildLabelForStat(String text, STAT stat) {
JLabel label = null;
if (stat != null) {
final StatCurvesChartConfiguration config = (_statCurvesMgr != null) ? _statCurvesMgr.getConfigForStat(stat) : null;
if (config != null) {
ActionListener al = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
_statCurvesMgr.showStatCurvesWindow(config);
}
};
LocalHyperlinkAction action = new LocalHyperlinkAction(text, al);
HyperLinkController controller = new HyperLinkController(action);
label = controller.getLabel();
}
}
if (label == null) {
label = GuiFactory.buildLabel(text);
}
return label;
}
use of delta.common.ui.swing.labels.LocalHyperlinkAction 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);
}
}
Aggregations