Example usage for javax.swing AbstractButton putClientProperty

List of usage examples for javax.swing AbstractButton putClientProperty

Introduction

In this page you can find the example usage for javax.swing AbstractButton putClientProperty.

Prototype

public final void putClientProperty(Object key, Object value) 

Source Link

Document

Adds an arbitrary key/value "client property" to this component.

Usage

From source file:org.pentaho.reporting.designer.core.xul.ActionSwingButton.java

public ActionSwingButton(final Element self, final XulComponent parent, final XulDomContainer domContainer,
        final String tagName) {
    super(self, parent, domContainer, tagName);
    this.actionChangeHandler = new ActionChangeHandler();

    final AbstractButton button = getButton();
    parentIsToolbar = computeParentToolbar(parent);
    if (parentIsToolbar) {
        button.putClientProperty("hideActionText", Boolean.TRUE);//NON-NLS
    }//  ww w  .  j a  v a  2s.  co  m
}

From source file:org.pentaho.reporting.designer.core.xul.ActionSwingButton.java

protected void setButton(final AbstractButton button) {
    final AbstractButton oldButton = getButton();
    oldButton.setAction(null);//from www  . ja va2  s .c o m
    super.setButton(button);
    if (parentIsToolbar) {
        button.putClientProperty("hideActionText", Boolean.TRUE);//NON-NLS
    }
    button.setAction(action);
}