Class LogAxisModel
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.visualization.core.axis.AbstractAxisModel
-
- adams.gui.visualization.core.axis.LogAxisModel
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,Serializable
public class LogAxisModel extends AbstractAxisModel
An axis model for displaying ln values.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.visualization.core.axis.AbstractAxisModel
m_ActualMaximum, m_ActualMaximumNoMargin, m_ActualMinimum, m_ActualMinimumNoMargin, m_CustomerFormatter, m_Formatter, m_ManualMarginBottom, m_ManualMarginTop, m_ManualMaximum, m_ManualMinimum, m_MarginBottom, m_MarginTop, m_Maximum, m_Minimum, m_NthValueToShow, m_Parent, m_PixelOffset, m_PixelOffsets, m_TickGenerator, m_Validated, m_ZoomHandler
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description LogAxisModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
adjustMaximum(double max)
Adjusts the maximum to work with this model.double
adjustMinimum(double min)
Adjusts the minimum to work with this model.boolean
canHandle(double min, double max)
Checks whether the data range can be handled by the model.protected String
doValueToDisplay(double value)
Returns the display string of the value for the tooltip, for instance.String
getDisplayName()
Returns the display name of this model.double
posToValue(int pos)
Returns the value for the given position on the axis.int
valueToPos(double value)
Returns the position on the axis for the given value.-
Methods inherited from class adams.gui.visualization.core.axis.AbstractAxisModel
assign, canAssignFormatter, canZoom, clearZoom, getActualFormatter, getActualMaximum, getActualMaximumNoMargin, getActualMinimum, getActualMinimumNoMargin, getBottomMargin, getCustomFormatter, getDefaultFormatter, getDefaultNumberFormat, getManualBottomMargin, getManualMaximum, getManualMinimum, getManualTopMargin, getMaximum, getMinimum, getMinZoomDifference, getNthValueToShow, getNumberFormat, getParent, getPixelOffset, getTickGenerator, getTicks, getTopMargin, hasCustomFormatter, initialize, invalidate, isZoomed, popZoom, pushZoom, setBottomMargin, setCustomFormatter, setManualBottomMargin, setManualMaximum, setManualMinimum, setManualTopMargin, setMaximum, setMinimum, setNthValueToShow, setNumberFormat, setParent, setPixelOffset, setTickGenerator, setTopMargin, toString, update, validate, valueToDisplay
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
canHandle
public boolean canHandle(double min, double max)
Checks whether the data range can be handled by the model.- Specified by:
canHandle
in classAbstractAxisModel
- Parameters:
min
- the minimum valuemax
- the maximum value- Returns:
- false if data range contains negative values
-
adjustMinimum
public double adjustMinimum(double min)
Adjusts the minimum to work with this model.- Specified by:
adjustMinimum
in classAbstractAxisModel
- Parameters:
min
- the minimum to adjust- Returns:
- the updated value
-
adjustMaximum
public double adjustMaximum(double max)
Adjusts the maximum to work with this model.- Specified by:
adjustMaximum
in classAbstractAxisModel
- Parameters:
max
- the maximum to adjust- Returns:
- the updated value
-
getDisplayName
public String getDisplayName()
Returns the display name of this model.- Specified by:
getDisplayName
in classAbstractAxisModel
- Returns:
- the display name
-
doValueToDisplay
protected String doValueToDisplay(double value)
Returns the display string of the value for the tooltip, for instance.- Specified by:
doValueToDisplay
in classAbstractAxisModel
- Parameters:
value
- the value to turn into string- Returns:
- the display string
-
valueToPos
public int valueToPos(double value)
Returns the position on the axis for the given value.- Specified by:
valueToPos
in classAbstractAxisModel
- Parameters:
value
- the value to get the position for- Returns:
- the corresponding position
-
posToValue
public double posToValue(int pos)
Returns the value for the given position on the axis.- Specified by:
posToValue
in classAbstractAxisModel
- Parameters:
pos
- the position to get the corresponding value for- Returns:
- the corresponding value
-
-