ElegantJ Data Tables Java API Specification v1.1

com.elegantj.jfc.list
Class JFCList

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JList
                  extended bycom.elegantj.jfc.list.JFCList
All Implemented Interfaces:
javax.accessibility.Accessible, java.io.Externalizable, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable

public class JFCList
extends javax.swing.JList
implements java.io.Externalizable

This bean component allows the user to get the look and feel of JList.

This bean provides powerful designing aspects by providing following user friendly properties
VisibleRowCount the preferred number of visible rows
FixedCellHeight the fixed cell height value
FixedCellWidth the fixed cell width value
SelectionForeground the foreground color for selected cells
SelectionBackground the background color for selected cells
SelectionMode specifies whether single-item or multiple-item selections are allowed
ListData the vector containing the items to display in the list
SelectedItem the string representing the selected item
SelectedIndex the first selected item index
SelectedIndices the selected items indices
SortedList the sorting criteria
DragEnabled whether row can be dragged
DefaultAttributes the default list cell attributes
RowAttributes the list cell attributes of each row

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JList
javax.swing.JList.AccessibleJList
 
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 int ASCENDING_SORT
          Specifies the ascending sorting
 com.elegantj.editors.C1 c1
           
static java.awt.Cursor DEFAULT_MOVE_CURSOR
          Specifies the default drag cursor indicates valid item to move
static int DESCENDING_SORT
          Specifies the descending sorting
static int NONE_SORT
          Specifies the none sorting
 
Fields inherited from class javax.swing.JList
HORIZONTAL_WRAP, VERTICAL, VERTICAL_WRAP
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JFCList()
          Creates a JFCList with a default data model
JFCList(javax.swing.ListModel aModel)
          Creates a JFCList that takes it's items from an existing ListModel
JFCList(java.lang.Object[] items)
          Creates a JFCList that contains the elements in the specified array
JFCList(java.util.Vector items)
          Creates a JFCList that contains the elements in the specified Vector
 
Method Summary
 void addItem(java.lang.Object item)
          Adds the item to the list
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a PropertyChangeListener to the listener list.
 void addSelectionInterval(int anchor, int lead)
          Sets the selection to be the union of the specified interval with current selection.
 void clearRowAttributes()
          Clears the list cell attributes at each row.
static java.util.Hashtable convertAttributesArrayToTable(java.lang.Object[][] attributesArray)
          Converts the Object array contains the cell attributes into Hashtable.
static java.lang.Object[][] convertAttributesTableToArray(java.util.Hashtable attributesTable)
          Converts the Hashtable contains the cell attributes into Object array.
protected  RowCellRenderer createCellRenderer()
          Returns the cell renderer which can allow to set the row wise attributes
protected  ListCellAttributes createDefaultAttributes()
          Returns the default list cell attributes object, which is a ListCellAttributes.
protected  DefaultJFCListModel createDefaultModel()
          Creates the default list model
