Package adams.gui.core.spreadsheettable
Class DefaultCellRenderingCustomizer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.core.spreadsheettable.AbstractCellRenderingCustomizer
-
- adams.gui.core.spreadsheettable.AbstractColoredCellRenderingCustomizer
-
- adams.gui.core.spreadsheettable.DefaultCellRenderingCustomizer
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,CellRenderingCustomizer
,Serializable
public class DefaultCellRenderingCustomizer extends AbstractColoredCellRenderingCustomizer
Default cell rendering customizer.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.core.spreadsheettable.AbstractColoredCellRenderingCustomizer
m_BackgroundNegative, m_BackgroundPositive, m_UseBackgroundNegative, m_UseBackgroundPositive
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description DefaultCellRenderingCustomizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getBackgroundColor(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, Color defColor)
For customizing the background color of a cell.int
getHorizontalAlignment(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, int defAlign)
For customizing the horizontal alignment of a cell.String
getToolTipText(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, String defTip)
For customizing the tooltip text.String
globalInfo()
Returns a string describing the object.-
Methods inherited from class adams.gui.core.spreadsheettable.AbstractColoredCellRenderingCustomizer
backgroundNegativeTipText, backgroundPositiveTipText, defineOptions, getBackgroundNegative, getBackgroundPositive, getDefaultBackgroundNegative, getDefaultBackgroundPositive, getDefaultUseBackgroundNegative, getDefaultUseBackgroundPositive, getUseBackgroundNegative, getUseBackgroundPositive, setBackgroundNegative, setBackgroundPositive, setUseBackgroundNegative, setUseBackgroundPositive, useBackgroundNegativeTipText, useBackgroundPositiveTipText
-
Methods inherited from class adams.gui.core.spreadsheettable.AbstractCellRenderingCustomizer
getFont, getForegroundColor
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
getBackgroundColor
public Color getBackgroundColor(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, Color defColor)
For customizing the background color of a cell.- Specified by:
getBackgroundColor
in interfaceCellRenderingCustomizer
- Overrides:
getBackgroundColor
in classAbstractCellRenderingCustomizer
- Parameters:
table
- the tableisSelected
- whether the cell is selectedhasFocus
- whether the cell is focusedrow
- the current rowcolumn
- the current columncell
- the actual celldefColor
- the default color- Returns:
- the color
-
getToolTipText
public String getToolTipText(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, String defTip)
For customizing the tooltip text.- Specified by:
getToolTipText
in interfaceCellRenderingCustomizer
- Overrides:
getToolTipText
in classAbstractCellRenderingCustomizer
- Parameters:
table
- the tableisSelected
- whether the cell is selectedhasFocus
- whether the cell is focusedrow
- the current rowcolumn
- the current columncell
- the actual celldefTip
- the default tip text- Returns:
- the tip text
-
getHorizontalAlignment
public int getHorizontalAlignment(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, int defAlign)
For customizing the horizontal alignment of a cell.- Specified by:
getHorizontalAlignment
in interfaceCellRenderingCustomizer
- Overrides:
getHorizontalAlignment
in classAbstractCellRenderingCustomizer
- Parameters:
table
- the tableisSelected
- whether the cell is selectedhasFocus
- whether the cell is focusedrow
- the current rowcolumn
- the current columncell
- the actual celldefAlign
- the default alignment- Returns:
- the alignment
-
-