Bean Builder

com.adventnet.beans.probeans.renderer
Class ProListViewTableRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLabel
                          |
                          +--com.adventnet.beans.probeans.renderer.ProListViewTableRenderer

public class ProListViewTableRenderer
extends javax.swing.JLabel
implements javax.swing.table.TableCellRenderer, java.io.Serializable

NMSTable cell renderer which support the changing of colors.

Since:
1.0
Version:
1.0
Author:
Arun Kumar I
See Also:
JLabel, TableCellRenderer, Serialized Form

Inner classes inherited from class javax.swing.JLabel
javax.swing.JLabel.AccessibleJLabel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Fields inherited from class javax.swing.JLabel
labelFor
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
ProListViewTableRenderer()
          Creates a new ProListViewTableRenderer instance.
ProListViewTableRenderer(boolean defaultColors)
          Creates a new ProListViewTableRenderer instance.
ProListViewTableRenderer(java.awt.Color selectBkColor, java.awt.Color selectFrColor, java.awt.Color notSelectBkColor, java.awt.Color notSelectFrColor)
          Constructor which takes in the color specifications as Arguments.
 
Method Summary
 java.awt.Color[] getCellBackgroundColours()
          Return's the Cell Background Colours.
 java.awt.Font[] getCellFonts()
          Return's the Cell Fonts.
 java.awt.Color[] getCellForegroundColours()
          Return's the Cell Foreground Colours.
 javax.swing.ImageIcon[] getCellIcons()
          Return's the Cell Icons for the table.
 boolean getDefaultColors()
          returns the state whether the default color is set or not.
 boolean getDefaultFont()
          Return's the Font property.
 java.awt.Color getNormalBackgroundColor()
          return the NotSelected Background Color
 java.awt.Font getNormalFont()
          Return's the Default Font property.
 java.awt.Color getNormalForegroundColor()
          return the NotSelected Foreground Color
 javax.swing.ImageIcon getNormalIcon()
          Return's the Normal Icon used .
 java.awt.Color getSelectionBackgroundColor()
          return's the Selection Background Color
 java.awt.Font getSelectionFont()
          Return's the Selection Font property .
 java.awt.Color getSelectionForegroundColor()
          return the Selection Foreground Color
 javax.swing.ImageIcon getSelectionIcon()
          Return's the Selection Icon for the table.
 java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
          Interface implementation.
 void setCellBackgroundColours(java.awt.Color[] colors)
          Set's the Cell Background Colours .
 void setCellFonts(java.awt.Font[] cellFonts)
          Set's the Cell Fonts.
 void setCellForegroundColours(java.awt.Color[] colors)
          Set's the Cell Foreground Colours.
 void setCellIcons(javax.swing.ImageIcon[] cellIcons)
          Set's the Cell Icons for the table.
 void setDefaultColors(boolean booleanArg)
          set true to implement default color settings.
 void setDefaultFont(boolean defaultFont)
          Set the Font property.
 void setNormalBackgroundColor(java.awt.Color color)
          set's the NotSelected Background Color
 void setNormalFont(java.awt.Font font)
          Set's the Default Font property.
 void setNormalForegroundColor(java.awt.Color color)
          set's the NotSelected Foreground Color
 void setNormalIcon(javax.swing.ImageIcon icon)
          Set a Normal Icon for the table.
 void setSelectionBackgroundColor(java.awt.Color color)
          set's the Selection Background Color
 void setSelectionFont(java.awt.Font selectionFont)
          Set's the Selection Font property.
 void setSelectionForegroundColor(java.awt.Color color)
          set's the Selection Foreground Color
 void setSelectionIcon(javax.swing.ImageIcon selectionIcon)
          Set's the Selection Icon for the table.
 
Methods inherited from class javax.swing.JLabel
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProListViewTableRenderer

public ProListViewTableRenderer()
Creates a new ProListViewTableRenderer instance.

ProListViewTableRenderer

public ProListViewTableRenderer(boolean defaultColors)
Creates a new ProListViewTableRenderer instance.
Parameters:
defaultColors - a boolean value

ProListViewTableRenderer

public ProListViewTableRenderer(java.awt.Color selectBkColor,
                                java.awt.Color selectFrColor,
                                java.awt.Color notSelectBkColor,
                                java.awt.Color notSelectFrColor)
Constructor which takes in the color specifications as Arguments.
Parameters:
selectBkColor - a Color value
selectFrColor - a Color value
notSelectBkColor - a Color value
notSelectFrColor - a Color value
Method Detail

getTableCellRendererComponent