protected  java.util.Hashtable createDefaultRowsAttributes()
          Returns the default list cell attributes for each row, which is a Hashtable.
 java.awt.Color getCellBackgroundNonSelectionColor(int row)
          Returns the cell background non selection color at given row
 java.awt.Color getCellBackgroundSelectionColor(int row)
          Returns the cell background selection color at given row
 java.awt.Color getCellBorderSelectionColor(int row)
          Returns the cell border selection color at given row
 java.awt.Font getCellFont(int row)
          Returns the cell font at given row
 javax.swing.Icon getCellIcon(int row)
          Returns the cell icon at given row
 java.lang.String getCellIconPath(int row)
          Returns the cell icon path at given row
 javax.swing.ListCellRenderer getCellRenderer(int row)
          Returns the cell renderer at given row
 java.awt.Color getCellTextNonSelectionColor(int row)
          Returns the cell text non selection color at given row
 java.awt.Color getCellTextSelectionColor(int row)
          Returns the cell text selection color at given row
 ListCellAttributes getDefaultAttributes()
          Gets the default list cell attributes for each row in the list,
 java.awt.Color getDefaultBackgroundNonSelectionColor()
          Gets the default deselected background color
 java.awt.Color getDefaultBackgroundSelectionColor()
          Gets the default selected background color
 java.awt.Color getDefaultBorderSelectionColor()
          Gets the default selected border color
 javax.swing.ListCellRenderer getDefaultCellRenderer()
          Gets the default cell renderer
 java.awt.Color getDefaultFocusCellBackground()
          Gets the default focus cell background
 java.awt.Color getDefaultFocusCellForeground()
          Gets the default focus cell foreground
 java.awt.Font getDefaultFont()
          Gets the default cell font
 javax.swing.Icon getDefaultIcon()
          Gets the default icon
 java.lang.String getDefaultIconPath()
          Gets the default icon path
 java.awt.Color getDefaultTextNonSelectionColor()
          Gets the default deselected text color
 java.awt.Color getDefaultTextSelectionColor()
          Gets the default selected text color
 java.awt.Color getFocusCellBackground(int row)
          Returns the cell focus background color at given row
 java.awt.Color getFocusCellForeground(int row)
          Returns the cell focus foreground color at given row
 java.awt.Insets getInsets()
          Gets the insets value for this component
 java.lang.Object getItemAt(int index)
          Gets the item at specified index
 int getItemCount()
          Gets the total number of items in the list
 java.lang.String getLicenseKey()
          Gets the license key
 java.util.Vector getListData()
          Gets the items from the list model return the vector containing the items to display in the list
 java.util.Locale getLocale()
          Returns the value of locale.
 java.util.Hashtable getRowAttributes()
          Gets the cell attributes at each row of the list
 ListCellAttributes getRowAttributes(int row)
          Gets the cell attributes at specified row of the list
 java.awt.Color getRowBackgroundNonSelectionColor(int row)
          Gets the deselected background color at row
 java.awt.Color getRowBackgroundSelectionColor(int row)
          Gets the selected background color at row
 java.awt.Color getRowBorderSelectionColor(int row)
          Gets the selected border color at row
 javax.swing.ListCellRenderer getRowCellRenderer(int row)
          Gets the cell renderer at row
 java.awt.Color getRowFocusCellBackground(int row)
          Gets the focus cell background at row
 java.awt.Color getRowFocusCellForeground(int row)
          Gets the focus cell foreground at row
 java.awt.Font getRowFont(int row)
          Gets the cell font at row
 javax.swing.Icon getRowIcon(int row)
          Gets the icon at row
 java.lang.String getRowIconPath(int row)
          Gets the icon path at row
 java.awt.Color getRowTextNonSelectionColor(int row)
          Gets the deselected text color at row
 java.awt.Color getRowTextSelectionColor(int row)
          Gets the selected text color at row
 java.lang.String getSelectedItem()
          Gets the selected item
 int getSortedList()
          Gets the sorting criteria
 void insertItemAt(java.lang.Object item, int index)
          Inserts the specified item at the specified index
 boolean isDragEnabled()
          Gets true if row can be dragged in the list
 boolean isLightweight()
          Returns whether this component has a lightweight peer, native peer or no peer.
protected  boolean isNavigationKey(int keyCode)
          Returns whether or not the supplied keyCode maps to a key that is used for navigation.
 void moveItem(int oldIndex, int newIndex)
          Moves the item
protected  void processKeyEvent(java.awt.event.KeyEvent e)
          Processes key events occurring on this component by dispatching them to any registered KeyListener objects
protected  void processMouseEvent(java.awt.event.MouseEvent e)
          Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects
