private static AbstractButton createButton(boolean toggle) { JideButton button; if (toggle) { button = new JideToggleButton(); // <JIDE/> } else { button = new JideButton(); // <JIDE/> } return button; }
private static AbstractButton createButton(boolean toggle) { JideButton button; if (toggle) { button = new JideToggleButton(); // <JIDE/> } else { button = new JideButton(); // <JIDE/> } return button; }
comparisonOperatorComboBox = new javax.swing.JComboBox(); valueTextField = new javax.swing.JTextField(); moreButton = new JideButton(); removeButton = new JideButton();
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; }
infoLinkButton = new JideButton();
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 that is used in the Calculator. By default, it will create a JideButton. Here is the code. You * can override it to create your own button. * <pre><code> * AbstractButton button = new JideButton(text, icon); * button.setOpaque(true); * button.setContentAreaFilled(true); * button.setRequestFocusEnabled(false); * button.setFocusable(false); * button.addActionListener(this); * return button; * </code></pre> * * @param text the text on the button. * @param icon the icon on the button. * @return the button. */ protected AbstractButton createButton(String text, Icon icon) { AbstractButton button = new JideButton(text, icon); button.setOpaque(true); button.setContentAreaFilled(true); button.setRequestFocusEnabled(false); button.setFocusable(false); button.addActionListener(this); 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; }
goButton = new JideButton("Go"); homeButton = new com.jidesoft.swing.JideButton(); homeButton.setAlignmentX(RIGHT_ALIGNMENT); backButton = new JideButton(); toolPanel.add(backButton, JideBoxLayout.FIX); forwardButton = new JideButton(); toolPanel.add(forwardButton, JideBoxLayout.FIX); refreshButton = new com.jidesoft.swing.JideButton(); fitToWindowButton = new JideButton(); detailsBehaviorButton = new JideButton(noTooltipIcon);
menuButton = new JideSplitButton(I18N.getText("initPanel.menuButton")); panel.add(menuButton, new CellConstraints(2, 2)); JideButton rButton = new JideButton(RESET_COUNTER_ACTION); rButton.setButtonStyle(JideButton.TOOLBOX_STYLE); panel.add(rButton, new CellConstraints(4, 2));