Example usage for java.awt Toolkit addPropertyChangeListener

List of usage examples for java.awt Toolkit addPropertyChangeListener

Introduction

In this page you can find the example usage for java.awt Toolkit addPropertyChangeListener.

Prototype

public void addPropertyChangeListener(String name, PropertyChangeListener pcl) 

Source Link

Document

Adds the specified property change listener for the named desktop property.

Usage

From source file:com.googlecode.vfsjfilechooser2.VFSJFileChooser.java

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);
    }//from ww w  .  j ava2 s . c  o m
}