protected  void processMouseMotionEvent(java.awt.event.MouseEvent e)
          Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects
 void readExternal(java.io.ObjectInput in)
          Externalizable interface implementation to save and retrieve the state of this bean
 void removeAllItems()
          Removes the all items from the list
 void removeItem(java.lang.Object item)
          Removes the specified item from the list
 void removeItemAt(int index)
          Removes the item at specified index from the list
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a PropertyChangeListener from the listener list.
 boolean selectWithKeyChar(char keyChar)
          Selects the list item that correponds to the specified keyboard character and returns true, if there is an item corresponding to that character.
 void setAutoscrolls(boolean b)
          Sets whether this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling
 void setBackground(java.awt.Color c)
          Sets the Background color.
 void setBorder(javax.swing.border.Border b)
          Sets the border of this component.
 void setBounds(int x, int y, int width, int height)
          Moves and resizes this bean.
 void setCellRenderer(javax.swing.ListCellRenderer renderer)
          Sets the delegate that's used to paint each cell in the list.
 void setCursor(java.awt.Cursor c)
          Sets value of the cursor.
 void setDefaultAttributes(ListCellAttributes defaultAttributes)
          Sets the default list cell attributes for each row in the list, it can be applicable if the row wise list cell attributes are not set.
 void setDefaultBackgroundNonSelectionColor(java.awt.Color color)
          Sets the default deselected background color
 void setDefaultBackgroundSelectionColor(java.awt.Color color)
          Sets the default selected background color
 void setDefaultBorderSelectionColor(java.awt.Color color)
          Sets the default selected border color
 void setDefaultCellRenderer(javax.swing.ListCellRenderer renderer)
          Sets the default cell renderer
 void setDefaultFocusCellBackground(java.awt.Color color)
          Sets the default focus cell background
 void setDefaultFocusCellForeground(java.awt.Color color)
          Sets the default focus cell foreground
 void setDefaultFont(java.awt.Font font)
          Sets the default cell font
 void setDefaultIcon(javax.swing.Icon icon)
          Sets default the icon
 void setDefaultIconPath(java.lang.String path)
          Sets the default icon path
 void setDefaultTextNonSelectionColor(java.awt.Color color)
          Sets the default deselected text color
 void setDefaultTextSelectionColor(java.awt.Color color)
          Sets the deafult selected text color
 void setDoubleBuffered(boolean b)
          Sets whether the receiving component should use a buffer to paint.
 void setDragEnabled(boolean b)
          Sets true if row can be dragged in the list Dragged row is moved to dragged position
 void setEnabled(boolean b)
          sets Enablity.
 void setFixedCellHeight(int n)
          Sets the height of every cell in the list.
 void setFixedCellWidth(int n)
          Sets the width of every cell in the list.
 void setFont(java.awt.Font f)
          Sets the font.
 void setForeground(java.awt.Color c)
          Sets the Foreground color.
 void setInsets(java.awt.Insets i)
          Sets the insets value for this component
 void setItemAt(java.lang.Object item, int index)
          Sets the specified item at specified index in the list
 void setLayout(java.awt.LayoutManager mgr)
          Sets the layout manager for this component.
 void setLicenseKey(java.lang.String key)
          Sets the license key
 void setLightweight(boolean b)
          Sets whether this component has a lightweight peer, native peer or no peer.
 void setListData(java.lang.Object[] listData)
          Constructs a ListModel from an array of objects and then applies setModel to it.
 void setListData(java.util.Vector vect)
          Sets a ListModel from a Vector and then applies setModel to it
 void setLocale(java.util.Locale l)
          Sets value of the locale.
 void setModel(javax.swing.ListModel model)
          Sets the list model that will provide the data.
 void setOpaque(boolean b)
          Sets whether this component paints every pixel within its bounds.
 void setRequestFocusEnabled(boolean b)
          Sets whether the receiving component can obtain the focus by calling requestFocus.
 void setRowAttributes(java.util.Hashtable attributesTable)
          Sets the cell attributes at each row of the list, It has the maximum priority.
 void setRowAttributes(ListCellAttributes rowAttributes, int row)
          Sets the cell attributes at specified row of the list
 void setRowBackgroundNonSelectionColor(java.awt.Color color, int row)
          Sets the deselected background color at row
 void setRowBackgroundSelectionColor(java.awt.Color color, int row)
          Sets the selected background color at row
 void setRowBorderSelectionColor(java.awt.Color color, int row)
          Sets the selected border color at row
 void setRowCellRenderer(javax.swing.ListCellRenderer renderer, int row)
          Sets the cell renderer at row
 void setRowFocusCellBackground(java.awt.Color color, int row)
          Sets the focus cell background at row
 void setRowFocusCellForeground(java.awt.Color color, int row)
          Sets the focus cell foreground at row
 void setRowFont(java.awt.Font font, int row)
          Sets the cell font at row
 void setRowIcon(javax.swing.Icon icon, int row)
          Sets the icon at row
 void setRowIconPath(java.lang.String path, int row)
          Sets the icon path at row
 void setRowTextNonSelectionColor(java.awt.Color color, int row)
          Sets the deselected text color at row
 void setRowTextSelectionColor(java.awt.Color color, int row)
          Sets the selected text color at row
 void setSelectedIndex(int n)
          Selects a single cell.
 void setSelectedIndices(int[] indices)
          Selects a set of cells.
 void setSelectedItem(java.lang.String s)
          Sets the item selected
 void setSelectionInterval(int anchor, int lead)
          Selects the specified interval.
 void setSelectionMode(int n)
          Sets whether single-item or multiple-item selections are allowed.
 void setSortedList(int i)
          Sets the sorting criteria
 void setToolTipText(java.lang.String s)
          Sets the text to display in a tool tip.
 void setVisible(boolean b)
          sets Visiblity.
 void setVisibleRowCount(int n)
          Sets the preferred number of rows in the list that can be displayed without a scollbar
 boolean valueExists(java.lang.String s)
          Determines whether the specified value is exist in the list model.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class javax.swing.JList
