com.alee.laf.list
Class WebList

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JList
                  extended by com.alee.laf.list.WebList
All Implemented Interfaces:
FontMethods<WebList>, SizeMethods<WebList>, SwingMethods, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable
Direct Known Subclasses:
WebCheckBoxList, WebFileList

public class WebList
extends javax.swing.JList
implements FontMethods<WebList>, SizeMethods<WebList>

This JList extension class provides a direct access to WebListUI methods. There is also a set of additional methods to simplify some operations with list.

This component should never be used with a non-Web UIs as it might cause an unexpected behavior. You could still use that component even if WebLaF is not your application L&F as this component will use Web-UI in any case.

Author:
Mikle Garin
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JList
javax.swing.JList.AccessibleJList, javax.swing.JList.DropLocation
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  boolean editable
          Whether this list is editable or not.
protected  int editedCell
          Currently edited cell index or -1 if none edited at the moment.
protected  java.util.List<ListEditListener> editListeners
          List edit lsiteners.
protected  ListCellEditor listCellEditor
          List cell editor.
protected  boolean unselectable
          Whether list allows an empty selection or not.
 
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
WebList()
          Constructs empty list.
WebList(java.util.List listData)
          Constructs list with the specified data.
WebList(javax.swing.ListModel dataModel)
          Constructs list with the specified list model.
WebList(java.lang.Object[] listData)
          Constructs list with the specified data.
WebList(java.util.Vector listData)
          Constructs list with the specified data.
 
Method Summary
 void addListDataListener(javax.swing.event.ListDataListener listener)
          Adds a listener to the list that's notified each time a change to the data model occurs.
 void addListEditListener(ListEditListener listener)
          Adds list edit listener into this list.
 WebList changeFontSize(int change)
          Changes font size of the specified component.
protected  ListCellEditor createDefaultCellEditor()
          Returns default cell editor for this list.
 void editCell(int index)
          Forces the cell under specified index into editing mode.
 void editSelectedCell()
          Forces selected cell into editing mode.
 void fireEditCancelled(int index)
          Informs all listener that editing was cancelled.
 void fireEditFinished(int index, java.lang.Object oldValue, java.lang.Object newValue)
          Informs all listener that editing was finished.
 void fireEditStarted(int index)
          Informs all listener that editing was started.
 ListCellEditor getCellEditor()
          Returns cell editor for this list.
 int getEditedCell()
          Returns currently edited cell index or -1 if none edited at the moment.
 java.lang.String getFontName()
          Returns component font name.
 int getFontSize()
          Returns component font size.
 int getMinimumHeight()
          Returns component minimum height.
 int getMinimumWidth()
          Returns component minimum width.
 int getModelSize()
          Returns list model size.
 int getPreferredHeight()
          Returns component preferred height.
 java.awt.Dimension getPreferredSize()
          Returns component preferred size.
 int getPreferredWidth()
          Returns component preferred width.
 int getSelectionRound()
          Returns cells selection rounding.
 int getSelectionShadeWidth()
          Returns cells selection shade width.
