All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.cuf.ui.table.ContextMenuActionShowAll Maven / Gradle / Ivy

The newest version!
package net.sf.cuf.ui.table;


/**
 * Context menu action to show all hidden columns of a {@link SortingTable}.
 *
 * @author  Hendrik Wördehoff, sd&m AG
 */
public class ContextMenuActionShowAll
extends ContextMenuAction
{
    public String getKennung()
    {
        return mAdapter.getContextMenuKennung()+"_SHOWALL";
    }

    /**
     * The table returned by {@link ContextMenuAdapter#getTable} must be a {@link SortingTable}.
     */
    public boolean isEnabled()
    {
        return !((SortingTable) mAdapter.getTable()).isAllColumnsVisible();
    }

    /**
     * The table returned by {@link ContextMenuAdapter#getTable} must be a {@link SortingTable}.
     */
    public void performAction()
    {
        ((SortingTable) mAdapter.getTable()).setAllColumnsVisible();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy