Top Description Fields Constructors Methods
org.jabref.gui.maintable

public Class SmartConstrainedResizePolicy

extends Object
implements Callback<TableView.ResizeFeatures<S>, Boolean>
Class Inheritance
All Implemented Interfaces
javafx.util.Callback
Imports
java.lang.reflect.Field, .InvocationTargetException, .Method, java.util.List, javafx.scene.control.ResizeFeaturesBase, .TableColumnBase, .TableView, javafx.util.Callback, org.slf4j.Logger, .LoggerFactory

This resize policy is almost the same as TableView#CONSTRAINED_RESIZE_POLICY We make sure that the width of all columns sums up to the total width of the table. However, in contrast to TableView#CONSTRAINED_RESIZE_POLICY we size the columns initially by their preferred width.

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Boolean
call(TableView.ResizeFeatures<S>
The single argument upon which the returned value should be determined.
prop
)

Implements javafx.util.Callback.call.

The call method is called when required, and is given a single argument of type P, with a requirement that an object of type R is returned.

private Boolean
private Boolean
constrainedResize(TableView.ResizeFeatures<S> prop, Boolean isFirstRun, Double contentWidth, List<? extends TableColumnBase<?, ?>> visibleLeafColumns)

private Double
private Boolean
private void
resize(TableColumnBase<S, T> column, double delta)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

SmartConstrainedResizePolicyback to summary
public SmartConstrainedResizePolicy()

Method Detail

callback to summary
public Boolean call(TableView.ResizeFeatures<S> prop)

Implements javafx.util.Callback.call.

Doc from javafx.util.Callback.call.

The call method is called when required, and is given a single argument of type P, with a requirement that an object of type R is returned.

Parameters
prop:TableView.ResizeFeatures<S>

The single argument upon which the returned value should be determined.

Returns:Boolean

An object of type R that may be determined based on the provided parameter value.

Annotations
@Override
constrainedResizeback to summary
private Boolean constrainedResize(TableView.ResizeFeatures<?> prop)
constrainedResizeback to summary
private Boolean constrainedResize(TableView.ResizeFeatures<S> prop, Boolean isFirstRun, Double contentWidth, List<? extends TableColumnBase<?, ?>> visibleLeafColumns)
getContentWidthback to summary
private Double getContentWidth(TableView<?> table)
initColumnSizeback to summary
private Boolean initColumnSize(TableView<?> table)
resizeback to summary
private void resize(TableColumnBase<S, T> column, double delta)