![JAR search and dependency download from the Maven repository](/logo.png)
net.sf.cuf.ui.table.ContextMenuActionOptimalColumnWidth Maven / Gradle / Ivy
The newest version!
package net.sf.cuf.ui.table;
/**
* Context menu action to set a table column to its optimal size.
* It uses {@link OptimalColumnWidthSupport}.
*
* @author Hendrik Wördehoff, sd&m AG
*/
public class ContextMenuActionOptimalColumnWidth
extends ContextMenuAction
{
public String getKennung()
{
return mAdapter.getContextMenuKennung()+"_OPTIMALWIDTH";
}
/**
* @return true
only if the user clicked on a column
*/
public boolean isEnabled()
{
return mAdapter.getViewColumnIndex() != -1;
}
public void performAction()
{
OptimalColumnWidthSupport.adjustToOptimalColumnWidth(mAdapter.getTable(), mAdapter.getViewColumnIndex());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy