@Override public Dimension getPreferredScrollableViewportSize() { Dimension size = super.getPreferredScrollableViewportSize(); return size != null && size.width > 0 && size.height > 0 ? JideSwingUtilities.adjustPreferredScrollableViewportSize(this, size) : size; }
/** Initialize the CheckBoxList. */ protected void init() { _checkBoxListSelectionModel = createCheckBoxListSelectionModel(getModel()); setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); _listCellRenderer = createCellRenderer(); _handler = createHandler(); _checkBoxListSelectionModel.addListSelectionListener(_handler); JideSwingUtilities.insertMouseListener(this, _handler, 0); addKeyListener(_handler); addPropertyChangeListener("model", _handler); ListModel model = getModel(); if (model != null) { model.addListDataListener(_handler); } }
@Override public Dimension getPreferredScrollableViewportSize() { return JideSwingUtilities.adjustPreferredScrollableViewportSize( this, super.getPreferredScrollableViewportSize()); }