});
pop.add(item);
- if (av.getAlignment().getHiddenColumns().hasManyHiddenColumns())
+ if (av.getAlignment().getHiddenColumns().hasMultiHiddenColumnRegions())
{
item = new MenuItem(MessageManager.getString("action.reveal_all"));
item.addActionListener(new ActionListener()
try
{
LOCK.readLock().lock();
+
+ // we don't use getSize()>0 here because it has to iterate over
+ // the full hiddenColumns collection and so will be much slower
return hiddenColumns != null && hiddenColumns.size() > 0;
} finally
{
/**
*
- * @return true if there are more than one set of columns hidden
+ * @return true if there is more than one hidden column region
*/
- public boolean hasManyHiddenColumns()
+ public boolean hasMultiHiddenColumnRegions()
{
try
{
});
pop.add(item);
- if (av.getAlignment().getHiddenColumns().hasManyHiddenColumns())
+ if (av.getAlignment().getHiddenColumns().hasMultiHiddenColumnRegions())
{
item = new JMenuItem(MessageManager.getString("action.reveal_all"));
item.addActionListener(new ActionListener()
{
HiddenColumns h = new HiddenColumns();
- // new HiddenColumns2 has no hidden cols
- assertFalse(h.hasManyHiddenColumns());
+ // h has no hidden cols
+ assertFalse(h.hasMultiHiddenColumnRegions());
// one set of columns hidden, returns false
h.hideColumns(5, 10);
- assertFalse(h.hasManyHiddenColumns());
+ assertFalse(h.hasMultiHiddenColumnRegions());
// two sets hidden, returns true
h.hideColumns(15, 17);
- assertTrue(h.hasManyHiddenColumns());
+ assertTrue(h.hasMultiHiddenColumnRegions());
// back to one block, asserts false
h.hideColumns(11, 14);
- assertFalse(h.hasManyHiddenColumns());
+ assertFalse(h.hasMultiHiddenColumnRegions());
}
@Test(groups = "Functional")