
public abstract class LazyCanvasResizer extends ComponentAdapter
| Modifier and Type | Field and Description | 
|---|---|
| (package private) double | activeRatioLast ratio of the Canvas applied | 
| (package private) Component | componentComponent the ratio applies to. | 
| static double | DEFAULT_THRESHOLDDefault threshold for resizing. | 
| (package private) double | thresholdActive 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, componentShownpublic 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_THRESHOLDcomponent - Component to track.public void componentResized(ComponentEvent e)
componentResized in interface ComponentListenercomponentResized in class ComponentAdapterpublic final double getCurrentRatio()
public abstract void executeResize(double newratio)
newratio - New ratio to apply.public double getActiveRatio()