public abstract class LazyCanvasResizer
extends java.awt.event.ComponentAdapter
| Modifier and Type | Field and Description |
|---|---|
(package private) double |
activeRatio
Last ratio of the Canvas applied
|
(package private) java.awt.Component |
component
Component the ratio applies to.
|
static double |
DEFAULT_THRESHOLD
Default threshold for resizing.
|
(package private) double |
threshold
Active threshold
|
| Constructor and Description |
|---|
LazyCanvasResizer(java.awt.Component component)
Simplified constructor using the default threshold
DEFAULT_THRESHOLD |
LazyCanvasResizer(java.awt.Component component,
double threshold)
Full constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
componentResized(java.awt.event.ComponentEvent e)
React to a component resize event.
|
abstract void |
executeResize(double newratio)
Callback function that needs to be overridden with actual implementations.
|
double |
getActiveRatio()
Get the components last applied ratio.
|
double |
getCurrentRatio()
Get the components current ratio.
|
public static final double DEFAULT_THRESHOLD
double threshold
double activeRatio
java.awt.Component component
public LazyCanvasResizer(java.awt.Component component,
double threshold)
component - Component to trackthreshold - Thresholdpublic LazyCanvasResizer(java.awt.Component component)
DEFAULT_THRESHOLDcomponent - Component to track.public void componentResized(java.awt.event.ComponentEvent e)
componentResized in interface java.awt.event.ComponentListenercomponentResized in class java.awt.event.ComponentAdapterpublic final double getCurrentRatio()
public abstract void executeResize(double newratio)
newratio - New ratio to apply.public double getActiveRatio()
Copyright © 2019 ELKI Development Team. License information.