📄 stopbutton.java
字号:
package net.sf.fmj.ejmf.toolkit.gui.controls.skins.ejmf;import java.awt.Color;import java.awt.Graphics;import javax.swing.UIManager;public class StopButton extends BasicControlButton { /** Create a StopButton */ public StopButton() { super(); } /** * Paint a small square into BasicControlButton * @param g Graphics into which rectangles are drawn. * @param x Original translation (x) to point in button where * where square is drawn. * @param y Original translation (y) to point in button where * where square is drawn. * @param size Size of square. * @param isEnabled If true, square is drawn enabled (i.e. black), * otherwise, they are offset by (1,1) and drawn with UIManager's * controlShadow color. */ protected void paintIcon(Graphics g, int x, int y, int size, boolean isEnabled) { g.translate(x, y); if (isEnabled) g.fillRect(0, 0, size, size); else { g.translate(1, 1); Color oldColor = g.getColor(); g.setColor(UIManager.getColor("controlShadow")); g.fill3DRect(0, 0, size, size, false); g.setColor(oldColor); g.translate(-1, -1); } g.translate(-x, -y); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -