public static JButton createHyperlinkButton(String name, Color color, ActionListener l) { final JideButton button = new JideButton(name); button.setButtonStyle(JideButton.HYPERLINK_STYLE); button.setForeground(color); button.setOpaque(false); button.setHorizontalAlignment(SwingConstants.LEADING); if (l != null) { button.addActionListener(l); } button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); return button; }
public static JComponent createHyperlinkButton(String name, Color color, ActionListener l) { final JideButton button = new JideButton(name); button.setButtonStyle(JideButton.HYPERLINK_STYLE); button.setForeground(color); button.setOpaque(false); button.setHorizontalAlignment(SwingConstants.LEADING); //button.setRequestFocusEnabled(true); //button.setFocusable(true); button.addActionListener(l); //button.setCursor(Cursor.getPredefinedCursor(Cursor.)); return button; }
/** * Creates the button for each icon. * * @param title * @param icon * @return the button */ protected JideButton createIconButton(String title, Icon icon) { final JideButton button = new JideButton(title, icon); button.setName(title); button.setHorizontalAlignment(SwingConstants.CENTER); button.setVerticalTextPosition(SwingConstants.BOTTOM); button.setHorizontalTextPosition(SwingConstants.CENTER); button.setRequestFocusEnabled(false); button.setFocusable(false); return button; }
/** * Creates the button for each icon. * * @param title the button title * @param icon the button icon * @return the button */ protected JideButton createIconButton(String title, Icon icon) { final JideButton button = new JideButton(title, icon); button.setName(title); button.setHorizontalAlignment(SwingConstants.CENTER); button.setVerticalTextPosition(SwingConstants.BOTTOM); button.setHorizontalTextPosition(SwingConstants.CENTER); button.setRequestFocusEnabled(false); button.setFocusable(false); return button; }