本文整理了Java中javax.swing.UIManager.addPropertyChangeListener()
方法的一些代码示例,展示了UIManager.addPropertyChangeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UIManager.addPropertyChangeListener()
方法的具体详情如下:
包路径:javax.swing.UIManager
类名称:UIManager
方法名:addPropertyChangeListener
暂无
代码示例来源:origin: mucommander/mucommander
/**
* Creates a new instance of {@link SystemDefaultFont}.
* @param property {@link UIManager} property to query for the default font.
* @param mapper component mapper to use when the {@link UIManager} property isn't set.
*/
public SystemDefaultFont(String property, ComponentMapper mapper) {
UIManager.addPropertyChangeListener(this);
this.property = property;
this.mapper = mapper;
}
代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core
public void bind() {
UIManager.addPropertyChangeListener( listener );
}
代码示例来源:origin: mucommander/mucommander
/**
* Creates a new instance of {@link SystemDefaultColor}.
* @param type type of the color being described (can be one of {@link #FOREGROUND}, {@link #BACKGROUND},
* {@link #SELECTION_FOREGROUND} or {@link #SELECTION_BACKGROUND}).
* @param property name of the {@link UIManager} property to look for.
* @param mapper component mapper to use when the {@link UIManager} property isn't set.
*/
public SystemDefaultColor(int type, String property, ComponentMapper mapper) {
UIManager.addPropertyChangeListener(this);
this.property = property;
this.mapper = mapper;
this.type = type;
}
代码示例来源:origin: xyz.cofe/docking-frames-core
public void bind() {
UIManager.addPropertyChangeListener( listener );
}
代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core
public void bind() {
UIManager.addPropertyChangeListener( listener );
EventQueue.invokeLater( new Runnable(){
public void run() {
// since Nimbus changes its colors *after* its initialization,
// we need to wait as well.
fireColorsChanged();
}
});
}
代码示例来源:origin: xyz.cofe/docking-frames-core
public void bind() {
UIManager.addPropertyChangeListener( listener );
EventQueue.invokeLater( new Runnable(){
public void run() {
// since Nimbus changes its colors *after* its initialization,
// we need to wait as well.
fireColorsChanged();
}
});
}
代码示例来源:origin: com.fifesoft.rtext/fife.common
protected AbstractPlugin() {
UIManager.addPropertyChangeListener(e -> {
String property = e.getPropertyName();
if ("lookAndFeel".equals(property)) {
lookAndFeelChanged((LookAndFeel)e.getNewValue());
}
});
}
代码示例来源:origin: com.jidesoft/jide-oss
private AnimationController() {
timer.setRepeats(true);
timer.setCoalesce(true);
//we need to dispose the controller on l&f change
UIManager.addPropertyChangeListener(this);
}
代码示例来源:origin: net.java.abeille/abeille
private synchronized static void ensureLookAndFeelChangeHandlerRegistered() {
if (!changeHandlerRegistered) {
UIManager.addPropertyChangeListener(new LookAndFeelChangeHandler());
changeHandlerRegistered = true;
}
}
代码示例来源:origin: net.java.abeille/abeille
private Units() {
UIManager.addPropertyChangeListener(new LAFChangeHandler());
}
代码示例来源:origin: com.jgoodies/validation
private static synchronized void ensureLookAndFeelChangeHandlerRegistered() {
if (!lafChangeHandlerRegistered) {
UIManager.addPropertyChangeListener(new LookAndFeelChangeHandler());
lafChangeHandlerRegistered = true;
}
}
代码示例来源:origin: net.java.abeille/abeille
/**
* Constructs a <code>DefaultFontUnitConverter</code> and registers a
* listener that handles changes in the look&feel.
*/
private DefaultUnitConverter() {
UIManager.addPropertyChangeListener(new LookAndFeelChangeHandler());
changeSupport = new PropertyChangeSupport(this);
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
public SearchFactory() {
UIManager.addPropertyChangeListener(new LaFListener(this));
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
public SearchFactory() {
UIManager.addPropertyChangeListener(new LaFListener(this));
}
代码示例来源:origin: com.github.insubstantial/flamingo
private ButtonSizingUtils() {
this.outsets = this.syncOutsets(new JButton(""));
this.toggleOutsets = this.syncOutsets(new JToggleButton(""));
UIManager.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if ("lookAndFeel".equals(evt.getPropertyName())) {
outsets = syncOutsets(new JButton(""));
toggleOutsets = syncOutsets(new JToggleButton(""));
}
}
});
}
代码示例来源: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: 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: xyz.cofe/docking-frames-core
/**
* Creates a new DockUI
*/
protected DockUI(){
registerThemes();
registerColors();
UIManager.addPropertyChangeListener( new PropertyChangeListener(){
public void propertyChange( PropertyChangeEvent evt ) {
if( "lookAndFeel".equals( evt.getPropertyName() )){
updateUI();
}
}
});
}
代码示例来源:origin: xyz.cofe/docking-frames-core
/**
* Creates a new object
* @param controller the owner of this manager, not <code>null</code>
*/
public ThemeManager( DockController controller ){
super( controller );
if( controller == null ){
throw new IllegalArgumentException( "controller must not be null" );
}
this.controller = controller;
UIManager.addPropertyChangeListener( lookAndFeelObserver );
transfers = new TypedPropertyUIScheme( controller.getProperties() );
setScheme( Priority.THEME, transfers );
}
代码示例来源:origin: javax.help/javahelp
/**
* Installs UIDefaults for Help components and installs "lookAndFeel"
* property change listener.
*/
static void installUIDefaults() {
UIDefaults table = UIManager.getLookAndFeelDefaults();
if (uiDefaults != table) {
uiDefaults = table;
UIManager.removePropertyChangeListener(myLAFListener);
installLookAndFeelDefaults();
UIManager.addPropertyChangeListener(myLAFListener);
}
}
内容来源于网络,如有侵权,请联系作者删除!