/** Overridden - JTable's implementation of the method will * actually attach (and leave behind) a gratuitous border * on the enclosing scroll pane. */ @Override 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; } JTableHeader jth = getTableHeader(); if (jth != null) { jth.setBorder(null); } scrollPane.setColumnHeaderView(jth); } } }
/** 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; } JTableHeader jth = getTableHeader(); if (jth != null) { jth.setBorder(null); } scrollPane.setColumnHeaderView(jth); } } }
/** 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; } JTableHeader jth = getTableHeader(); if (jth != null) { jth.setBorder(null); } scrollPane.setColumnHeaderView(jth); } } }
protected void processFocusEvent (FocusEvent fe) { super.processFocusEvent(fe); //Remove the editor here if the new focus owner is not //known to the table & the focus event is not temporary if (fe.getID() == fe.FOCUS_LOST && !fe.isTemporary() && !inRemoveRequest && !inEditRequest) { boolean stopEditing = (fe.getOppositeComponent() != getParent() && !isKnownComponent(fe.getOppositeComponent()) && fe.getOppositeComponent() != null); if (stopEditing) { removeEditor(); } } //The UI will only repaint the lead selection, but we need to //paint all selected rows for the color to change when focus //is lost/gained if (!inRemoveRequest && !inEditRequest) { repaintSelection(fe.getID() == fe.FOCUS_GAINED); } }
protected void processFocusEvent (FocusEvent fe) { super.processFocusEvent(fe); //Remove the editor here if the new focus owner is not //known to the table & the focus event is not temporary if (fe.getID() == fe.FOCUS_LOST && !fe.isTemporary() && !inRemoveRequest && !inEditRequest) { boolean stopEditing = (fe.getOppositeComponent() != getParent() && !isKnownComponent(fe.getOppositeComponent()) && fe.getOppositeComponent() != null); if (stopEditing) { removeEditor(); } } //The UI will only repaint the lead selection, but we need to //paint all selected rows for the color to change when focus //is lost/gained if (!inRemoveRequest && !inEditRequest) { repaintSelection(fe.getID() == fe.FOCUS_GAINED); } }
@Override protected void processFocusEvent(FocusEvent fe) { super.processFocusEvent(fe); //Remove the editor here if the new focus owner is not //known to the table & the focus event is not temporary if ((fe.getID() == FocusEvent.FOCUS_LOST) && !fe.isTemporary() && !inRemoveRequest && !inEditRequest) { boolean stopEditing = ((fe.getOppositeComponent() != getParent()) && !isKnownComponent(fe.getOppositeComponent()) && (fe.getOppositeComponent() != null)); if (stopEditing) { removeEditor(); } } //The UI will only repaint the lead selection, but we need to //paint all selected rows for the color to change when focus //is lost/gained if (!inRemoveRequest && !inEditRequest) { repaintSelection(fe.getID() == FocusEvent.FOCUS_GAINED); } }
? ancestor.getFocusTraversalPolicy().getComponentAfter(ancestor, TreeTable.this.getParent()) : ancestor.getFocusTraversalPolicy().getComponentBefore(ancestor, TreeTable.this);
TreeTable.this.getParent()) : ancestor.getFocusTraversalPolicy().getComponentBefore(ancestor, TreeTable.this);
TreeTable.this.getParent()) : ancestor.getFocusTraversalPolicy().getComponentBefore(ancestor, TreeTable.this);