/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
private int originalHeaderAlignment;
protected int sortColumn;
protected int sortOrder;
return new AquaTableHeaderUI();
}
public void installDefaults() {
super.installDefaults();
}
}
public void uninstallDefaults() {
}
super.uninstallDefaults();
}
final static RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
}
},
}
}
);
}
};
return TABLE_HEADER_APPLICATORS.get();
}
static void tickle(final JTableHeader target, final Object selectedColumn, final Object direction) {
if (tableColumn == null) return;
int sortDirection = 0;
sortDirection = 1;
sortDirection = -1;
}
}
public Component getTableCellRendererComponent(final JTable localTable, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) {
if (localTable != null) {
}
}
// Modify the table "border" to draw smaller, and with the titles in the right position
final boolean thisColumnSelected = localTable.getColumnModel().getColumn(column).getModelIndex() == sortColumn;
if (thisColumnSelected) {
} else {
}
return this;
}
}
}
protected static AquaTableHeaderBorder getAquaBorderFrom(final JTableHeader header, final TableColumn column) {
final Component c = renderer.getTableCellRendererComponent(header.getTable(), column.getHeaderValue(), false, false, -1, column.getModelIndex());
if (!(c instanceof JComponent)) return null;
return (AquaTableHeaderBorder)border;
}
protected void installListeners() {
super.installListeners();
}
protected void uninstallListeners() {
super.uninstallListeners();
}
private int getHeaderHeightAqua() {
int height = 0;
boolean accomodatedDefault = false;
// Configuring the header renderer to calculate its preferred size is expensive.
// Optimise this by assuming the default renderer always has the same height.
// If the header value is empty (== "") in the
// first column (and this column is set up
// to use the default renderer) we will
// return zero from this routine and the header
// will disappear altogether. Avoiding the calculation
// of the preferred size is such a performance win for
// most applications that we will continue to
// use this cheaper calculation, handling these
// issues as `edge cases'.
// Mac OS X Change - since we have a border on our renderers
// it is possible the height of an empty header could be > 0,
// so we chose the relatively safe number of 4 to handle this case.
// Now if we get a size of 4 or less we assume it is empty and measure
// a different header.
if (rendererHeight > 4) {
accomodatedDefault = true;
}
}
}
return height;
}
}
return renderer.getTableCellRendererComponent(header.getTable(), aColumn.getHeaderValue(), false, false, -1, columnIndex);
}
// None of the callers include the intercell spacing, do it here.
}
}
/**
* Return the minimum size of the header. The minimum width is the sum of the minimum widths of each column (plus
* inter-cell spacing).
*/
long width = 0;
while (enumeration.hasMoreElements()) {
}
return createHeaderSizeAqua(width);
}
/**
* Return the preferred size of the header. The preferred height is the maximum of the preferred heights of all of
* the components provided by the header renderers. The preferred width is the sum of the preferred widths of each
* column (plus inter-cell spacing).
*/
long width = 0;
while (enumeration.hasMoreElements()) {
}
return createHeaderSizeAqua(width);
}
}