IOptionPaneUI.java :  » Net » hyperpool-0.4.0 » vicazh » hyperpool » themes » Java Open Source

Java Open Source » Net » hyperpool 0.4.0 
hyperpool 0.4.0 » vicazh » hyperpool » themes » IOptionPaneUI.java
package vicazh.hyperpool.themes;

import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;

/**
 * Provides the look and feel for a <code>JOptionPane</code>.
 * 
 * @author Victor Zhigunov
 * @version 0.3.2
 */
public class IOptionPaneUI extends BasicOptionPaneUI {
  public static ComponentUI createUI(JComponent x) {
    return new IOptionPaneUI();
  }

  protected void addButtonComponents(Container container, Object[] buttons,
      int initialIndex) {
    super.addButtonComponents(container, buttons, initialIndex);
    Component[] components = container.getComponents();
    for (int i = 0; i < components.length; i++)
      if (components[i] instanceof AbstractButton)
        ((AbstractButton) components[i]).setBorderPainted(false);
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.