<T> T
getValueAt(int index)
          Returns model value at the specified cell index.
 WebListCellRenderer getWebListCellRenderer()
          Returns specific web list cell renderer or null if a custom non-web renderer is installed.
 WebListModel getWebModel()
          Returns specific web list model or null if another type of model is used.
 WebListUI getWebUI()
          Returns Web-UI applied to this class.
 boolean isAutoScrollToSelection()
          Returns whether to scroll list down to selection automatically or not.
 boolean isBoldFont()
          Returns whether component font is bold or not.
 boolean isDecorateSelection()
          Returns whether should decorate selected and rollover cells or not.
 boolean isEditable()
          Returns whether this list is editable or not.
 boolean isEditing()
          Returns whether some list cell is being edited at the moment or not.
 boolean isHighlightRolloverCell()
          Returns whether should highlight rollover cell or not.
 boolean isItalicFont()
          Returns whether component font is italic or not.
 boolean isPlainFont()
          Returns whether component font is plain or not.
 boolean isRolloverSelectionEnabled()
          Returns whether rollover selection is enabled for this list or not.
 boolean isUnselectable()
          Returns whether list allows an empty selection or not.
 void removeCellEditor()
          Uninstalls cell editor from this list.
 void removeListDataListener(javax.swing.event.ListDataListener listener)
          Removes a listener from the list that's notified each time a change to the data model occurs.
 void removeListEditListener(ListEditListener listener)
          Removes list edit lsitener from this list.
 void repaint(int index)
          Repaints list cell under the specified index.
 void repaint(int from, int to)
          Repaints all list cells between the specified indices.
 void repaint(java.lang.Object value)
          Repaints list cell for the specified value.
 void scrollToCell(int index)
          Scrolls list to specified cell.
 void setAutoScrollToSelection(boolean autoScrollToSelection)
          Sets whether to scroll list down to selection automatically or not.
 WebList setBoldFont()
          Sets bold font for the component.
 WebList setBoldFont(boolean apply)
          Sets bold font for the component.
 void setCellEditor(ListCellEditor listCellEditor)
          Installs cell editor for this list.
 void setDecorateSelection(boolean decorateSelection)
          Sets whether should decorate selected and rollover cells or not.
 void setEditable(boolean editable)
          Sets whether this list is editable or not.
 WebList setFontName(java.lang.String fontName)
          Sets component font name.
 WebList setFontSize(int fontSize)
          Sets component font size.
 WebList setFontSizeAndStyle(int fontSize, boolean bold, boolean italic)
          Sets font size and style for the specified component.
 WebList setFontSizeAndStyle(int fontSize, int style)
          Sets font size and style for the specified component.
 WebList setFontStyle(boolean bold, boolean italic)
          Sets component font style.
 WebList setFontStyle(int style)
          Sets component font style.
 void setHighlightRolloverCell(boolean highlightRolloverCell)
          Sets whether should highlight rollover cell or not.
 WebList setItalicFont()
          Sets italic or plain font for the component.
 WebList setItalicFont(boolean apply)
          Sets italic or plain font for the component.
 WebList setMinimumHeight(int minimumHeight)
          Sets component minimum height.
 WebList setMinimumWidth(int minimumWidth)
          Sets component minimum width.
 void setMultiplySelectionAllowed(boolean allowed)
          Sets whether multiply values selection allowed or not.
 WebList setPlainFont()
          Sets plain font for the component.
 WebList setPlainFont(boolean apply)
          Sets plain font for the component.
 WebList setPreferredHeight(int preferredHeight)
          Sets component preferred height.
 WebList setPreferredWidth(int preferredWidth)
          Sets component preferred width.
 void setRolloverSelectionEnabled(boolean enabled)
          Sets whether rollover selection is enabled for this list or not.
 void setSelectedValue(java.lang.Object element)
          Sets selected value and scrolls view to its cell.
 void setSelectedValues(java.util.Collection values)
          Selects all specified values.
 void setSelectedValues(java.util.List values)
          Selects all specified values.
 void setSelectedValues(java.lang.Object[] values)
          Selects all specified values.
 void setSelectionRound(int selectionRound)
          Sets cells selection rounding.
 void setSelectionShadeWidth(int selectionShadeWidth)
          Sets cells selection shade width.
 void setUnselectable(boolean unselectable)
          Sets whether list allows an empty selection or not.
 boolean stopCellEditing()
          Stops cell editing if possible.
 void updateUI()
          Installs a Web-UI into this component.
 
Methods inherited from class javax.swing.JList
addListSelectionListener, addSelectionInterval, clearSelection, createSelectionModel, ensureIndexIsVisible, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getDropLocation, getDropMode, 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, setCellRenderer, setDragEnabled, setDropMode, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndex, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, update
 
Methods inherited from class java.awt.Container
add, 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, 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, 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, hide, imageUpdate, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

editListeners

protected java.util.List<ListEditListener> editListeners
List edit lsiteners.


editable

protected boolean editable
Whether this list is editable or not.


listCellEditor

protected ListCellEditor listCellEditor
List cell editor.


editedCell

protected int editedCell
Currently edited cell index or -1 if none edited at the moment.


unselectable

protected boolean unselectable
Whether list allows an empty selection or not. This setting doesn't force initial selection though.

Constructor Detail

WebList

public WebList()
Constructs empty list.


WebList

public WebList(java.util.List listData)
Constructs list with the specified data.

Parameters:
listData - list data

WebList

public WebList(java.util.Vector listData)
Constructs list with the specified data.

Parameters:
listData - list data

WebList

public WebList(java.lang.Object[] listData)
Constructs list with the specified data.

Parameters:
listData - list data

WebList

public WebList(javax.swing.ListModel dataModel)
Constructs list with the specified list model.

Parameters:
dataModel - list model
Method Detail

setMultiplySelectionAllowed