addListSelectionListener, clearSelection, createSelectionModel, ensureIndexIsVisible, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getModel, getNextMatch, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getToolTipText, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isSelectedIndex, isSelectionEmpty, locationToIndex, paramString, removeListSelectionListener, removeSelectionInterval, setLayoutOrientation, setPrototypeCellValue, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionModel, setUI, setValueIsAdjusting, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, 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, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setDebugGraphicsOptions, setDefaultLocale, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, 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, transferFocusBackward, transferFocusDownCycle, validate, 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, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, 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

DEFAULT_MOVE_CURSOR

public static java.awt.Cursor DEFAULT_MOVE_CURSOR
Specifies the default drag cursor indicates valid item to move


DESCENDING_SORT

public static final int DESCENDING_SORT
Specifies the descending sorting

See Also:
Constant Field Values

NONE_SORT

public static final int NONE_SORT
Specifies the none sorting

See Also:
Constant Field Values

ASCENDING_SORT

public static final int ASCENDING_SORT
Specifies the ascending sorting

See Also:
Constant Field Values

c1

public transient com.elegantj.editors.C1 c1
Constructor Detail

JFCList

public JFCList()
Creates a JFCList with a default data model


JFCList

public JFCList(javax.swing.ListModel aModel)
Creates a JFCList that takes it's items from an existing ListModel

Parameters:
aModel - the ListModel that provides the displayed list of items

JFCList

public JFCList(java.lang.Object[] items)
Creates a JFCList that contains the elements in the specified array

Parameters:
items - an array of objects to insert into the list

JFCList

public JFCList(java.util.Vector items)
Creates a JFCList that contains the elements in the specified Vector

Parameters:
items - a vector of items to insert into the list
Method Detail

setLicenseKey

public void setLicenseKey(java.lang.String key)
Sets the license key

Parameters:
key - the license key

getLicenseKey

public java.lang.String getLicenseKey()
Gets the license key

Returns:
the license key

createDefaultModel

protected DefaultJFCListModel createDefaultModel()
Creates the default list model


createCellRenderer

protected RowCellRenderer createCellRenderer()
Returns the cell renderer which can allow to set the row wise attributes

Returns:
the list cell renderer

createDefaultAttributes

protected ListCellAttributes createDefaultAttributes()
Returns the default list cell attributes object, which is a ListCellAttributes. A subclass can override this method to return a different list cell attributes object.

Returns:
the default list cell attributes object

setDefaultAttributes

public void setDefaultAttributes(ListCellAttributes defaultAttributes)
Sets the default list cell attributes for each row in the list, it can be applicable if the row wise list cell attributes are not set.

Parameters:
defaultAttributes - the default list cell attributes

getDefaultAttributes

public ListCellAttributes getDefaultAttributes()
Gets the default list cell attributes for each row in the list,

Returns:
the default list cell attributes

setDefaultTextSelectionColor

public void setDefaultTextSelectionColor(java.awt.Color color)
Sets the deafult selected text color

Parameters:
color - the default selected text color

getDefaultTextSelectionColor

public java.awt.Color getDefaultTextSelectionColor()
Gets the default selected text color

Returns:
the default selected text color

setDefaultTextNonSelectionColor

public void setDefaultTextNonSelectionColor(java.awt.Color color)
Sets the default deselected text color

Parameters:
color - the default deselected text color

getDefaultTextNonSelectionColor

public java.awt.Color getDefaultTextNonSelectionColor()
Gets the default deselected text color

Returns:
the default deselected text color

setDefaultBackgroundSelectionColor

public void setDefaultBackgroundSelectionColor(java.awt.Color color)
Sets the default selected background color

Parameters:
color - the default selected background color

getDefaultBackgroundSelectionColor

public java.awt.Color getDefaultBackgroundSelectionColor()
Gets the default selected background color

Returns:
the default selected background color

setDefaultBackgroundNonSelectionColor

public void setDefaultBackgroundNonSelectionColor(java.awt.Color color)
Sets the default deselected background color

Parameters:
color - the default deselected background color

getDefaultBackgroundNonSelectionColor

public java.awt.Color getDefaultBackgroundNonSelectionColor()
Gets the default deselected background color

Returns:
the deselected background color

setDefaultBorderSelectionColor

public void setDefaultBorderSelectionColor(java.awt.Color color)
Sets the default selected border color

Parameters:
color - the default selected border color

getDefaultBorderSelectionColor

public java.awt.Color getDefaultBorderSelectionColor()
Gets the default selected border color

Returns:
the default selected border color

setDefaultFocusCellBackground

public void setDefaultFocusCellBackground(java.awt.Color color)
Sets the default focus cell background

Parameters:
color - the default focus cell background

