本文整理了Java中java.awt.Toolkit.addPropertyChangeListener()
方法的一些代码示例,展示了Toolkit.addPropertyChangeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Toolkit.addPropertyChangeListener()
方法的具体详情如下:
包路径:java.awt.Toolkit
类名称:Toolkit
方法名:addPropertyChangeListener
暂无
代码示例来源:origin: stackoverflow.com
Toolkit.getDefaultToolkit().addPropertyChangeListener("win.xpstyle.themeActive",
new PropertyChangeListener() {
@Override
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void addPropertyChangeListener(PropertyChangeListener l) {
this.l = l;
Toolkit.getDefaultToolkit().addPropertyChangeListener(
"win.xpstyle.themeActive", //NOI18N
this);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
private static void registerPcl() {
PropertyChangeListener l = new Listener();
UIManager.addPropertyChangeListener(l);
//Thanks to Scott Violet for how to do this. See also
//com.sun.java.swing.plaf.gtk.GtkLookAndFeel.WeakPCL
Toolkit.getDefaultToolkit().addPropertyChangeListener(
"gnome.Gtk/FontName", l); //NOI18N
Toolkit.getDefaultToolkit().addPropertyChangeListener(
"gnome.Xft/DPI", l); //NOI18N
Toolkit.getDefaultToolkit().addPropertyChangeListener(
"gnome.Net/ThemeName", l); //NOI18N
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
InplaceEditorFactory(boolean tableUI, ReusablePropertyEnv env) {
this.tableUI = tableUI;
this.reusableEnv = env;
//reset editors when windows theme is changing (classic <-> xp)
PropertyChangeListener weakListener = WeakListeners.propertyChange(this, Toolkit.getDefaultToolkit());
Toolkit.getDefaultToolkit().addPropertyChangeListener( "win.xpstyle.themeActive", weakListener ); //NOI18N
}
代码示例来源:origin: UISpec4J/UISpec4J
public void addPropertyChangeListener(String name, PropertyChangeListener pcl) {
getUnderlyingToolkit().addPropertyChangeListener(name, pcl);
}
代码示例来源:origin: EvoSuite/evosuite
private void installShowFilesListener() {
// Track native setting for showing hidden files
Toolkit tk = Toolkit.getDefaultToolkit();
Object showHiddenProperty = tk.getDesktopProperty(SHOW_HIDDEN_PROP);
if (showHiddenProperty instanceof Boolean) {
useFileHiding = !((Boolean)showHiddenProperty).booleanValue();
showFilesListener = new MockWeakPCL(this);
tk.addPropertyChangeListener(SHOW_HIDDEN_PROP, showFilesListener);
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-swing-plaf
private void attachListener() {
assert listener == null;
listener = new LFListener();
UIManager.addPropertyChangeListener(listener);
Toolkit.getDefaultToolkit().addPropertyChangeListener(
"win.xpstyle.themeActive", listener); //NOI18N
}
代码示例来源:origin: com.googlecode.vfsjfilechooser2/vfsjfilechooser2
private void installShowFilesListener()
{
// Track native setting for showing hidden files
Toolkit tk = Toolkit.getDefaultToolkit();
Object showHiddenProperty = tk.getDesktopProperty(SHOW_HIDDEN_PROP);
if (showHiddenProperty instanceof Boolean)
{
useFileHiding = !((Boolean) showHiddenProperty).booleanValue();
showFilesListener = new WeakPCL(this);
tk.addPropertyChangeListener(SHOW_HIDDEN_PROP, showFilesListener);
}
}
代码示例来源:origin: com.jidesoft/jide-oss
/**
* Returns the value from the desktop.
*/
protected Object getValueFromDesktop() {
if (this.toolkit == null) {
this.toolkit = Toolkit.getDefaultToolkit();
}
Object value = toolkit.getDesktopProperty(getKey());
pcl = new WeakPCL(this, toolkit);
toolkit.addPropertyChangeListener(getKey(), pcl);
return value;
}
代码示例来源:origin: com.jidesoft/jide-oss
Toolkit.getDefaultToolkit().addPropertyChangeListener(XPUtils.PROPERTY_COLORNAME, listener);
Toolkit.getDefaultToolkit().addPropertyChangeListener(XPUtils.PROPERTY_THEMEACTIVE, listener);
代码示例来源:origin: com.jidesoft/jide-oss
/**
* Returns the value from the desktop.
*/
protected Object[] getValueFromDesktop() {
if (this.toolkit == null) {
this.toolkit = Toolkit.getDefaultToolkit();
}
pcl = new WeakPCL(this, toolkit);
Object[] values = new Object[getKeys().length];
for (int i = 0; i < getKeys().length; i++) {
values[i] = toolkit.getDesktopProperty(getKeys()[i]);
toolkit.addPropertyChangeListener(getKeys()[i], pcl);
}
return values;
}
内容来源于网络,如有侵权,请联系作者删除!