home *** CD-ROM | disk | FTP | other *** search
- package com.extensibility.rock;
-
- import java.awt.Font;
- import javax.swing.AbstractAction;
- import javax.swing.AbstractButton;
- import javax.swing.Icon;
- import javax.swing.JButton;
- import javax.swing.JComponent;
-
- public class RButton extends JButton {
- public static Font font;
- ActionChangedListener propListener;
-
- public static void setDefaultFont(Font var0) {
- font = var0;
- }
-
- public RButton() {
- this((String)null, (Icon)null, (RAction)null);
- }
-
- public RButton(String var1) {
- this(var1, (Icon)null, (RAction)null);
- }
-
- public RButton(Icon var1) {
- this((String)null, var1, (RAction)null);
- }
-
- public RButton(RAction var1) {
- this((String)((AbstractAction)var1).getValue("Name"), (Icon)((AbstractAction)var1).getValue("SmallIcon"), var1);
- }
-
- public RButton(String var1, Icon var2) {
- this(var1, var2, (RAction)null);
- }
-
- public RButton(String var1, Icon var2, RAction var3) {
- super(var1, var2);
- this.propListener = new ActionChangedListener(this);
- if (var3 != null) {
- ((AbstractButton)this).addActionListener(var3);
- ((AbstractAction)var3).addPropertyChangeListener(this.propListener);
- }
-
- if (font != null) {
- ((JComponent)this).setFont(font);
- }
-
- }
- }
-