Example usage for javax.swing AbstractButton setVisible

List of usage examples for javax.swing AbstractButton setVisible

Introduction

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

Prototype

@BeanProperty(hidden = true, visualUpdate = true)
public void setVisible(boolean aFlag) 

Source Link

Document

Makes the component visible or invisible.

Usage

From source file:com.projity.menu.MenuManager.java

public void setActionVisible(String id, boolean enable) {
    Collection buttons = toolBarFactory.getButtonsFromId(id);
    if (buttons != null) {
        Iterator i = buttons.iterator();
        while (i.hasNext()) {
            AbstractButton button = (AbstractButton) i.next();
            if (button != null)
                button.setVisible(enable);
        }/* ww  w  .j a v  a 2  s .  c  o m*/
    }
    JMenuItem menuItem = menuFactory.getMenuItemFromId(id);
    if (menuItem != null)
        menuItem.setVisible(enable);
}