Package adams.gui.core.spreadsheettable
Class MultiCellRenderingCustomizer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.core.spreadsheettable.AbstractCellRenderingCustomizer
-
- adams.gui.core.spreadsheettable.MultiCellRenderingCustomizer
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,CellRenderingCustomizer
,Serializable
public class MultiCellRenderingCustomizer extends AbstractCellRenderingCustomizer
Applies the sub-renderers sequentially.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CellRenderingCustomizer[]
m_Renderers
the sub-renderers to use.-
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 MultiCellRenderingCustomizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.Color
getBackgroundColor(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, Color defColor)
For customizing the background color of a cell.Color
getForegroundColor(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, Color defColor)
For customizing the foreground 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.CellRenderingCustomizer[]
getRenderers()
Returns the sub-renderers.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.String
renderersTipText()
Returns the tip text for this property.void
setRenderers(CellRenderingCustomizer[] value)
Sets the sub-renderers.-
Methods inherited from class adams.gui.core.spreadsheettable.AbstractCellRenderingCustomizer
getFont
-
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
-
-
-
-
Field Detail
-
m_Renderers
protected CellRenderingCustomizer[] m_Renderers
the sub-renderers to use.
-
-
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
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setRenderers
public void setRenderers(CellRenderingCustomizer[] value)
Sets the sub-renderers.- Parameters:
value
- the renderers
-
getRenderers
public CellRenderingCustomizer[] getRenderers()
Returns the sub-renderers.- Returns:
- the renderers
-
renderersTipText
public String renderersTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getForegroundColor
public Color getForegroundColor(SpreadSheetTable table, boolean isSelected, boolean hasFocus, int row, int column, Cell cell, Color defColor)
For customizing the foreground color of a cell.- Specified by:
getForegroundColor
in interfaceCellRenderingCustomizer
- Overrides:
getForegroundColor
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
-
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
-
-