public void setMultiplySelectionAllowed(boolean allowed)
Sets whether multiply values selection allowed or not. This call simply changes selection mode according to provided value.

Parameters:
allowed - whether multiply values selection allowed or not

getWebListCellRenderer

public WebListCellRenderer getWebListCellRenderer()
Returns specific web list cell renderer or null if a custom non-web renderer is installed.

Returns:
specific web list cell renderer or null if a custom non-web renderer is installed

getWebModel

public WebListModel getWebModel()
Returns specific web list model or null if another type of model is used.

Returns:
specific web list model or null if another type of model is used

setSelectedValue

public void setSelectedValue(java.lang.Object element)
Sets selected value and scrolls view to its cell.

Parameters:
element - element to select

setSelectedValues

public void setSelectedValues(java.lang.Object[] values)
Selects all specified values. Values which are not in the list are simply ignored. This method might be slow in case model cannot provide all separate values quickly.

Parameters:
values - values to select

setSelectedValues

public void setSelectedValues(java.util.Collection values)
Selects all specified values. Values which are not in the list are simply ignored. This method might be slow in case model cannot provide all separate values quickly.

Parameters:
values - values to select

setSelectedValues

public void setSelectedValues(java.util.List values)
Selects all specified values. Values which are not in the list are simply ignored. This method might be slow in case model cannot provide all separate values quickly.

Parameters:
values - values to select

isEditable

public boolean isEditable()
Returns whether this list is editable or not.

Returns:
true if this list is editable, false otherwise

setEditable

public void setEditable(boolean editable)
Sets whether this list is editable or not.

Parameters:
editable - whether this list is editable or not

isRolloverSelectionEnabled

public boolean isRolloverSelectionEnabled()
Returns whether rollover selection is enabled for this list or not.

Returns:
true if rollover selection is enabled for this list, false otherwise

setRolloverSelectionEnabled

public void setRolloverSelectionEnabled(boolean enabled)
Sets whether rollover selection is enabled for this list or not.

Parameters:
enabled - whether rollover selection is enabled for this list or not

setCellEditor

public void setCellEditor(ListCellEditor listCellEditor)
Installs cell editor for this list.

Parameters:
listCellEditor - new cell editor

createDefaultCellEditor

protected ListCellEditor createDefaultCellEditor()
Returns default cell editor for this list.

Returns:
default cell editor for this list

getCellEditor

public ListCellEditor getCellEditor()
Returns cell editor for this list.

Returns:
cell editor for this list

removeCellEditor

public void removeCellEditor()
Uninstalls cell editor from this list.


editSelectedCell

public void editSelectedCell()
Forces selected cell into editing mode.


editCell

public void editCell(int index)
Forces the cell under specified index into editing mode.

Parameters:
index - index for the cell to edit

stopCellEditing

public boolean stopCellEditing()
Stops cell editing if possible.


isEditing

public boolean isEditing()
Returns whether some list cell is being edited at the moment or not.

Returns:
true if some list cell is being edited at the moment, false otherwise

isUnselectable

public boolean isUnselectable()
Returns whether list allows an empty selection or not.

Returns:
true if list allows an empty selection, false otherwise

setUnselectable

public void setUnselectable(boolean unselectable)
Sets whether list allows an empty selection or not.

Parameters:
unselectable - whether list allows an empty selection or not

getModelSize

public int getModelSize()
Returns list model size.

Returns:
list model size

getValueAt

public <T> T getValueAt(int index)
Returns model value at the specified cell index.

Type Parameters:
T - value type
Parameters:
index - cell index
Returns:
model value at the specified cell index

addListDataListener

public void addListDataListener(javax.swing.event.ListDataListener listener)
Adds a listener to the list that's notified each time a change to the data model occurs.

Parameters:
listener - the ListDataListener to be added

removeListDataListener

public void removeListDataListener(javax.swing.event.ListDataListener listener)
Removes a listener from the list that's notified each time a change to the data model occurs.

Parameters:
listener - the ListDataListener to be removed

scrollToCell

public void scrollToCell(int index)
Scrolls list to specified cell.

Parameters:
index - cell index

isDecorateSelection

public boolean isDecorateSelection()
Returns whether should decorate selected and rollover cells or not.

Returns:
true if should decorate selected and rollover cells, false otherwise

setDecorateSelection

public void setDecorateSelection(boolean decorateSelection)
Sets whether should decorate selected and rollover cells or not.

Parameters:
decorateSelection - whether should decorate selected and rollover cells or not

