Java Code Examples for javax.swing.AbstractButton#setUI()
The following examples show how to use
javax.swing.AbstractButton#setUI() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NavigationButtons.java From pumpernickel with MIT License | 5 votes |
public static void formatPrev(AbstractButton button) { button.setIcon(createIcon(false, .75f)); button.setRolloverIcon(createIcon(false, .85f)); button.setSelectedIcon(createIcon(false, 1f)); button.setDisabledIcon(createIcon(false, .3f)); button.setUI(new BevelButtonUI()); button.setContentAreaFilled(true); button.putClientProperty("JButton.segmentPosition", "first"); button.setBorderPainted(true); }
Example 2
Source File: NavigationButtons.java From pumpernickel with MIT License | 5 votes |
public static void formatNext(AbstractButton button) { button.setIcon(createIcon(true, .75f)); button.setRolloverIcon(createIcon(true, .85f)); button.setSelectedIcon(createIcon(true, 1f)); button.setDisabledIcon(createIcon(true, .3f)); button.setUI(new BevelButtonUI()); button.setContentAreaFilled(true); button.putClientProperty("JButton.segmentPosition", "last"); button.setBorderPainted(true); }
Example 3
Source File: RapidDockingToolbar.java From rapidminer-studio with GNU Affero General Public License v3.0 | 5 votes |
@Override public void installButtonUI(AbstractButton button) { button.setUI(new ButtonUI()); button.setBorder(null); button.setMargin(new Insets(0, 0, 0, 0)); if ((button.getText() == null || "".equals(button.getText())) && button.getIcon() != null) { button.setPreferredSize(new Dimension((int) (button.getIcon().getIconWidth() * 1.45d), (int) (button.getIcon() .getIconHeight() * 1.45d))); } }
Example 4
Source File: BlueishButtonBarUI.java From orbit-image-analysis with GNU General Public License v3.0 | 4 votes |
public void installButtonBarUI(AbstractButton button) { button.setUI(new BlueishButtonBarButtonUI()); button.setHorizontalTextPosition(JButton.CENTER); button.setVerticalTextPosition(JButton.BOTTOM); button.setOpaque(false); }
Example 5
Source File: IconPackagerButtonBarUI.java From orbit-image-analysis with GNU General Public License v3.0 | 4 votes |
public void installButtonBarUI(AbstractButton button) { button.setUI(new ButtonUI()); button.setHorizontalTextPosition(JButton.CENTER); button.setVerticalTextPosition(JButton.BOTTOM); }
Example 6
Source File: LargeNavigationPanelUI.java From pumpernickel with MIT License | 4 votes |
protected void format(AbstractButton button) { button.setBorderPainted(false); button.setContentAreaFilled(false); button.setUI(new BasicButtonUI()); }