agjava.gui
Class ProgressCellRenderer

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JProgressBar
                          |
                          +--agjava.gui.ProgressCellRenderer
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.swing.SwingConstants, javax.swing.table.TableCellRenderer

public class ProgressCellRenderer
extends javax.swing.JProgressBar
implements javax.swing.table.TableCellRenderer

Supports progress bar in table cells.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ProgressCellRenderer()
          Creates a progress cell renedere for percent.
 
Method Summary
 void addCellEditorListener(javax.swing.event.CellEditorListener e)
           
 void cancelCellEditing()
           
 void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
          Overridden for performance reasons.
 java.lang.Object getCellEditorValue()
           
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable a, java.lang.Object b, boolean c, int d, int e)
           
 java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
          Returns the default table cell renderer.
 boolean isCellEditable(java.util.EventObject o)
           
 boolean isCellEditable(int row, int column)
           
 void removeCellEditorListener(javax.swing.event.CellEditorListener e)
           
 void repaint(long tm, int x, int y, int width, int height)
          Overridden for performance reasons.
 void repaint(java.awt.Rectangle r)
          Overridden for performance reasons.
 void revalidate()
          Overridden for performance reasons.
 void setBackground(java.awt.Color c)
          Overrides JComponent.setForeground to assign the unselected-background color to the specified color.
 void setPor(int val)
           
 boolean shouldSelectCell(java.util.EventObject o)
           
 boolean stopCellEditing()
           
 void updateUI()
          Notification from the UIManager that the look and feel [L&F] has changed.
 void validate()
          Overridden for performance reasons.
 
Methods inherited from class javax.swing.JProgressBar
addChangeListener, getAccessibleContext, getMaximum, getMinimum, getModel, getOrientation, getPercentComplete, getString, getUI, getUIClassID, getValue, isBorderPainted, isStringPainted, removeChangeListener, setBorderPainted, setMaximum, setMinimum, setModel, setOrientation, setString, setStringPainted, setUI, setValue
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setLayout
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProgressCellRenderer

public ProgressCellRenderer()
Creates a progress cell renedere for percent. Max is 100, min is 0
Method Detail

addCellEditorListener

public void addCellEditorListener(javax.swing.event.CellEditorListener e)

cancelCellEditing

public void cancelCellEditing()

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               boolean oldValue,
                               boolean newValue)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
firePropertyChange in class javax.swing.JComponent

getCellEditorValue

public java.lang.Object getCellEditorValue()

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(javax.swing.JTable a,
                                                      java.lang.Object b,
                                                      boolean c,
                                                      int d,
                                                      int e)

getTableCellRendererComponent

public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
                                                        java.lang.Object value,
                                                        boolean isSelected,
                                                        boolean hasFocus,
                                                        int row,
                                                        int column)
Returns the default table cell renderer.
Specified by:
getTableCellRendererComponent in interface javax.swing.table.TableCellRenderer
Parameters:
table - the JTable
value - the value to assign to the cell at [row, column]
isSelected - true if cell is selected
isFocus - true if cell has focus
row - the row of the cell to render
column - the column of the cell to render
Returns:
the default table cell renderer

isCellEditable

public boolean isCellEditable(java.util.EventObject o)

isCellEditable

public boolean isCellEditable(int row,
                              int column)

removeCellEditorListener

public void removeCellEditorListener(javax.swing.event.CellEditorListener e)

repaint

public void repaint(long tm,
                    int x,
                    int y,
                    int width,
                    int height)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
repaint in class javax.swing.JComponent

repaint

public void repaint(java.awt.Rectangle r)
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
repaint in class javax.swing.JComponent

revalidate

public void revalidate()
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
revalidate in class javax.swing.JComponent

setBackground

public void setBackground(java.awt.Color c)
Overrides JComponent.setForeground to assign the unselected-background color to the specified color.
Overrides:
setBackground in class javax.swing.JComponent
Parameters:
c - set the background color to this value

setPor

public void setPor(int val)

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject o)

stopCellEditing

public boolean stopCellEditing()

updateUI

public void updateUI()
Notification from the UIManager that the look and feel [L&F] has changed. Replaces the current UI object with the latest version from the UIManager.
Overrides:
updateUI in class javax.swing.JProgressBar
See Also:
JComponent.updateUI()

validate

public void validate()
Overridden for performance reasons. See the Implementation Note for more information.
Overrides:
validate in class java.awt.Container