getDefaultFocusCellBackground

public java.awt.Color getDefaultFocusCellBackground()
Gets the default focus cell background

Returns:
the default focus cell background

setDefaultFocusCellForeground

public void setDefaultFocusCellForeground(java.awt.Color color)
Sets the default focus cell foreground

Parameters:
color - the default focus cell foreground

getDefaultFocusCellForeground

public java.awt.Color getDefaultFocusCellForeground()
Gets the default focus cell foreground

Returns:
the default focus cell foreground

setDefaultFont

public void setDefaultFont(java.awt.Font font)
Sets the default cell font

Parameters:
font - default the cell font

getDefaultFont

public java.awt.Font getDefaultFont()
Gets the default cell font

Returns:
the default cell font

setDefaultIcon

public void setDefaultIcon(javax.swing.Icon icon)
Sets default the icon

Parameters:
icon - the default icon

getDefaultIcon

public javax.swing.Icon getDefaultIcon()
Gets the default icon

Returns:
the default icon

setDefaultIconPath

public void setDefaultIconPath(java.lang.String path)
Sets the default icon path

Parameters:
path - the default icon path

getDefaultIconPath

public java.lang.String getDefaultIconPath()
Gets the default icon path

Returns:
the default icon path

setDefaultCellRenderer

public void setDefaultCellRenderer(javax.swing.ListCellRenderer renderer)
Sets the default cell renderer

Parameters:
renderer - the default cell renderer

getDefaultCellRenderer

public javax.swing.ListCellRenderer getDefaultCellRenderer()
Gets the default cell renderer

Returns:
the default cell renderer

setRowAttributes

public void setRowAttributes(java.util.Hashtable attributesTable)
Sets the cell attributes at each row of the list, It has the maximum priority. If default cell attributes and row cell attributes are set, the row cell attributes are applied to the list cell. A Hashtable contains the row index as a key and that row cell attributes as a value.

Parameters:
attributesTable - the cell attributes at each row

getRowAttributes

public java.util.Hashtable getRowAttributes()
Gets the cell attributes at each row of the list

Returns:
the cell attributes at each row

clearRowAttributes

public void clearRowAttributes()
Clears the list cell attributes at each row.


createDefaultRowsAttributes

protected java.util.Hashtable createDefaultRowsAttributes()
Returns the default list cell attributes for each row, which is a Hashtable. A subclass can override this method to return a different list cell attributes for each row.

Returns:
the default list cell attributes for each row

setRowAttributes

public void setRowAttributes(ListCellAttributes rowAttributes,
                             int row)
Sets the cell attributes at specified row of the list

Parameters:
rowAttributes - the cell attributes at specified row

getRowAttributes

public ListCellAttributes getRowAttributes(int row)
Gets the cell attributes at specified row of the list

Returns:
the cell attributes at specified row

setRowTextSelectionColor

public void setRowTextSelectionColor(java.awt.Color color,
                                     int row)
Sets the selected text color at row

Parameters:
color - the selected text color
row - the row

getRowTextSelectionColor

public java.awt.Color getRowTextSelectionColor(int row)
Gets the selected text color at row

Parameters:
row - the row
Returns:
the selected text color

setRowTextNonSelectionColor

public void setRowTextNonSelectionColor(java.awt.Color color,
                                        int row)
Sets the deselected text color at row

Parameters:
color - the deselected text color
row - the row

getRowTextNonSelectionColor

public java.awt.Color getRowTextNonSelectionColor(int row)
Gets the deselected text color at row

Parameters:
row - the row
Returns:
the deselected text color

setRowBackgroundSelectionColor

public void setRowBackgroundSelectionColor(java.awt.Color color,
                                           int row)
Sets the selected background color at row

Parameters:
color - the selected background color
row - the row

getRowBackgroundSelectionColor

public java.awt.Color getRowBackgroundSelectionColor(int row)
Gets the selected background color at row

Parameters:
row - the row
Returns:
the selected background color

setRowBackgroundNonSelectionColor

public void setRowBackgroundNonSelectionColor(java.awt.Color color,
                                              int row)
Sets the deselected background color at row

Parameters:
color - the deselected background color
row - the row

getRowBackgroundNonSelectionColor

public java.awt.Color getRowBackgroundNonSelectionColor(int row)
Gets the deselected background color at row

Parameters:
row - the row
Returns:
the deselected background color

setRowBorderSelectionColor

public void setRowBorderSelectionColor(java.awt.Color color,
                                       int row)
Sets the selected border color at row

Parameters:
color - the selected border color
row - the row

getRowBorderSelectionColor

