@Override public void itemStateChanged(final ItemEvent e) { if (canControlColumn()) { if ((e.getStateChange() == ItemEvent.DESELECTED) //JW: guarding against 1 leads to #212-swingx: setting // column visibility programatically fails if // the current column is the second last visible // guarding against 0 leads to hiding all columns // by deselecting the menu item. && (table.getColumnCount() <= 1) // JW Fixed #212: basically implemented Rob's idea to distinguish // event sources instead of unconditionally reselect // not entirely sure if the state transitions are completely // defined but all related tests are passing now. && !fromColumn) { reselect(); } else { setSelected(e.getStateChange() == ItemEvent.SELECTED); } } }
@Override public void itemStateChanged(final ItemEvent e) { if (canControlColumn()) { if ((e.getStateChange() == ItemEvent.DESELECTED) //JW: guarding against 1 leads to #212-swingx: setting // column visibility programatically fails if // the current column is the second last visible // guarding against 0 leads to hiding all columns // by deselecting the menu item. && (table.getColumnCount() <= 1) // JW Fixed #212: basically implemented Rob's idea to distinguish // event sources instead of unconditionally reselect // not entirely sure if the state transitions are completely // defined but all related tests are passing now. && !fromColumn) { reselect(); } else { setSelected(e.getStateChange() == ItemEvent.SELECTED); } } }
@Override public void itemStateChanged(final ItemEvent e) { if (canControlColumn()) { if ((e.getStateChange() == ItemEvent.DESELECTED) //JW: guarding against 1 leads to #212-swingx: setting // column visibility programatically fails if // the current column is the second last visible // guarding against 0 leads to hiding all columns // by deselecting the menu item. && (table.getColumnCount() <= 1) // JW Fixed #212: basically implemented Rob's idea to distinguish // event sources instead of unconditionally reselect // not entirely sure if the state transitions are completely // defined but all related tests are passing now. && !fromColumn) { reselect(); } else { setSelected(e.getStateChange() == ItemEvent.SELECTED); } } }
@Override public void itemStateChanged(final ItemEvent e) { if (canControlColumn()) { if ((e.getStateChange() == ItemEvent.DESELECTED) //JW: guarding against 1 leads to #212-swingx: setting // column visibility programatically fails if // the current column is the second last visible // guarding against 0 leads to hiding all columns // by deselecting the menu item. && (table.getColumnCount() <= 1) // JW Fixed #212: basically implemented Rob's idea to distinguish // event sources instead of unconditionally reselect // not entirely sure if the state transitions are completely // defined but all related tests are passing now. && !fromColumn) { reselect(); } else { setSelected(e.getStateChange() == ItemEvent.SELECTED); } } }
@Override public void itemStateChanged(final ItemEvent e) { if (canControlColumn()) { if ((e.getStateChange() == ItemEvent.DESELECTED) //JW: guarding against 1 leads to #212-swingx: setting // column visibility programatically fails if // the current column is the second last visible // guarding against 0 leads to hiding all columns // by deselecting the menu item. && (table.getColumnCount() <= 1) // JW Fixed #212: basically implemented Rob's idea to distinguish // event sources instead of unconditionally reselect // not entirely sure if the state transitions are completely // defined but all related tests are passing now. && !fromColumn) { reselect(); } else { setSelected(e.getStateChange() == ItemEvent.SELECTED); } } }
/** * Synchs selected property to visible. This * is called on change of tablecolumn's <code>visible</code> property. * * @param visible column visible state to synch to. */ private void updateFromColumnVisible(boolean visible) { // /*boolean*/ visible = true; // if (canControlColumn()) { // visible = ((TableColumnExt) column).isVisible(); // } fromColumn = true; setSelected(visible); fromColumn = false; }
/** * Synchs selected property to visible. This * is called on change of tablecolumn's <code>visible</code> property. * * @param visible column visible state to synch to. */ private void updateFromColumnVisible(boolean visible) { // /*boolean*/ visible = true; // if (canControlColumn()) { // visible = ((TableColumnExt) column).isVisible(); // } fromColumn = true; setSelected(visible); fromColumn = false; }
/** * Synchs selected property to visible. This * is called on change of tablecolumn's <code>visible</code> property. * * @param visible column visible state to synch to. */ private void updateFromColumnVisible(boolean visible) { // /*boolean*/ visible = true; // if (canControlColumn()) { // visible = ((TableColumnExt) column).isVisible(); // } fromColumn = true; setSelected(visible); fromColumn = false; }
/** * Synchs selected property to visible. This * is called on change of tablecolumn's <code>visible</code> property. * * @param visible column visible state to synch to. */ private void updateFromColumnVisible(boolean visible) { // /*boolean*/ visible = true; // if (canControlColumn()) { // visible = ((TableColumnExt) column).isVisible(); // } fromColumn = true; setSelected(visible); fromColumn = false; }
/** * Synchs selected property to visible. This * is called on change of tablecolumn's <code>visible</code> property. * * @param visible column visible state to synch to. */ private void updateFromColumnVisible(boolean visible) { // /*boolean*/ visible = true; // if (canControlColumn()) { // visible = ((TableColumnExt) column).isVisible(); // } fromColumn = true; setSelected(visible); fromColumn = false; }