JIDE 3.5.15

com.jidesoft.grid
Class AutoFilterTableHeaderEditor

java.lang.Object
  extended by javax.swing.AbstractCellEditor
      extended by com.jidesoft.grid.AutoFilterTableHeaderEditor
All Implemented Interfaces:
Serializable, CellEditor, SwingConstants, TableCellEditor

public class AutoFilterTableHeaderEditor
extends AbstractCellEditor
implements TableCellEditor, SwingConstants

Header cell editor for AutoFilterTableHeader.

See Also:
Serialized Form

Field Summary
protected  AutoFilterBox _box
           
 
Fields inherited from class javax.swing.AbstractCellEditor
changeEvent, listenerList
 
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
 
Constructor Summary
AutoFilterTableHeaderEditor()
           
 
Method Summary
protected  int checkHorizontalKey(int key, String exception)
          Verify that the key argument is a legal value for the horizontalAlignment and horizontalTextPosition properties.
protected  int checkVerticalKey(int key, String exception)
          Verify that the key argument is a legal value for the vertical properties.
protected  AutoFilterBox createAutoFilterBox()
          Creates the AutoFilterBox.
protected  void customizeAutoFilterBox(AutoFilterBox autoFilterBox)
           
 Object getCellEditorValue()
          Gets the editor value.
 int getHorizontalAlignment()
          Returns the horizontal alignment of the icon and text.
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
           
 int getVerticalAlignment()
          Returns the vertical alignment of the text and icon.
 void setHorizontalAlignment(int alignment)
          Sets the horizontal alignment of the icon and text.
 void setVerticalAlignment(int alignment)
          Sets the vertical alignment of the icon and text.
 
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 

Field Detail

_box

protected AutoFilterBox _box
Constructor Detail

AutoFilterTableHeaderEditor

public AutoFilterTableHeaderEditor()
Method Detail

createAutoFilterBox

protected AutoFilterBox createAutoFilterBox()
Creates the AutoFilterBox.

Returns:
the AutoFilterBox.

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Specified by:
getTableCellEditorComponent in interface TableCellEditor

customizeAutoFilterBox

protected void customizeAutoFilterBox(AutoFilterBox autoFilterBox)

getCellEditorValue

public Object getCellEditorValue()
Gets the editor value. It will return the text.

Specified by:
getCellEditorValue in interface CellEditor
Returns:
the text.

getVerticalAlignment

public int getVerticalAlignment()
Returns the vertical alignment of the text and icon.

Returns:
the verticalAlignment property, one of the following values:
  • SwingConstants.CENTER (the default)
  • SwingConstants.TOP
  • SwingConstants.BOTTOM

setVerticalAlignment

public void setVerticalAlignment(int alignment)
Sets the vertical alignment of the icon and text.

Parameters:
alignment - one of the following values:
  • SwingConstants.CENTER (the default)
  • SwingConstants.TOP
  • SwingConstants.BOTTOM
Throws:
IllegalArgumentException - if the alignment is not one of the legal values listed above

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the horizontal alignment of the icon and text. AbstractButton's default is SwingConstants.CENTER, but subclasses such as JCheckBox may use a different default.

Returns:
the horizontalAlignment property, one of the following values:
  • SwingConstants.RIGHT
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the icon and text. AbstractButton's default is SwingConstants.CENTER, but subclasses such as JCheckBox may use a different default.

Parameters:
alignment - the alignment value, one of the following values:
  • SwingConstants.RIGHT
  • SwingConstants.LEFT
  • SwingConstants.CENTER
  • SwingConstants.LEADING
  • SwingConstants.TRAILING
Throws:
IllegalArgumentException - if the alignment is not one of the valid values

checkHorizontalKey

protected int checkHorizontalKey(int key,
                                 String exception)
Verify that the key argument is a legal value for the horizontalAlignment and horizontalTextPosition properties. Valid values are:

Parameters:
key - the property value to check
exception - the message to use in the IllegalArgumentException that is thrown for an invalid value
Returns:
the key
Throws:
IllegalArgumentException - if key is not one of the legal values listed above
See Also:
setHorizontalAlignment(int)

checkVerticalKey

protected int checkVerticalKey(int key,
                               String exception)
Verify that the key argument is a legal value for the vertical properties. Valid values are:

Parameters:
key - the property value to check
exception - the message to use in the IllegalArgumentException that is thrown for an invalid value
Returns:
the key
Throws:
IllegalArgumentException - if key is not one of the legal values listed above

JIDE 3.5.15