isHighlightRolloverCell

public boolean isHighlightRolloverCell()
Returns whether should highlight rollover cell or not.

Returns:
true if rollover cell is being highlighted, false otherwise

setHighlightRolloverCell

public void setHighlightRolloverCell(boolean highlightRolloverCell)
Sets whether should highlight rollover cell or not.

Parameters:
highlightRolloverCell - whether should highlight rollover cell or not

getSelectionRound

public int getSelectionRound()
Returns cells selection rounding.

Returns:
cells selection rounding

setSelectionRound

public void setSelectionRound(int selectionRound)
Sets cells selection rounding.

Parameters:
selectionRound - new cells selection rounding

getSelectionShadeWidth

public int getSelectionShadeWidth()
Returns cells selection shade width.

Returns:
cells selection shade width

setSelectionShadeWidth

public void setSelectionShadeWidth(int selectionShadeWidth)
Sets cells selection shade width.

Parameters:
selectionShadeWidth - new cells selection shade width

isAutoScrollToSelection

public boolean isAutoScrollToSelection()
Returns whether to scroll list down to selection automatically or not.

Returns:
true if list is being automatically scrolled to selection, false otherwise

setAutoScrollToSelection

public void setAutoScrollToSelection(boolean autoScrollToSelection)
Sets whether to scroll list down to selection automatically or not.

Parameters:
autoScrollToSelection - whether to scroll list down to selection automatically or not

getWebUI

public WebListUI getWebUI()
Returns Web-UI applied to this class.

Returns:
Web-UI applied to this class

updateUI

public void updateUI()
Installs a Web-UI into this component.

Overrides:
updateUI in class javax.swing.JList

repaint

public void repaint(java.lang.Object value)
Repaints list cell for the specified value.

Parameters:
value - cell value

repaint

public void repaint(int index)
Repaints list cell under the specified index.

Parameters:
index - cell index

repaint

public void repaint(int from,
                    int to)
Repaints all list cells between the specified indices.

Parameters:
from - first cell index
to - last cell index

getEditedCell

public int getEditedCell()
Returns currently edited cell index or -1 if none edited at the moment.

Returns:
currently edited cell index or -1 if none edited at the moment

addListEditListener

public void addListEditListener(ListEditListener listener)
Adds list edit listener into this list.

Parameters:
listener - list edit listener to add

removeListEditListener

public void removeListEditListener(ListEditListener listener)
Removes list edit lsitener from this list.

Parameters:
listener - list edit listener to remove

fireEditStarted

public void fireEditStarted(int index)
Informs all listener that editing was started.

Parameters:
index - edited cell index

fireEditFinished

public void fireEditFinished(int index,
                             java.lang.Object oldValue,
                             java.lang.Object newValue)
Informs all listener that editing was finished.

Parameters:
index - edited cell index
oldValue - old cell value
newValue - new cell value

fireEditCancelled

public void fireEditCancelled(int index)
Informs all listener that editing was cancelled.

Parameters:
index - edited cell index

setPlainFont

public WebList setPlainFont()
Sets plain font for the component.

Specified by:
setPlainFont in interface FontMethods<WebList>
Returns:
modified component

setPlainFont

public WebList setPlainFont(boolean apply)
Sets plain font for the component.

Specified by:
setPlainFont in interface FontMethods<WebList>
Parameters:
apply - whether to apply font changes or not
Returns:
modified component

isPlainFont

public boolean isPlainFont()
Returns whether component font is plain or not.

Specified by:
isPlainFont in interface FontMethods<WebList>
Returns:
true if component font is plain, false otherwise

setBoldFont

public WebList setBoldFont()
Sets bold font for the component.

Specified by:
setBoldFont in interface FontMethods<WebList>
Returns:
modified component

setBoldFont

public WebList setBoldFont(boolean apply)
Sets bold font for the component.

Specified by:
setBoldFont in interface FontMethods<WebList>
Parameters:
apply - whether to apply font changes or not
Returns:
modified component

isBoldFont

public boolean isBoldFont()
Returns whether component font is bold or not.

Specified by:
isBoldFont in interface FontMethods<WebList>
Returns:
true if component font is bold, false otherwise

setItalicFont

public WebList setItalicFont()
Sets italic or plain font for the component.

Specified by:
setItalicFont in interface FontMethods<WebList>
Returns:
modified component

setItalicFont

public WebList setItalicFont(boolean apply)
Sets italic or plain font for the component.

