Example usage for javax.swing SwingUtilities replaceUIActionMap

List of usage examples for javax.swing SwingUtilities replaceUIActionMap

Introduction

In this page you can find the example usage for javax.swing SwingUtilities replaceUIActionMap.

Prototype

public static void replaceUIActionMap(JComponent component, ActionMap uiActionMap) 

Source Link

Document

Convenience method to change the UI ActionMap for component to uiActionMap.

Usage

From source file:com.googlecode.vfsjfilechooser2.plaf.basic.BasicVFSFileChooserUI.java

protected void installListeners(VFSJFileChooser fc) {
    propertyChangeListener = createPropertyChangeListener(fc);

    if (propertyChangeListener != null) {
        fc.addPropertyChangeListener(propertyChangeListener);
    }/* w w  w  .  ja  v  a2  s .c o m*/

    fc.addPropertyChangeListener(getModel());

    ActionMap actionMap = getActionMap();
    SwingUtilities.replaceUIActionMap(fc, actionMap);
}

From source file:com.googlecode.vfsjfilechooser2.plaf.basic.BasicVFSFileChooserUI.java

protected void uninstallListeners(VFSJFileChooser fc) {
    if (propertyChangeListener != null) {
        fc.removePropertyChangeListener(propertyChangeListener);
    }//  w  w  w  .j av a  2  s.c om

    fc.removePropertyChangeListener(getModel());
    SwingUtilities.replaceUIInputMap(fc, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
    SwingUtilities.replaceUIActionMap(fc, null);
}

From source file:com.googlecode.vfsjfilechooser2.plaf.metal.MetalVFSFileChooserUI.java

@Override
protected void installListeners(VFSJFileChooser fc) {
    super.installListeners(fc);

    ActionMap actionMap = getActionMap();
    SwingUtilities.replaceUIActionMap(fc, actionMap);
}