private void hideSearchField() { if (searchField == null) { return; } searchpanel.setVisible(false); if (getParent() instanceof JViewport && null != viewportListener ) { JViewport jvp = (JViewport) getParent(); jvp.removeChangeListener( viewportListener ); viewportListener = null; } getParent().removeComponentListener(searchField); if (searchpanel.getParent() != null) { searchpanel.getParent().remove(searchpanel); } paintSelectionRow(); }
protected int getVisibleRowCount() { int rowCount = getRowCount(); int rowHeight = getRowHeight(); if (rowCount == 0 || rowHeight == 0) { return 0; } if (getParent() instanceof JViewport) { JViewport jvp = (JViewport) getParent(); int result = Math.min (rowCount, jvp.getExtentSize().height / rowHeight); return result; } else { return Math.min(rowCount, getHeight() / rowHeight); } }
protected int getVisibleRowCount() { int rowCount = getRowCount(); int rowHeight = getRowHeight(); if ((rowCount == 0) || (rowHeight == 0)) { return 0; } if (getParent() instanceof JViewport) { JViewport jvp = (JViewport) getParent(); // +1 to return also half-displayed rows (issue 53660) int result = Math.min(rowCount, (jvp.getExtentSize().height / rowHeight) + 1); return result; } else { return Math.min(rowCount, getHeight() / rowHeight); } }
protected int getVisibleRowCount() { int rowCount = getRowCount(); int rowHeight = getRowHeight(); if (rowCount == 0 || rowHeight == 0) { return 0; } if (getParent() instanceof JViewport) { JViewport jvp = (JViewport) getParent(); int result = Math.min (rowCount, jvp.getExtentSize().height / rowHeight); return result; } else { return Math.min(rowCount, getHeight() / rowHeight); } }
public void stateChanged(ChangeEvent e) { if( null != searchField && searchField.isVisible() ) { if( null != prevViewPosition ) repaint( 0, prevViewPosition.y, getWidth(), searchpanel.getHeight() ); assert getParent() instanceof JViewport; prevViewPosition = new Point( ((JViewport)getParent()).getViewPosition() ); } } };
/** Overridden - JTable's implementation of the method will * actually attach (and leave behind) a gratuitous border * on the enclosing scroll pane. */ protected final void configureEnclosingScrollPane() { Container p = getParent(); if (p instanceof JViewport) { Container gp = p.getParent(); if (gp instanceof JScrollPane) { JScrollPane scrollPane = (JScrollPane)gp; JViewport viewport = scrollPane.getViewport(); if (viewport == null || viewport.getView() != this) { return; } scrollPane.setColumnHeaderView(getTableHeader()); } } }
/** Overridden - JTable's implementation of the method will * actually attach (and leave behind) a gratuitous border * on the enclosing scroll pane. */ protected final void configureEnclosingScrollPane() { Container p = getParent(); if (p instanceof JViewport) { Container gp = p.getParent(); if (gp instanceof JScrollPane) { JScrollPane scrollPane = (JScrollPane) gp; JViewport viewport = scrollPane.getViewport(); if ((viewport == null) || (viewport.getView() != this)) { return; } scrollPane.setColumnHeaderView(getTableHeader()); } } }
/** Overridden - JTable's implementation of the method will * actually attach (and leave behind) a gratuitous border * on the enclosing scroll pane. */ protected final void configureEnclosingScrollPane() { Container p = getParent(); if (p instanceof JViewport) { Container gp = p.getParent(); if (gp instanceof JScrollPane) { JScrollPane scrollPane = (JScrollPane)gp; JViewport viewport = scrollPane.getViewport(); if (viewport == null || viewport.getView() != this) { return; } scrollPane.setColumnHeaderView(getTableHeader()); } } }
BaseTable.this.getParent()) : ancestor.getFocusTraversalPolicy().getComponentBefore(ancestor, BaseTable.this);
BaseTable.this.getParent()) : ancestor.getFocusTraversalPolicy().getComponentBefore(ancestor, BaseTable.this);
? ancestor.getFocusTraversalPolicy().getComponentAfter(ancestor, BaseTable.this.getParent()) : ancestor.getFocusTraversalPolicy().getComponentBefore(ancestor, BaseTable.this);