Specified by:
setItalicFont in interface FontMethods<WebList>
Parameters:
apply - whether to apply font changes or not
Returns:
modified component

isItalicFont

public boolean isItalicFont()
Returns whether component font is italic or not.

Specified by:
isItalicFont in interface FontMethods<WebList>
Returns:
true if component font is italic, false otherwise

setFontStyle

public WebList setFontStyle(boolean bold,
                            boolean italic)
Sets component font style.

Specified by:
setFontStyle in interface FontMethods<WebList>
Parameters:
bold - whether should set bold font or not
italic - whether should set italic font or not
Returns:
modified component

setFontStyle

public WebList setFontStyle(int style)
Sets component font style.

Specified by:
setFontStyle in interface FontMethods<WebList>
Parameters:
style - new style
Returns:
modified component

setFontSize

public WebList setFontSize(int fontSize)
Sets component font size.

Specified by:
setFontSize in interface FontMethods<WebList>
Parameters:
fontSize - font size
Returns:
modified component

changeFontSize

public WebList changeFontSize(int change)
Changes font size of the specified component.

Specified by:
changeFontSize in interface FontMethods<WebList>
Parameters:
change - font size change amount
Returns:
modified component

getFontSize

public int getFontSize()
Returns component font size.

Specified by:
getFontSize in interface FontMethods<WebList>
Returns:
component font size

setFontSizeAndStyle

public WebList setFontSizeAndStyle(int fontSize,
                                   boolean bold,
                                   boolean italic)
Sets font size and style for the specified component.

Specified by:
setFontSizeAndStyle in interface FontMethods<WebList>
Parameters:
fontSize - new font size
bold - whether should set bold font or not
italic - whether should set italic font or not
Returns:
modified component

setFontSizeAndStyle

public WebList setFontSizeAndStyle(int fontSize,
                                   int style)
Sets font size and style for the specified component.

Specified by:
setFontSizeAndStyle in interface FontMethods<WebList>
Parameters:
fontSize - new font size
style - new style
Returns:
modified component

setFontName

public WebList setFontName(java.lang.String fontName)
Sets component font name.

Specified by:
setFontName in interface FontMethods<WebList>
Parameters:
fontName - new font name
Returns:
modified component

getFontName

public java.lang.String getFontName()
Returns component font name.

Specified by:
getFontName in interface FontMethods<WebList>
Returns:
component font name

getPreferredWidth

public int getPreferredWidth()
Returns component preferred width.

Specified by:
getPreferredWidth in interface SizeMethods<WebList>
Returns:
component preferred width

setPreferredWidth

public WebList setPreferredWidth(int preferredWidth)
Sets component preferred width. Pass -1 to let component choose preferred width on its own.

Specified by:
setPreferredWidth in interface SizeMethods<WebList>
Parameters:
preferredWidth - new component preferred width
Returns:
modified component

getPreferredHeight

public int getPreferredHeight()
Returns component preferred height.

Specified by:
getPreferredHeight in interface SizeMethods<WebList>
Returns:
component preferred height

setPreferredHeight

public WebList setPreferredHeight(int preferredHeight)
Sets component preferred height. Pass -1 to let component choose preferred height on its own.

Specified by:
setPreferredHeight in interface SizeMethods<WebList>
Parameters:
preferredHeight - new component preferred height
Returns:
modified component

getMinimumWidth

public int getMinimumWidth()
Returns component minimum width.

Specified by:
getMinimumWidth in interface SizeMethods<WebList>
Returns:
component minimum width

setMinimumWidth

public WebList setMinimumWidth(int minimumWidth)
Sets component minimum width. Pass -1 to let component choose minimum width on its own.

Specified by:
setMinimumWidth in interface SizeMethods<WebList>
Parameters:
minimumWidth - new component minimum width
Returns:
modified component

getMinimumHeight

public int getMinimumHeight()
Returns component minimum height.

Specified by:
getMinimumHeight in interface SizeMethods<WebList>
Returns:
component minimum height

setMinimumHeight

public WebList setMinimumHeight(int minimumHeight)
Sets component minimum height. Pass -1 to let component choose minimum height on its own.

Specified by:
setMinimumHeight in interface SizeMethods<WebList>
Parameters:
minimumHeight - new component minimum height
Returns:
modified component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns component preferred size.

Specified by:
getPreferredSize in interface SizeMethods<WebList>
Overrides:
getPreferredSize in class javax.swing.JComponent
Returns:
component preferred size