public java.awt.Color getRowBorderSelectionColor(int row)
Gets the selected border color at row

Parameters:
row - the row
Returns:
the selected border color

setRowFocusCellBackground

public void setRowFocusCellBackground(java.awt.Color color,
                                      int row)
Sets the focus cell background at row

Parameters:
color - the focus cell background
row - the row index

getRowFocusCellBackground

public java.awt.Color getRowFocusCellBackground(int row)
Gets the focus cell background at row

Parameters:
row - the row index
Returns:
the focus cell background

setRowFocusCellForeground

public void setRowFocusCellForeground(java.awt.Color color,
                                      int row)
Sets the focus cell foreground at row

Parameters:
color - the focus cell foreground
row - the row index

getRowFocusCellForeground

public java.awt.Color getRowFocusCellForeground(int row)
Gets the focus cell foreground at row

Parameters:
row - the row index
Returns:
the focus cell foreground

setRowFont

public void setRowFont(java.awt.Font font,
                       int row)
Sets the cell font at row

Parameters:
font - the cell font
row - the row index

getRowFont

public java.awt.Font getRowFont(int row)
Gets the cell font at row

Parameters:
row - the row index
Returns:
the cell font

setRowIcon

public void setRowIcon(javax.swing.Icon icon,
                       int row)
Sets the icon at row

Parameters:
icon - the icon
row - the row

getRowIcon

public javax.swing.Icon getRowIcon(int row)
Gets the icon at row

Parameters:
row - the row
Returns:
the icon

setRowIconPath

public void setRowIconPath(java.lang.String path,
                           int row)
Sets the icon path at row

Parameters:
path - the icon path
row - the row

getRowIconPath

public java.lang.String getRowIconPath(int row)
Gets the icon path at row

Parameters:
row - the row
Returns:
the icon path

setRowCellRenderer

public void setRowCellRenderer(javax.swing.ListCellRenderer renderer,
                               int row)
Sets the cell renderer at row

Parameters:
renderer - the cell renderer
row - the row

getRowCellRenderer

public javax.swing.ListCellRenderer getRowCellRenderer(int row)
Gets the cell renderer at row

Parameters:
row - the row
Returns:
the cell renderer

getCellBackgroundSelectionColor

public java.awt.Color getCellBackgroundSelectionColor(int row)
Returns the cell background selection color at given row

Parameters:
row - the row index
Returns:
the cell background selection color

getCellBackgroundNonSelectionColor

public java.awt.Color getCellBackgroundNonSelectionColor(int row)
Returns the cell background non selection color at given row

Parameters:
row - the row index
Returns:
the cell background non selectioncolor

getCellTextSelectionColor

public java.awt.Color getCellTextSelectionColor(int row)
Returns the cell text selection color at given row

Parameters:
row - the row index
Returns:
the cell text selection color

getCellTextNonSelectionColor

public java.awt.Color getCellTextNonSelectionColor(int row)
Returns the cell text non selection color at given row

Parameters:
row - the row index
Returns:
the cell text non selection color

getCellBorderSelectionColor

public java.awt.Color getCellBorderSelectionColor(int row)
Returns the cell border selection color at given row

Parameters:
row - the row index
Returns:
the cell border selection color

getFocusCellBackground

public java.awt.Color getFocusCellBackground(int row)
Returns the cell focus background color at given row

Parameters:
row - the row index
Returns:
the cell focus background color

getFocusCellForeground

public java.awt.Color getFocusCellForeground(int row)
Returns the cell focus foreground color at given row

Parameters:
row - the row index
Returns:
the cell focus foreground color

getCellFont

public java.awt.Font getCellFont(int row)
Returns the cell font at given row

Parameters:
row - the row index
Returns:
the cell font

getCellIcon

public javax.swing.Icon getCellIcon(int row)
Returns the cell icon at given row

Parameters:
row - the row index
Returns:
the cell icon

getCellIconPath

public java.lang.String getCellIconPath(int row)
Returns the cell icon path at given row

Parameters:
row - the row index
Returns:
the cell icon path

getCellRenderer

public javax.swing.ListCellRenderer getCellRenderer(int row)
Returns the cell renderer at given row

Parameters:
row - the row index
Returns:
the cell renderer

convertAttributesTableToArray

public static java.lang.Object[][] convertAttributesTableToArray(java.util.Hashtable attributesTable)
Converts the Hashtable contains the cell attributes into Object array.

Parameters:
attributesTable - the Hashtable containing the cell attributes
Returns:
the Object array

convertAttributesArrayToTable