public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
                                                        java.lang.Object value,
                                                        boolean isSelected,
                                                        boolean hasFocus,
                                                        int row,
                                                        int column)
Interface implementation.
Specified by:
getTableCellRendererComponent in interface javax.swing.table.TableCellRenderer
Parameters:
table - a JTable value
value - an Object value
isSelected - a boolean value
hasFocus - a boolean value
row - an int value
column - an int value
Returns:
a Component value

setSelectionBackgroundColor

public void setSelectionBackgroundColor(java.awt.Color color)
set's the Selection Background Color
Parameters:
color - a Color value

getSelectionBackgroundColor

public java.awt.Color getSelectionBackgroundColor()
return's the Selection Background Color
Returns:
a Color value

setSelectionForegroundColor

public void setSelectionForegroundColor(java.awt.Color color)
set's the Selection Foreground Color
Parameters:
color - a Color value

getSelectionForegroundColor

public java.awt.Color getSelectionForegroundColor()
return the Selection Foreground Color
Returns:
a Color value

setNormalBackgroundColor

public void setNormalBackgroundColor(java.awt.Color color)
set's the NotSelected Background Color
Parameters:
color - a Color value

getNormalBackgroundColor

public java.awt.Color getNormalBackgroundColor()
return the NotSelected Background Color
Returns:
a Color value

setNormalForegroundColor

public void setNormalForegroundColor(java.awt.Color color)
set's the NotSelected Foreground Color
Parameters:
color - a Color value

getNormalForegroundColor

public java.awt.Color getNormalForegroundColor()
return the NotSelected Foreground Color
Returns:
a Color value

setDefaultColors

public void setDefaultColors(boolean booleanArg)
set true to implement default color settings.
Parameters:
booleanArg - a boolean value

getDefaultColors

public boolean getDefaultColors()
returns the state whether the default color is set or not.
Returns:
a boolean value

setCellBackgroundColours

public void setCellBackgroundColours(java.awt.Color[] colors)
Set's the Cell Background Colours .
Parameters:
colors - a Color[] value

getCellBackgroundColours

public java.awt.Color[] getCellBackgroundColours()
Return's the Cell Background Colours.
Returns:
a Color[] value

setCellForegroundColours

public void setCellForegroundColours(java.awt.Color[] colors)
Set's the Cell Foreground Colours.
Parameters:
colors - a Color[] value

getCellForegroundColours

public java.awt.Color[] getCellForegroundColours()
Return's the Cell Foreground Colours.
Returns:
a Color[] value

getDefaultFont

public boolean getDefaultFont()
Return's the Font property.
Returns:
a boolean value

setDefaultFont

public void setDefaultFont(boolean defaultFont)
Set the Font property.
Parameters:
defaultFont - a boolean value

getNormalFont

public java.awt.Font getNormalFont()
Return's the Default Font property.
Returns:
a Font value

setNormalFont

public void setNormalFont(java.awt.Font font)
Set's the Default Font property.
Parameters:
font - a Font value

getSelectionFont

public java.awt.Font getSelectionFont()
Return's the Selection Font property .
Returns:
a Font value

setSelectionFont

public void setSelectionFont(java.awt.Font selectionFont)
Set's the Selection Font property.
Parameters:
selectionFont - a Font value

getCellFonts

public java.awt.Font[] getCellFonts()
Return's the Cell Fonts.
Returns:
a Font[] value

setCellFonts

public void setCellFonts(java.awt.Font[] cellFonts)
Set's the Cell Fonts.
Parameters:
cellFonts - a Font[] value

getNormalIcon

public javax.swing.ImageIcon getNormalIcon()
Return's the Normal Icon used .
Returns:
an ImageIcon value

setNormalIcon

public void setNormalIcon(javax.swing.ImageIcon icon)
Set a Normal Icon for the table.
Parameters:
icon - an ImageIcon value

getSelectionIcon

public javax.swing.ImageIcon getSelectionIcon()
Return's the Selection Icon for the table.
Returns:
an ImageIcon value

setSelectionIcon

public void setSelectionIcon(javax.swing.ImageIcon selectionIcon)
Set's the Selection Icon for the table.
Parameters:
selectionIcon - an ImageIcon value

getCellIcons

public javax.swing.ImageIcon[] getCellIcons()
Return's the Cell Icons for the table.
Returns:
an ImageIcon[] value

setCellIcons

public void setCellIcons(javax.swing.ImageIcon[] cellIcons)
Set's the Cell Icons for the table.
Parameters:
cellIcons - an ImageIcon[] value

Bean Builder

© 2001 - 2002 AdventNet Inc. Visit us at: http://www.adventnet.com