void (boolean set) { if (set) { JTable table = handler.getTable(); if (table != null) { if (listenedModel != null) { if (listenedModel == table.getModel()) { return; } setEnableTableModelEvents(false); } listenedModel = table.getModel(); listenedModel.addTableModelListener(this); } } else if (listenedModel != null) { listenedModel.removeTableModelListener(this); listenedModel = null; } }