public class JSparklinesTableCellRenderer extends JLabel implements TableCellRenderer
| Modifier and Type | Class and Description |
|---|---|
static class |
JSparklinesTableCellRenderer.PlotType
List of supported plot types.
|
JLabel.AccessibleJLabelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategylistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WESTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
JSparklinesTableCellRenderer(JSparklinesTableCellRenderer.PlotType plotType,
org.jfree.chart.plot.PlotOrientation plotOrientation)
Creates a new JSparkLinesTableCellRenderer.
|
JSparklinesTableCellRenderer(JSparklinesTableCellRenderer.PlotType plotType,
org.jfree.chart.plot.PlotOrientation plotOrientation,
Double maxValue)
Creates a new JSparkLinesTableCellRenderer.
|
JSparklinesTableCellRenderer(JSparklinesTableCellRenderer.PlotType plotType,
org.jfree.chart.plot.PlotOrientation plotOrientation,
Double minValue,
Double maxValue)
Creates a new JSparkLinesTableCellRenderer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReferenceArea(ReferenceArea referenceArea)
Add a reference area.
|
void |
addReferenceArea(String label,
double start,
double end,
Color areaColor,
float alpha)
Add a reference area.
|
void |
addReferenceLine(ReferenceLine referenceLine)
Add a reference line at a given data value.
|
void |
addReferenceLine(String label,
double value,
float lineWidth,
Color lineColor)
Add a reference line at a given data value.
|
HashMap<String,ReferenceArea> |
getAllReferenceAreas()
Returns all the references areas as a hashmap, with the labels as the keys.
|
HashMap<String,ReferenceLine> |
getAllReferenceLines()
Returns all the references lines as a hashmap, with the labels as the keys.
|
org.jfree.chart.ChartPanel |
getChartPanel()
Returns a reference to the chart panel.
|
Color |
getDownColor()
Get the color used for the 'down values' in the Up/Down charts and the negative values in the difference plots..
|
Color |
getMaxValueColor()
Get the color used to highlight the maximum values in the charts.
|
Color |
getMinValueColor()
Get the color used to highlight the minimum values in the charts.
|
org.jfree.chart.plot.PlotOrientation |
getPlotOrientation()
Get the current plot orientation.
|
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) |
Color |
getUpColor()
Get the color used for the 'up values' in the Up/Down charts and the positive values in the difference plots..
|
void |
removeAllReferenceAreas()
Removes all the reference areas.
|
void |
removeAllReferenceLines()
Removes all the reference lines.
|
void |
removeReferenceArea(String label)
Removes the reference area with the given label.
|
void |
removeReferenceLine(String label)
Removes the reference line with the given label.
|
void |
setBackgroundColor(Color color)
Set the background color.
|
void |
setDownColor(Color downColor)
Set the color used for the 'down values' in the Up/Down charts and the negative values in the difference plots..
|
void |
setMaxValue(double maxValue)
Set the maximum value.
|
void |
setMaxValueColor(Color maxValueColor)
Set the color used to highlight the maximum values in the charts.
|
void |
setMinValue(double minValue)
Set the minimum value.
|
void |
setMinValueColor(Color minValueColor)
Set the color used to highlight the minimum values in the charts and the positive values in the difference
plots..
|
void |
setPlotOrientation(org.jfree.chart.plot.PlotOrientation plotOrientation)
Set the plot orientation.
|
void |
setPlotType(JSparklinesTableCellRenderer.PlotType plotType)
Sets the plot type.
|
void |
setUpColor(Color upColor)
Set the color used for the 'up values' in the Up/Down charts.
|
void |
showNumberAndChart(boolean showNumberAndChart,
int widthOfLabel)
If true the number will be shown together with the bar chart in the cell.
|
void |
showNumberAndChart(boolean showNumberAndChart,
int widthOfLabel,
DecimalFormat numberFormat)
If true the number will be shown together with the bar chart in the cell.
|
void |
showNumberAndChart(boolean showNumberAndChart,
int widthOfLabel,
Font font,
int horizontalAlignement)
If true the number will be shown together with the bar chart in the cell.
|
void |
showNumberAndChart(boolean showNumberAndChart,
int widthOfLabel,
Font font,
int horizontalAlignement,
DecimalFormat numberFormat)
If true the number will be shown together with the bar chart in the cell.
|
void |
showNumbers(boolean showNumbers)
Set if the underlying numbers or the bar charts are to be shown.
|
void |
showProteinSequenceReferenceLine(boolean showProteinSequenceReferenceLine)
If true, a black reference line is added to the protein sequence plots.
|
void |
showProteinSequenceReferenceLine(boolean showProteinSequenceReferenceLine,
double lineWidth,
Color color)
If true, a black reference line is shown in the middle of the plot.
|
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic JSparklinesTableCellRenderer(JSparklinesTableCellRenderer.PlotType plotType, org.jfree.chart.plot.PlotOrientation plotOrientation)
plotType - the plot typeplotOrientation - the orientation of the plotpublic JSparklinesTableCellRenderer(JSparklinesTableCellRenderer.PlotType plotType, org.jfree.chart.plot.PlotOrientation plotOrientation, Double maxValue)
plotType - the plot typeplotOrientation - the orientation of the plotmaxValue - the maximum value to be plotted, used to make sure that all plots in the same column has the same
maximum value and are thus comparable (this is the same as setting the minimum value to 0)public JSparklinesTableCellRenderer(JSparklinesTableCellRenderer.PlotType plotType, org.jfree.chart.plot.PlotOrientation plotOrientation, Double minValue, Double maxValue)
plotType - the plot typeplotOrientation - the orientation of the plotminValue - the minimum value to be plotted, used to make sure that all plots in the same column has the same
maximum value and are thus comparablemaxValue - the maximum value to be plotted, used to make sure that all plots in the same column has the same
maximum value and are thus comparablepublic void showNumberAndChart(boolean showNumberAndChart,
int widthOfLabel)
showNumberAndChart - if true the number and the chart is shown in the cellwidthOfLabel - the width used to display the label containing the numberpublic void showNumberAndChart(boolean showNumberAndChart,
int widthOfLabel,
DecimalFormat numberFormat)
showNumberAndChart - if true the number and the chart is shown in the cellwidthOfLabel - the width used to display the label containing the numbernumberFormat - the decimal format to use when showing the numberspublic void showNumberAndChart(boolean showNumberAndChart,
int widthOfLabel,
Font font,
int horizontalAlignement)
showNumberAndChart - if true the number and the chart is shown in the cellwidthOfLabel - the width used to display the label containing the numberfont - the font to use for the labelhorizontalAlignement - the horizontal alignment of the text in the label: one of the following constants defined in
SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.public void showNumberAndChart(boolean showNumberAndChart,
int widthOfLabel,
Font font,
int horizontalAlignement,
DecimalFormat numberFormat)
showNumberAndChart - if true the number and the chart is shown in the cellwidthOfLabel - the width used to display the label containing the numberfont - the font to use for the labelhorizontalAlignement - the horizontal alignment of the text in the label: one of the following constants defined in
SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.numberFormat - the decimal format to use when showing the numberspublic void showNumbers(boolean showNumbers)
showNumbers - if true the underlying numbers are shownpublic void showProteinSequenceReferenceLine(boolean showProteinSequenceReferenceLine)
showProteinSequenceReferenceLine - if true, a black reference line is added to the protein sequence plotspublic void showProteinSequenceReferenceLine(boolean showProteinSequenceReferenceLine,
double lineWidth,
Color color)
showProteinSequenceReferenceLine - if true, a black reference line is shown in the middle of the plotlineWidth - the line widthcolor - the colorpublic Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent in interface TableCellRendererpublic void addReferenceLine(String label, double value, float lineWidth, Color lineColor)
label - the label for the referencevalue - the reference line valuelineWidth - the line width, has to non-negativelineColor - the line colorpublic void addReferenceLine(ReferenceLine referenceLine)
referenceLine - the reference linepublic void removeReferenceLine(String label)
label - the reference to removepublic void removeAllReferenceLines()
public HashMap<String,ReferenceLine> getAllReferenceLines()
public void addReferenceArea(String label, double start, double end, Color areaColor, float alpha)
label - the label for the reference areastart - the start of the reference areaend - the end of the reference areaareaColor - the color of the reference areaalpha - the alpha level of the reference area, range: 0.0 to 1.0public void addReferenceArea(ReferenceArea referenceArea)
referenceArea - the reference areapublic void removeReferenceArea(String label)
label - the reference to removepublic void removeAllReferenceAreas()
public HashMap<String,ReferenceArea> getAllReferenceAreas()
public void setMaxValue(double maxValue)
maxValue - the maximum valuepublic void setMinValue(double minValue)
minValue - the minimum valuepublic void setPlotType(JSparklinesTableCellRenderer.PlotType plotType)
plotType - the plotType to setpublic Color getMaxValueColor()
public void setMaxValueColor(Color maxValueColor)
maxValueColor - the color to setpublic Color getMinValueColor()
public void setMinValueColor(Color minValueColor)
minValueColor - the color to setpublic Color getUpColor()
public void setUpColor(Color upColor)
upColor - the color for the 'up values' in the Up/Down chartspublic Color getDownColor()
public void setDownColor(Color downColor)
downColor - the color for the 'down values' in the Up/Down chartspublic org.jfree.chart.plot.PlotOrientation getPlotOrientation()
public void setPlotOrientation(org.jfree.chart.plot.PlotOrientation plotOrientation)
plotOrientation - the new plot orientationpublic org.jfree.chart.ChartPanel getChartPanel()
public void setBackgroundColor(Color color)
color - the new background colorCopyright © 2022. All rights reserved.