public static java.util.Hashtable convertAttributesArrayToTable(java.lang.Object[][] attributesArray)
Converts the Object array contains the cell attributes into Hashtable.

Parameters:
attributesArray - the Object array containing the cell attributes
Returns:
the Hashtable

getListData

public java.util.Vector getListData()
Gets the items from the list model return the vector containing the items to display in the list


setSelectedItem

public void setSelectedItem(java.lang.String s)
Sets the item selected

Parameters:
s - the item to be selected

getSelectedItem

public java.lang.String getSelectedItem()
Gets the selected item

Returns:
the selected item

setSortedList

public void setSortedList(int i)
Sets the sorting criteria

Parameters:
i - one of the constants : ASCENDING_SORT, DESCENDING_SORT, NONE_SORT

getSortedList

public int getSortedList()
Gets the sorting criteria

Returns:
the sorting criteria

valueExists

public boolean valueExists(java.lang.String s)
Determines whether the specified value is exist in the list model.

Returns:
true if the value is exist otherwise false

addItem

public void addItem(java.lang.Object item)
Adds the item to the list

Parameters:
item - the item to added

getItemAt

public java.lang.Object getItemAt(int index)
Gets the item at specified index

Parameters:
index - the index of the item
Returns:
the item at specified index

getItemCount

public int getItemCount()
Gets the total number of items in the list

Returns:
the size of the list

insertItemAt

public void insertItemAt(java.lang.Object item,
                         int index)
Inserts the specified item at the specified index

Parameters:
item - the item to be inserted
index - the insertion index

removeAllItems

public void removeAllItems()
Removes the all items from the list


removeItem

public void removeItem(java.lang.Object item)
Removes the specified item from the list

Parameters:
item - the item to be removed

removeItemAt

public void removeItemAt(int index)
Removes the item at specified index from the list

Parameters:
index - the removal index

setItemAt

public void setItemAt(java.lang.Object item,
                      int index)
Sets the specified item at specified index in the list

Parameters:
item - an item
index - an index of the item

moveItem

public void moveItem(int oldIndex,
                     int newIndex)
Moves the item

Parameters:
oldIndex - the index of the item to be moved
newIndex - the new index of the item

setDragEnabled

public void setDragEnabled(boolean b)
Sets true if row can be dragged in the list Dragged row is moved to dragged position

Parameters:
b - true, if row can be dragged

isDragEnabled

public boolean isDragEnabled()
Gets true if row can be dragged in the list

Returns:
true, if row can be dragged

selectWithKeyChar

public boolean selectWithKeyChar(char keyChar)
Selects the list item that correponds to the specified keyboard character and returns true, if there is an item corresponding to that character. Otherwise, returns false.

Parameters:
keyChar - a char, typically this is a keyboard key typed by the user

isNavigationKey

protected boolean isNavigationKey(int keyCode)
Returns whether or not the supplied keyCode maps to a key that is used for navigation. This is used for optimizing key input by only passing non- navigation keys to the type-ahead mechanism. Subclasses should override this if they change the navigation keys.


setModel

public void setModel(javax.swing.ListModel model)
Sets the list model that will provide the data.

Parameters:
model - the ListModel that is to provide the data

setVisibleRowCount

public void setVisibleRowCount(int n)
Sets the preferred number of rows in the list that can be displayed without a scollbar

Parameters:
n - an integer specifying the preferred number of visible rows, default 8

setFixedCellHeight

public void setFixedCellHeight(int n)
Sets the height of every cell in the list. If height is -1, cell heights are computed by applying getPreferredSize to the cellRenderer component for each list element

Parameters:
n - an integer giving the height, in pixels, for all cells in this list, default -1

setFixedCellWidth

public void setFixedCellWidth(int n)
Sets the width of every cell in the list. If width is -1, cell widths are computed by applying getPreferredSize to the cellRenderer component for each list element

Parameters:
n - an integer giving the width, in pixels, for all cells in this list, default -1

setSelectionMode

public void setSelectionMode(int n)
Sets whether single-item or multiple-item selections are allowed. One of the following values are allowed:

Parameters:
n - an integer specifying the type of selections that are permissible

setListData

public void setListData(java.util.Vector vect)
Sets a ListModel from a Vector and then applies setModel to it

Parameters:
vect - a Vector containing the items to display in the list

setListData

public void setListData(java.lang.Object[] listData)
Constructs a ListModel from an array of objects and then applies setModel to it.

Parameters:
listData - an array of Objects containing the items to display in the list

setSelectedIndex

public void setSelectedIndex(int n)
Selects a single cell.

Parameters:
n - the index of the one cell to select

