⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 button.java

📁 A framework written in Java for implementing high-level and dynamic languages, compiling them into J
💻 JAVA
字号:
package gnu.kawa.models;import java.awt.Color;/** A model (data) for a clickable button. */public class Button extends Model{  boolean disabled;  String text;  Object action;  // These should be moved to "style" support  Color foreground;  Color background;  Object width;  public void makeView (Display display, Object where)  {    display.addButton(this, where);  }  public boolean isDisabled () { return disabled; }  public void setDisabled (boolean disabled) { this.disabled = disabled; }  public String getText () { return text; }  public void setText (String text)  {    this.text = text;    notifyListeners("text");  }  public Object getAction () { return action; }  public void setAction (Object action) { this.action = action; }  public Color getForeground () { return foreground; }  public void setForeground (Color fg)   {    foreground = fg;    notifyListeners("foreground");  }  public Color getBackground () { return background; }  public void setBackground (Color bg)  {    background = bg;    notifyListeners("background");  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -