本文整理了Java中javax.swing.AbstractButton.invalidate()
方法的一些代码示例,展示了AbstractButton.invalidate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractButton.invalidate()
方法的具体详情如下:
包路径:javax.swing.AbstractButton
类名称:AbstractButton
方法名:invalidate
暂无
代码示例来源:origin: com.jidesoft/jide-oss
@Override
public void propertyChange(PropertyChangeEvent e) {
super.propertyChange(e);
String prop = e.getPropertyName();
if (JideButton.BUTTON_STYLE_PROPERTY.equals(prop)
|| "opaque".equals(prop)
|| AbstractButton.CONTENT_AREA_FILLED_CHANGED_PROPERTY.equals(prop)
) {
AbstractButton b = (AbstractButton) e.getSource();
b.repaint();
}
else if (JideButton.PROPERTY_ORIENTATION.equals(prop)
|| "hideActionText".equals(prop)) {
AbstractButton b = (AbstractButton) e.getSource();
b.invalidate();
b.repaint();
}
else if ("verticalTextPosition".equals(prop)
|| "horizontalTextPosition".equals(prop)) {
AbstractButton b = (AbstractButton) e.getSource();
b.updateUI();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf
/**
* Description of the Method
*
* @param e Description of Parameter
*/
public void propertyChange(PropertyChangeEvent e) {
String propertyName = e.getPropertyName();
if (e.getPropertyName().equals(Action.NAME)) {
String text = (String) e.getNewValue();
button.setText(text);
button.repaint();
}
else if (propertyName.equals("enabled")) {
Boolean enabledState = (Boolean) e.getNewValue();
button.setEnabled(enabledState.booleanValue());
button.repaint();
}
else if (e.getPropertyName().equals(Action.SMALL_ICON)) {
Icon icon = (Icon) e.getNewValue();
button.setIcon(icon);
button.invalidate();
button.repaint();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!