setSelectedIndices

public void setSelectedIndices(int[] indices)
Selects a set of cells.

Parameters:
indices - an array of the indices of the cells to select

setCellRenderer

public void setCellRenderer(javax.swing.ListCellRenderer renderer)
Sets the delegate that's used to paint each cell in the list.

Parameters:
renderer - the ListCellRenderer that paints list cells

addSelectionInterval

public void addSelectionInterval(int anchor,
                                 int lead)
Sets the selection to be the union of the specified interval with current selection. Both the anchor and lead indices are included

Parameters:
anchor - the first index to add to the selection
lead - the last index to add to the selection

setSelectionInterval

public void setSelectionInterval(int anchor,
                                 int lead)
Selects the specified interval. Both the anchor and lead indices are included.

Parameters:
anchor - the first index to select
lead - the last index to select

setLightweight

public void setLightweight(boolean b)
Sets whether this component has a lightweight peer, native peer or no peer.

Parameters:
b - true if this component has a lightweight peer; false if it has a native peer or no peer.

isLightweight

public boolean isLightweight()
Returns whether this component has a lightweight peer, native peer or no peer.

Returns:
true if this component has a lightweight peer; false if it has a native peer or no peer.

setOpaque

public void setOpaque(boolean b)
Sets whether this component paints every pixel within its bounds. or the component does not paint some or all of its pixels, allowing the underlying pixels to show through.

Parameters:
b - true if this component paints every pixel within its bounds.

setToolTipText

public void setToolTipText(java.lang.String s)
Sets the text to display in a tool tip. The text displays when the cursor lingers over the component.


setDoubleBuffered

public void setDoubleBuffered(boolean b)
Sets whether the receiving component should use a buffer to paint.

Parameters:
b - if true, all the drawing from this component will be done in an offscreen painting buffer. The offscreen painting buffer will the be copied onto the screen.

setBorder

public void setBorder(javax.swing.border.Border b)
Sets the border of this component.

Parameters:
b - the border to be rendered for this component

setAutoscrolls

public void setAutoscrolls(boolean b)
Sets whether this component will automatically scroll its contents when dragged, if contained in a component that supports scrolling

Parameters:
b - if true, this component will automatically scroll its contents when dragged

setRequestFocusEnabled

public void setRequestFocusEnabled(boolean b)
Sets whether the receiving component can obtain the focus by calling requestFocus.

Parameters:
b - if true the receiving component can obtain the focus by calling requestFocus

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

Parameters:
l - the PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
l - the PropertyChangeListener to be removed

setInsets

public void setInsets(java.awt.Insets i)
Sets the insets value for this component

Parameters:
i - the insets value

getInsets

public java.awt.Insets getInsets()
Gets the insets value for this component

Returns:
the insets value

setLayout

public void setLayout(java.awt.LayoutManager mgr)
Sets the layout manager for this component.

Parameters:
mgr - the specified layout manager

processKeyEvent

protected void processKeyEvent(java.awt.event.KeyEvent e)
Processes key events occurring on this component by dispatching them to any registered KeyListener objects

Parameters:
e - - the key event

processMouseEvent

protected void processMouseEvent(java.awt.event.MouseEvent e)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects

Parameters:
e - - the mouse event

processMouseMotionEvent

protected void processMouseMotionEvent(java.awt.event.MouseEvent e)
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects

Parameters:
e - - the mouse event

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this bean. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.

Parameters:
x - x-coordinate of this bean.
y - y-coordinate of this bean.
width - the new width of this bean.
height - the new height of this bean.

setForeground

public void setForeground(java.awt.Color c)
Sets the Foreground color.


setBackground

public void setBackground(java.awt.Color c)
Sets the Background color.


setFont

public void setFont(java.awt.Font f)
Sets the font.


setVisible

public void setVisible(boolean b)
sets Visiblity.

Parameters:
b - flag representing visibility of bean.

setEnabled

public void setEnabled(boolean b)
sets Enablity.

Parameters:
b - flag representing enability of bean.

setLocale

public void setLocale(java.util.Locale l)
Sets value of the locale.

Parameters:
l - current value of the locale.

getLocale

public java.util.Locale getLocale()
Returns the value of locale.

Returns:
the current value of locale

setCursor

public void setCursor(java.awt.Cursor c)
Sets value of the cursor.

Parameters:
c - current value of the cursor.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.lang.ClassNotFoundException,
                         java.io.IOException
Externalizable interface implementation to save and retrieve the state of this bean

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.lang.ClassNotFoundException
java.io.IOException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

ElegantJ Data Tables Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.