public abstract class LazyCanvasResizer extends ComponentAdapter
Modifier and Type | Field and Description |
---|---|
(package private) double |
activeRatio
Last ratio of the Canvas applied
|
(package private) 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(Component component)
Simplified constructor using the default threshold
DEFAULT_THRESHOLD |
LazyCanvasResizer(Component component,
double threshold)
Full constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
componentResized(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.
|
componentHidden, componentMoved, componentShown
public static final double DEFAULT_THRESHOLD
double threshold
double activeRatio
Component component
public LazyCanvasResizer(Component component, double threshold)
component
- Component to trackthreshold
- Thresholdpublic LazyCanvasResizer(Component component)
DEFAULT_THRESHOLD
component
- Component to track.public void componentResized(ComponentEvent e)
componentResized
in interface ComponentListener
componentResized
in class ComponentAdapter
public final double getCurrentRatio()
public abstract void executeResize(double newratio)
newratio
- New ratio to apply.public double getActiveRatio()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.