< prev index next >
modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TreeTableViewSkin.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 349,364 ****
double headerWidth = headerTextWidth + headerGraphicWidth + 10 + header.snappedLeftInset() + header.snappedRightInset();
maxWidth = Math.max(maxWidth, headerWidth);
// RT-23486
maxWidth += padding;
! if(treeTableView.getColumnResizePolicy() == TreeTableView.CONSTRAINED_RESIZE_POLICY) {
! maxWidth = Math.max(maxWidth, col.getWidth());
}
col.impl_setWidth(maxWidth);
}
/** {@inheritDoc} */
@Override public int getItemCount() {
return treeTableView.getExpandedItemCount();
}
--- 349,375 ----
double headerWidth = headerTextWidth + headerGraphicWidth + 10 + header.snappedLeftInset() + header.snappedRightInset();
maxWidth = Math.max(maxWidth, headerWidth);
// RT-23486
maxWidth += padding;
! if (treeTableView.getColumnResizePolicy() == TreeTableView.CONSTRAINED_RESIZE_POLICY && treeTableView.getWidth() > 0) {
!
! if (maxWidth > tc.getMaxWidth()) {
! maxWidth = tc.getMaxWidth();
! }
!
! int size = tc.getColumns().size();
! if (size > 0) {
! resizeColumnToFitContent(tc.getColumns().get(size - 1), maxRows);
! return;
}
+ resizeColumn(tc, Math.round(maxWidth - tc.getWidth()));
+ } else {
col.impl_setWidth(maxWidth);
}
+ }
/** {@inheritDoc} */
@Override public int getItemCount() {
return treeTableView.getExpandedItemCount();
}
< prev index next >