< prev index next >
modules/controls/src/main/java/javafx/scene/control/TableColumnBase.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2012, 2015, 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, 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,58 ****
--- 49,59 ----
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,106 ****
--- 98,118 ----
* @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,423 ****
@Override protected void invalidated() {
if (getMinWidth() < 0) {
setMinWidth(0.0F);
}
! impl_setWidth(getWidth());
}
};
}
return minWidth;
}
--- 425,435 ----
@Override protected void invalidated() {
if (getMinWidth() < 0) {
setMinWidth(0.0F);
}
! doSetWidth(getWidth());
}
};
}
return minWidth;
}
*** 430,440 ****
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());
}
};
// --- Maximum Width
--- 442,452 ----
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() {
! doSetWidth(getPrefWidth());
}
};
// --- Maximum Width
*** 446,456 ****
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());
}
};
// --- Resizable
--- 458,468 ----
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() {
! doSetWidth(getWidth());
}
};
// --- Resizable
*** 751,766 ****
* *
* 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) {
setWidth(Utils.boundedSize(width, getMinWidth(), getMaxWidth()));
}
void updateColumnWidths() {
if (! getColumns().isEmpty()) {
--- 763,773 ----
* *
* Private Implementation *
* *
**************************************************************************/
! void doSetWidth(double width) {
setWidth(Utils.boundedSize(width, getMinWidth(), getMaxWidth()));
}
void updateColumnWidths() {
if (! getColumns().isEmpty()) {
< prev index next >