Ontimize 5.2072EN

com.ontimize.gui.table
Class IconCellRenderer

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JLabel
                  extended byjavax.swing.table.DefaultTableCellRenderer
                      extended bycom.ontimize.gui.table.CellRenderer
                          extended bycom.ontimize.gui.table.IconCellRenderer
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, Internationalization, java.awt.MenuContainer, java.io.Serializable, javax.swing.SwingConstants, javax.swing.table.TableCellRenderer
Direct Known Subclasses:
FileExtensionCellRenderer

public class IconCellRenderer
extends CellRenderer
implements Internationalization

See Also:
Serialized Form

Nested Class Summary
protected  class IconCellRenderer.ImgObserver
           
 
Nested classes inherited from class com.ontimize.gui.table.CellRenderer
CellRenderer.CellRendererColorManager, CellRenderer.CellRendererFontManager
 
Nested classes inherited from class javax.swing.table.DefaultTableCellRenderer
javax.swing.table.DefaultTableCellRenderer.UIResource
 
Nested classes inherited from class javax.swing.JLabel
javax.swing.JLabel.AccessibleJLabel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String ICON
           
protected  java.util.Hashtable icons
           
protected  IconCellRenderer.ImgObserver observer
           
protected  java.util.ResourceBundle resourceFile
           
static java.lang.String SHOW_TEXT
           
protected  boolean showText
           
protected  javax.swing.JTable[] tables
           
protected  boolean translate
           
static java.lang.String TRANSLATE
           
static java.lang.String URL
           
 
Fields inherited from class com.ontimize.gui.table.CellRenderer
CELLRENDERER_NAME, cellRendererColorManager, cellRendererFontManager, component, configureRenderer, editableFontColor, emptyBorder, evenEditableBackgroundColor, evenRowBackgroundColor, focusBorder, focusBorderColor, font, fontColor, format, noRequiredInsertColumns, oddEditableBackgroundColor, oddRowBackgroundColor, prefSize, remarkEditable, remarkLines, requiredInsertColumns, selectedBackgroundColor, selectedEditableBackgroundColor, selectedFontColor
 
Fields inherited from class javax.swing.table.DefaultTableCellRenderer
noFocusBorder
 
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
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, 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
IconCellRenderer(java.util.Hashtable parameters)
           
IconCellRenderer(java.lang.String uriProperties)
           
IconCellRenderer(java.lang.String uriProperties, boolean showText)
           
IconCellRenderer(java.lang.String uriProperties, boolean showText, boolean translate)
           
 
Method Summary
protected  void configureIcon(java.lang.String uriProperties)
           
 java.lang.String getDefaultIcon()
           
 java.awt.Dimension getPreferredSize()
           
 java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean selected, boolean hasFocus, int row, int column)
           
 java.util.Vector getTextsToTranslate()
          Returns all the texts in the element suitable for being translated.
 void setComponentLocale(java.util.Locale l)
           
 void setDefaultIcon(java.lang.String s)
           
 void setResourceBundle(java.util.ResourceBundle res)
          Sets the language resource bundle.
 
Methods inherited from class com.ontimize.gui.table.CellRenderer
calculatePreferredTextWidth, calculatePreferredTextWidth, getDarker, getDefaultFocusBorder, getEvenRowBackgroundColor, getFont, getFontMetrics, getName, getShownText, getSoftDarker, isInsertingRow, isRequiredInsertingRow, setCellRendererColorManager, setCellRendererFontManager, setEditableRemark, setEvenRowBackgroundColor, setFormater, setJComponent, setLineRemark, setTipWhenNeeded, updateUI
 
Methods inherited from class javax.swing.table.DefaultTableCellRenderer
firePropertyChange, firePropertyChange, isOpaque, repaint, repaint, revalidate, setBackground, setForeground, setValue, validate
 
Methods inherited from class javax.swing.JLabel
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
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ICON

public static final java.lang.String ICON
See Also:
Constant Field Values

URL

public static final java.lang.String URL
See Also:
Constant Field Values

SHOW_TEXT

public static final java.lang.String SHOW_TEXT
See Also:
Constant Field Values

TRANSLATE

public static final java.lang.String TRANSLATE
See Also:
Constant Field Values

icons

protected java.util.Hashtable icons

showText

protected boolean showText

translate

protected boolean translate

tables

protected javax.swing.JTable[] tables

resourceFile

protected java.util.ResourceBundle resourceFile

observer

protected IconCellRenderer.ImgObserver observer
Constructor Detail

IconCellRenderer

public IconCellRenderer(java.lang.String uriProperties)
                 throws java.lang.Exception

IconCellRenderer

public IconCellRenderer(java.lang.String uriProperties,
                        boolean showText)
                 throws java.lang.Exception

IconCellRenderer

public IconCellRenderer(java.util.Hashtable parameters)
                 throws java.lang.Exception

IconCellRenderer

public IconCellRenderer(java.lang.String uriProperties,
                        boolean showText,
                        boolean translate)
                 throws java.lang.Exception
Method Detail

configureIcon

protected void configureIcon(java.lang.String uriProperties)
                      throws java.io.IOException
Throws:
java.io.IOException

getTableCellRendererComponent

public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
                                                        java.lang.Object value,
                                                        boolean selected,
                                                        boolean hasFocus,
                                                        int row,
                                                        int column)
Specified by:
getTableCellRendererComponent in interface javax.swing.table.TableCellRenderer
Overrides:
getTableCellRendererComponent in class CellRenderer

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class CellRenderer

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle res)
Description copied from interface: Internationalization
Sets the language resource bundle. When the application changes the configured language, for all the objects that implement this interface this method must be called with the new file.
The method must translate all the elements that have texts in the GUI

Specified by:
setResourceBundle in interface Internationalization
Parameters:
res - the new language bundle.

setComponentLocale

public void setComponentLocale(java.util.Locale l)
Specified by:
setComponentLocale in interface Internationalization

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Description copied from interface: Internationalization
Returns all the texts in the element suitable for being translated.

Specified by:
getTextsToTranslate in interface Internationalization
Returns:
all the texts in the element suitable for being translated.

setDefaultIcon

public void setDefaultIcon(java.lang.String s)

getDefaultIcon

public java.lang.String getDefaultIcon()

Ontimize