private static JComponent createHyperlinkButton(Action a) {
return createHyperlinkButton(a, false);
}
private static JComponent createHyperlinkButton(Action a, boolean smallFont) {
final OpenZoeosButton button = new OpenZoeosButton(a) {
public Color getBackground() {
return UIColors.getDefaultBG();
}
public Color getForeground() {
return UIColors.getDefaultFG();
}
};
button.setAction(a);
button.setButtonStyle(OpenZoeosButton.HYPERLINK_STYLE);
button.setOpaque(true);
button.setPreferredSize(new Dimension(0, 20));
button.setHorizontalAlignment(SwingConstants.CENTER);
button.setRequestFocusEnabled(true);
button.setFocusable(true);
button.setFont((smallFont ? smallButtonFont : buttonFont));
button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
return button;
}