/** * Set the flag indicating if JideScrollPane should keep the corner visible when it has corner components defined * even when the scroll bar is not visible. * * @param keepCornerVisible the flag */ public void setKeepCornerVisible(boolean keepCornerVisible) { if (_keepCornerVisible != keepCornerVisible) { boolean old = _keepCornerVisible; _keepCornerVisible = keepCornerVisible; firePropertyChange(PROPERTY_KEEP_CORNER_VISIBLE, old, _keepCornerVisible); invalidate(); doLayout(); } }
/** * Sets the flag if the bottom-right, bottom-left corner and the column footer will have the same height or * different heights. * * @param columnFootersHeightUnified true or false. */ public void setColumnFootersHeightUnified(boolean columnFootersHeightUnified) { boolean old = _columnFootersHeightUnified; if (old != columnFootersHeightUnified) { _columnFootersHeightUnified = columnFootersHeightUnified; firePropertyChange(PROPERTY_COLUMN_FOOTERS_HEIGHT_UNIFIED, old, _horizontalScrollBarCoversWholeWidth); invalidate(); doLayout(); } }
/** * Sets the flag if the top-right, top-left corner and the column header will have the same height or different * heights. * * @param columnHeadersHeightUnified true or false. */ public void setColumnHeadersHeightUnified(boolean columnHeadersHeightUnified) { boolean old = _columnHeadersHeightUnified; if (old != columnHeadersHeightUnified) { _columnHeadersHeightUnified = columnHeadersHeightUnified; firePropertyChange(PROPERTY_COLUMN_HEADERS_HEIGHT_UNIFIED, old, _horizontalScrollBarCoversWholeWidth); invalidate(); doLayout(); } }
/** * Sets the flag indicating if the JideScrollPane will layout its view flat without scroll bars. * <p/> * By default, the value is false to keep normal behavior. * * @param flatLayout the flag * @since 3.3.3 */ public void setFlatLayout(boolean flatLayout) { if (_flatLayout != flatLayout) { boolean old = _flatLayout; _flatLayout = flatLayout; firePropertyChange(PROPERTY_FLAT_LAYOUT, old, _flatLayout); invalidate(); doLayout(); } } }
@Override public void setCorner(String key, Component corner) { if (key == null) { return; } if (key.equals(SUB_UPPER_LEFT) || key.equals(SUB_UPPER_RIGHT)) { Component old; if (key.equals(SUB_UPPER_LEFT)) { old = _subUpperLeft; _subUpperLeft = corner; } else { old = _subUpperRight; _subUpperRight = corner; } if (old != null) { remove(old); } if (corner != null) { add(corner, key); } firePropertyChange(key, old, corner); revalidate(); repaint(); return; } super.setCorner(key, corner); }
public void setHorizontalScrollBarCoversWholeWidth(boolean horizontalScrollBarCoversWholeWidth) { boolean old = _horizontalScrollBarCoversWholeWidth; if (old != horizontalScrollBarCoversWholeWidth) { _horizontalScrollBarCoversWholeWidth = horizontalScrollBarCoversWholeWidth; firePropertyChange(PROPERTY_HORIZONTAL_SCROLL_BAR_COVERS_WHOLE_WIDTH, old, _horizontalScrollBarCoversWholeWidth); invalidate(); doLayout(); if (getHorizontalScrollBar() != null) { getHorizontalScrollBar().doLayout(); } } }
firePropertyChange(key, old, corner); revalidate(); repaint();
public void setVerticalScrollBarCoversWholeHeight(boolean verticalScrollBarCoversWholeHeight) { boolean old = _verticalScrollBarCoversWholeHeight; if (old != verticalScrollBarCoversWholeHeight) { _verticalScrollBarCoversWholeHeight = verticalScrollBarCoversWholeHeight; firePropertyChange(PROPERTY_VERTICAL_SCROLL_BAR_COVERS_WHOLE_HEIGHT, old, _verticalScrollBarCoversWholeHeight); invalidate(); doLayout(); if (getVerticalScrollBar() != null) { getVerticalScrollBar().doLayout(); } } }
/** * Removes the old sub column header, if it exists. If the new sub column header isn't <code>null</code>, sync the * x coordinate of the its viewPosition with the viewport (if there is one) and then add it to the scroll pane. * * @param subColumnHeader the new sub column header to be used; if <code>null</code> the old sub column header is * still removed and the new sub column header is set to <code>null</code> * @see #getSubColumnHeader() */ public void setSubColumnHeader(JViewport subColumnHeader) { JViewport old = getSubColumnHeader(); _subColumnHeader = subColumnHeader; if (null != subColumnHeader) { add(subColumnHeader, SUB_COLUMN_HEADER); } else if (null != old) { remove(old); } firePropertyChange("subColumnHeader", old, subColumnHeader); revalidate(); repaint(); if (old != null) { JideSwingUtilities.unsynchronizeView(old, getViewport()); JideSwingUtilities.unsynchronizeView(getViewport(), old); } if (_subColumnHeader != null) { JideSwingUtilities.synchronizeView(_subColumnHeader, getViewport(), SwingConstants.HORIZONTAL); JideSwingUtilities.synchronizeView(getViewport(), _subColumnHeader, SwingConstants.HORIZONTAL); } }
/** * Removes the old rowFooter, if it exists. If the new rowFooter isn't <code>null</code>, syncs the y coordinate of * its viewPosition with the viewport (if there is one) and then adds it to the scrollpane. * * @param rowFooter the new row footer to be used; if <code>null</code> the old row footer is still removed and the * new rowFooter is set to <code>null</code> * @see #getRowFooter * @see #setRowFooterView(java.awt.Component) */ public void setRowFooter(JViewport rowFooter) { JViewport old = getRowFooter(); _rowFooter = rowFooter; if (null != rowFooter) { add(rowFooter, ROW_FOOTER); } else if (null != old) { remove(old); } firePropertyChange("rowFooter", old, rowFooter); revalidate(); repaint(); if (old != null) { JideSwingUtilities.unsynchronizeView(old, getViewport()); JideSwingUtilities.unsynchronizeView(getViewport(), old); } if (rowFooter != null) { JideSwingUtilities.synchronizeView(rowFooter, getViewport(), SwingConstants.VERTICAL); JideSwingUtilities.synchronizeView(getViewport(), rowFooter, SwingConstants.VERTICAL); } }
/** * Removes the old columnFooter, if it exists. If the new columnFooter isn't <code>null</code>, sync the x * coordinate of the its viewPosition with the viewport (if there is one) and then add it to the scrollpane. * * @param columnFooter the new column footer to be used; if <code>null</code> the old column footer is still removed * and the new columnFooter is set to <code>null</code> * @see #getColumnFooter * @see #setColumnFooterView(java.awt.Component) */ public void setColumnFooter(JViewport columnFooter) { JViewport old = getColumnFooter(); _columnFooter = columnFooter; if (null != columnFooter) { add(columnFooter, COLUMN_FOOTER); } else if (null != old) { remove(old); } firePropertyChange("columnFooter", old, columnFooter); revalidate(); repaint(); if (old != null) { JideSwingUtilities.unsynchronizeView(old, getViewport()); JideSwingUtilities.unsynchronizeView(getViewport(), old); } if (_columnFooter != null) { JideSwingUtilities.synchronizeView(_columnFooter, getViewport(), SwingConstants.HORIZONTAL); JideSwingUtilities.synchronizeView(getViewport(), _columnFooter, SwingConstants.HORIZONTAL); } }