- java.lang.Object
-
- bdv.util.BoundedIntervalDouble
-
- bdv.tools.brightness.MinMaxGroup
-
public class MinMaxGroup extends BoundedIntervalDouble
Adoubleinterval. Theminandmaxof the interval are stored asBoundedValueDouble. The min and max can be changed to span any non-empty interval within the range (BoundedIntervalDouble.getRangeMin(),BoundedIntervalDouble.getRangeMax()). This range can bemodifiedas well.Some
ConverterSetupscan belinked. They will have their display range set according tominandmaxof the interval.An
MinMaxGroup.UpdateListener(usually a GUI component) can be notified about changes.- Author:
- Tobias Pietzsch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMinMaxGroup.UpdateListener
-
Field Summary
-
Fields inherited from class bdv.util.BoundedIntervalDouble
minIntervalSize
-
-
Constructor Summary
Constructors Constructor Description MinMaxGroup(double fullRangeMin, double fullRangeMax, double rangeMin, double rangeMax, double currentMin, double currentMax, double minIntervalSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSetup(ConverterSetup setup)Add aConverterSetupwhich will have itsdisplay rangeupdated to the interval (BoundedIntervalDouble.getMinBoundedValue(),BoundedIntervalDouble.getMaxBoundedValue()).doublegetFullRangeMax()doublegetFullRangeMin()booleanremoveSetup(ConverterSetup setup)Remove aConverterSetupfrom this group.voidsetUpdateListener(MinMaxGroup.UpdateListener l)Set anMinMaxGroup.UpdateListener(usually a GUI component).protected voidupdateInterval(double min, double max)-
Methods inherited from class bdv.util.BoundedIntervalDouble
getMaxBoundedValue, getMinBoundedValue, getRangeMax, getRangeMin, setRange
-
-
-
-
Method Detail
-
updateInterval
protected void updateInterval(double min, double max)Description copied from class:BoundedIntervalDoubleThis is called when theminormaxvalues change. The default implementation does nothing but derived classes can use it to trigger UI updates, etc.- Overrides:
updateIntervalin classBoundedIntervalDouble- Parameters:
min- the new minimum of the intervalmax- the new maximum of the interval
-
getFullRangeMin
public double getFullRangeMin()
-
getFullRangeMax
public double getFullRangeMax()
-
addSetup
public void addSetup(ConverterSetup setup)
Add aConverterSetupwhich will have itsdisplay rangeupdated to the interval (BoundedIntervalDouble.getMinBoundedValue(),BoundedIntervalDouble.getMaxBoundedValue()).- Parameters:
setup-
-
removeSetup
public boolean removeSetup(ConverterSetup setup)
Remove aConverterSetupfrom this group.- Parameters:
setup-- Returns:
- true, if this group is now empty. false otherwise.
-
setUpdateListener
public void setUpdateListener(MinMaxGroup.UpdateListener l)
Set anMinMaxGroup.UpdateListener(usually a GUI component).
-
-