< prev index next >
modules/controls/src/main/java/javafx/scene/control/TableColumnBase.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -49,10 +49,11 @@
import javafx.event.EventTarget;
import javafx.event.EventType;
import javafx.scene.Node;
import com.sun.javafx.event.EventHandlerManager;
+import com.sun.javafx.scene.control.TableColumnBaseHelper;
import java.util.HashMap;
import javafx.beans.property.ReadOnlyDoubleProperty;
import javafx.beans.property.ReadOnlyDoubleWrapper;
import javafx.beans.property.ReadOnlyObjectProperty;
@@ -97,10 +98,21 @@
* @see TablePositionBase
* @since JavaFX 8.0
*/
@IDProperty("id")
public abstract class TableColumnBase<S,T> implements EventTarget, Styleable {
+ static {
+ TableColumnBaseHelper.setTableColumnBaseAccessor(
+ new TableColumnBaseHelper.TableColumnBaseAccessor() {
+
+ @Override
+ public void setWidth(TableColumnBase tableColumnBase, double width) {
+ tableColumnBase.doSetWidth(width);
+ }
+
+ });
+ }
/***************************************************************************
* *
* Static properties and methods *
* *
@@ -413,11 +425,11 @@
@Override protected void invalidated() {
if (getMinWidth() < 0) {
setMinWidth(0.0F);
}
- impl_setWidth(getWidth());
+ doSetWidth(getWidth());
}
};
}
return minWidth;
}
@@ -430,11 +442,11 @@
public final DoubleProperty prefWidthProperty() { return prefWidth; }
public final void setPrefWidth(double value) { prefWidthProperty().set(value); }
public final double getPrefWidth() { return prefWidth.get(); }
private final DoubleProperty prefWidth = new SimpleDoubleProperty(this, "prefWidth", DEFAULT_WIDTH) {
@Override protected void invalidated() {
- impl_setWidth(getPrefWidth());
+ doSetWidth(getPrefWidth());
}
};
// --- Maximum Width
@@ -446,11 +458,11 @@
public final DoubleProperty maxWidthProperty() { return maxWidth; }
public final void setMaxWidth(double value) { maxWidthProperty().set(value); }
public final double getMaxWidth() { return maxWidth.get(); }
private DoubleProperty maxWidth = new SimpleDoubleProperty(this, "maxWidth", DEFAULT_MAX_WIDTH) {
@Override protected void invalidated() {
- impl_setWidth(getWidth());
+ doSetWidth(getWidth());
}
};
// --- Resizable
@@ -751,16 +763,11 @@
* *
* Private Implementation *
* *
**************************************************************************/
- /**
- * @treatAsPrivate implementation detail
- * @deprecated This is an internal API that is not intended for use and will be removed in the next version
- */
- @Deprecated
- public void impl_setWidth(double width) {
+ void doSetWidth(double width) {
setWidth(Utils.boundedSize(width, getMinWidth(), getMaxWidth()));
}
void updateColumnWidths() {
if (! getColumns().isEmpty()) {
< prev index next >