Column

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openswing.swing.table.columns.client
Class Column

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      org.openswing.swing.table.columns.client.Column

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

Direct Known Subclasses:
  ButtonColumn, CheckBoxColumn, CodLookupColumn, ComboColumn, ComboVOColumn, DateColumn, DateTimeColumn, DecimalColumn, FileColumn, FormattedTextColumn, ImageColumn, IntegerColumn, LinkColumn, MultiLineTextColumn, MultipleTypeColumn, ProgressBarColumn, TextColumn, TimeColumn

public class Column
extends javax.swing.JPanel

Title: OpenSwing Framework

Description: Based column of the Grid component. This class has not be used directly by the programmer: it's called by GridControl.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it

See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Field Summary
`boolean` | `autoFitColumn` flag used to auto fit column size, according to text header; default value: `ClientSettings.AUTO_FIT_COLUMNS`
`static int` | `TYPE_BUTTON`
`static int` | `TYPE_CHECK`
`static int` | `TYPE_COMBO`
`static int` | `TYPE_COMBO_VO`
`static int` | `TYPE_CURRENCY`
`static int` | `TYPE_DATE`
`static int` | `TYPE_DATE_TIME`
`static int` | `TYPE_DEC`
`static int` | `TYPE_FILE`
`static int` | `TYPE_FORMATTED_TEXT`
`static int` | `TYPE_IMAGE`
`static int` | `TYPE_INT`
`static int` | `TYPE_LINK`
`static int` | `TYPE_LOOKUP`
`static int` | `TYPE_MULTI_LINE_TEXT`
`static int` | `TYPE_MULTIPLE_TYPE`
`static int` | `TYPE_PERC`
`static int` | `TYPE_PROGRESS_BAR`
`static int` | `TYPE_TEXT`
`static int` | `TYPE_TIME`

Fields inherited from class javax.swing.JComponent
`TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`Column()`

Method Summary
`java.lang.String` | `getAdditionalHeaderColumnName()`
`int` | `getAdditionalHeaderColumnSpan()`
`javax.swing.table.TableCellEditor` | `getCellEditor(GridController tableContainer, Grids grids)`
`javax.swing.table.TableCellRenderer` | `getCellRenderer(GridController tableContainer, Grids grids)`
`java.lang.String` | `getColumnName()`
`int` | `getColumnType()`
`static java.lang.Class` | `getDesignColumnType()`
`java.lang.String` | `getHeaderColumnName()`
`java.awt.Font` | `getHeaderFont()`
`java.awt.Color` | `getHeaderForegroundColor()`
`int` | `getHeaderTextHorizontalAlignment()`
`int` | `getHeaderTextVerticalAlignment()`
`ListFilterController` | `getListFilter()`
`int` | `getMaxWidth()`
`int` | `getMinWidth()`
`int` | `getPreferredWidth()`
`int` | `getSortingOrder()`
`java.lang.String` | `getSortVersus()`
`Grids` | `getTable()`
`int` | `getTextAlignment()`
`boolean` | `isAutoFitColumn()`
`boolean` | `isColumnDuplicable()`
`boolean` | `isColumnFilterable()`
`boolean` | `isColumnRequired()`
`boolean` | `isColumnSelectable()`
`boolean` | `isColumnSortable()`
`boolean` | `isColumnVisible()`
`boolean` | `isEditableOnEdit()`
`boolean` | `isEditableOnInsert()`
`void` | `setAdditionalHeaderColumnName(java.lang.String additionalHeaderColumnName)` Set the additional column header description.
`void` | `setAdditionalHeaderColumnSpan(int additionalHeaderColumnSpan)` Set the additional column header description.
`void` | `setAutoFitColumn(boolean autoFitColumn)` Set auto fit column size, according to text headers.
`void` | `setColumnDuplicable(boolean columnDuplicable)` Define if the cell column value is duplicated when user has clicked on COPY button.
`void` | `setColumnFilterable(boolean columnFilterable)` Set column filtering.
`void` | `setColumnName(java.lang.String columnName)` Set attribute name linked to this column.
`void` | `setColumnRequired(boolean columnRequired)` Set mandatory of column values when the grid is on edit/insert mode.
`void` | `setColumnSelectable(boolean columnSelectable)` Set if column (in)visibility state can be changed by user.
`void` | `setColumnSortable(boolean columnSortable)` Set column sorting abilitation by clicking on column header.
`void` | `setColumnVisible(boolean columnVisible)` Set column visibility.
`void` | `setEditableOnEdit(boolean editableOnEdit)` Set column editing on edit grid mode (this setting is used only if is not set a cell editing manager oin the grid).
`void` | `setEditableOnInsert(boolean editableOnInsert)` Set column editing on insert grid mode (this setting is used only if is not set a cell editing manager oin the grid).
`void` | `setHeaderColumnName(java.lang.String headerColumnName)` Set header column name.
`void` | `setHeaderFont(java.awt.Font headerFont)` Set column header font.
`void` | `setHeaderForegroundColor(java.awt.Color headerForegroundColor)` Set foreground color for column header.
`void` | `setHeaderTextHorizontalAlignment(int alignment)` Set column header horizontal alignement.
`void` | `setHeaderTextVerticalAlignment(int alignment)` Set column header vertical alignement.
`void` | `setListFilter(ListFilterController filter)` Add a list-filter for the specified column, showed in the quick filter panel.
`void` | `setMaxWidth(int maxWidth)` Set maximum column width.
`void` | `setMinWidth(int minWidth)` Set minimum column width.
`void` | `setPreferredWidth(int preferredWidth)` Set column width.
`void` | `setSortingOrder(int sortingOrder)` Set order of sorting columns in ORDER BY.
`void` | `setSortVersus(java.lang.String sortVersus)` Set current sorting versus; 3 possible values: NO_SORTED, ASC_SORTED, DESC_SORTED (this property is managed only if "columnSortable" is true).
`void` | `setTable(Grids table)` Set table linked to this column
`void` | `setTextAlignment(int alignment)` Set column text horizontal alignement.

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, setUI, updateUI`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, 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, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, 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
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### autoFitColumn

    public boolean autoFitColumn

  flag used to auto fit column size, according to text header; default value: `ClientSettings.AUTO_FIT_COLUMNS`

### TYPE_TEXT

    public static final int TYPE_TEXT

See Also:
  Constant Field Values

### TYPE_DATE

    public static final int TYPE_DATE

See Also:
  Constant Field Values

### TYPE_DATE_TIME

    public static final int TYPE_DATE_TIME

See Also:
  Constant Field Values

### TYPE_TIME

    public static final int TYPE_TIME

See Also:
  Constant Field Values

### TYPE_INT

    public static final int TYPE_INT

See Also:
  Constant Field Values

### TYPE_DEC

    public static final int TYPE_DEC

See Also:
  Constant Field Values

### TYPE_CHECK

    public static final int TYPE_CHECK

See Also:
  Constant Field Values

### TYPE_COMBO

    public static final int TYPE_COMBO

See Also:
  Constant Field Values

### TYPE_LOOKUP

    public static final int TYPE_LOOKUP

See Also:
  Constant Field Values

### TYPE_PERC

    public static final int TYPE_PERC

See Also:
  Constant Field Values

### TYPE_CURRENCY

    public static final int TYPE_CURRENCY

See Also:
  Constant Field Values

### TYPE_BUTTON

    public static final int TYPE_BUTTON

See Also:
  Constant Field Values

### TYPE_IMAGE

    public static final int TYPE_IMAGE

See Also:
  Constant Field Values

### TYPE_FORMATTED_TEXT

    public static final int TYPE_FORMATTED_TEXT

See Also:
  Constant Field Values

### TYPE_MULTI_LINE_TEXT

    public static final int TYPE_MULTI_LINE_TEXT

See Also:
  Constant Field Values

### TYPE_MULTIPLE_TYPE

    public static final int TYPE_MULTIPLE_TYPE

See Also:
  Constant Field Values

### TYPE_PROGRESS_BAR

    public static final int TYPE_PROGRESS_BAR

See Also:
  Constant Field Values

### TYPE_COMBO_VO

    public static final int TYPE_COMBO_VO

See Also:
  Constant Field Values

### TYPE_FILE

    public static final int TYPE_FILE

See Also:
  Constant Field Values

### TYPE_LINK

    public static final int TYPE_LINK

See Also:
  Constant Field Values

Constructor Detail

### Column

    public Column()

Method Detail

### getColumnType

    public int getColumnType()

  Returns:
    column type

### setColumnName

    public final void setColumnName(java.lang.String columnName)

  Set attribute name linked to this column.

  Parameters:
    `columnName` - attribute name of the value object associated to the grid

### getColumnName

    public final java.lang.String getColumnName()

  Returns:
    attribute name of the value object associated to the grid

### setPreferredWidth

    public final void setPreferredWidth(int preferredWidth)

  Set column width.

  Parameters:
    `preferredWidth` - column width

### getPreferredWidth

    public final int getPreferredWidth()

  Returns:
    column width

### setMaxWidth

    public final void setMaxWidth(int maxWidth)

  Set maximum column width.

  Parameters:
    `maxWidth` - maximum column width

### getMaxWidth

    public final int getMaxWidth()

  Returns:
    maximum column width

### setMinWidth

    public final void setMinWidth(int minWidth)

  Set minimum column width.

  Parameters:
    `minWidth` - minimum column width

### getMinWidth

    public final int getMinWidth()

  Returns:
    minimum column width

### setEditableOnInsert

    public final void setEditableOnInsert(boolean editableOnInsert)

  Set column editing on insert grid mode (this setting is used only if is not set a cell editing manager oin the grid).

### isEditableOnInsert

    public boolean isEditableOnInsert()

  Returns:
    column editing on insert grid mode

### setEditableOnEdit

    public final void setEditableOnEdit(boolean editableOnEdit)

  Set column editing on edit grid mode (this setting is used only if is not set a cell editing manager oin the grid).

  Parameters:
    `editableOnEdit` - column editing on edit grid mode

### isEditableOnEdit

    public boolean isEditableOnEdit()

  Returns:
    column editing on edit grid mode

### isColumnRequired

    public final boolean isColumnRequired()

  Returns:
    mandatory of column values when the grid is on edit/insert mode

### setColumnRequired

    public final void setColumnRequired(boolean columnRequired)

  Set mandatory of column values when the grid is on edit/insert mode.

  Parameters:
    `columnRequired` - mandatory of column values when the grid is on edit/insert mode

### setColumnVisible

    public final void setColumnVisible(boolean columnVisible)

  Set column visibility.

### isColumnVisible

    public final boolean isColumnVisible()

  Returns:
    column visibility

### setColumnSortable

    public final void setColumnSortable(boolean columnSortable)

  Set column sorting abilitation by clicking on column header.

  Parameters:
    `columnSortable` - column sorting is enabled

### isColumnSortable

    public final boolean isColumnSortable()

  Returns:
    column sorting is enabled

### setColumnFilterable

    public final void setColumnFilterable(boolean columnFilterable)

  Set column filtering.

  Parameters:
    `columnFilterable` - column filtering is enabled

### isColumnFilterable

    public final boolean isColumnFilterable()

  Returns:
    column filtering is enabled

### setSortVersus

    public final void setSortVersus(java.lang.String sortVersus)

  Set current sorting versus; 3 possible values: NO_SORTED, ASC_SORTED, DESC_SORTED (this property is managed only if "columnSortable" is true).

  Parameters:
    `sortVersus` - current sorting versus

### getSortVersus

    public final java.lang.String getSortVersus()

  Returns:
    current sorting versus; 3 possible values: NO_SORTED, ASC_SORTED, DESC_SORTED (this property is managed only if "columnSortable" is true)

### setColumnSelectable

    public final void setColumnSelectable(boolean columnSelectable)

  Set if column (in)visibility state can be changed by user.

  Parameters:
    `columnSelectable` - column (in)visibility state can be changed by user

### isColumnSelectable

    public final boolean isColumnSelectable()

  Returns:
    `true` if column (in)visibility state can be changed by user

### getDesignColumnType

    public static java.lang.Class getDesignColumnType()

  Returns:
    colunm type

### getSortingOrder

    public final int getSortingOrder()

  Returns:
    order of sorting columns in ORDER BY

### setSortingOrder

    public final void setSortingOrder(int sortingOrder)

  Set order of sorting columns in ORDER BY.

  Parameters:
    `sortingOrder` - order of sorting columns in ORDER BY

### getHeaderColumnName

    public final java.lang.String getHeaderColumnName()

  Returns:
    String header column name

### setHeaderColumnName

    public final void setHeaderColumnName(java.lang.String headerColumnName)

  Set header column name.

  Parameters:
    `headerColumnName` - header column name

### getHeaderTextHorizontalAlignment

    public final int getHeaderTextHorizontalAlignment()

  Returns:
    column header horizontal alignment

### setHeaderTextHorizontalAlignment

    public final void setHeaderTextHorizontalAlignment(int alignment)

  Set column header horizontal alignement.

  Parameters:
    `alignment` - column header horizontal alignement; possible values: "SwingConstants.LEFT", "SwingConstants.RIGHT", "SwingConstants.CENTER".

### getHeaderTextVerticalAlignment

    public final int getHeaderTextVerticalAlignment()

  Returns:
    column header horizontal alignment

### setHeaderTextVerticalAlignment

    public final void setHeaderTextVerticalAlignment(int alignment)

  Set column header vertical alignement.

  Parameters:
    `alignment` - column header vertical alignement; possible values: "SwingConstants.TOP", "SwingConstants.CENTER", "SwingConstants.BOTTOM".

### isColumnDuplicable

    public final boolean isColumnDuplicable()

  Returns:
    define if the cell column value is duplicated when user has clicked on COPY button

### setColumnDuplicable

    public final void setColumnDuplicable(boolean columnDuplicable)

  Define if the cell column value is duplicated when user has clicked on COPY button.

  Parameters:
    `columnDuplicable` - define if the cell column value is duplicated when user has clicked on COPY button

### getTable

    public final Grids getTable()

  Returns:
    table linked to this column

### setTable

    public final void setTable(Grids table)

  Set table linked to this column

### setHeaderFont

    public final void setHeaderFont(java.awt.Font headerFont)

  Set column header font.

### getHeaderFont

    public final java.awt.Font getHeaderFont()

  Returns:
    column header font

### setHeaderForegroundColor

    public final void setHeaderForegroundColor(java.awt.Color headerForegroundColor)

  Set foreground color for column header.

### getHeaderForegroundColor

    public final java.awt.Color getHeaderForegroundColor()

  Returns:
    foreground color for column header

### getTextAlignment

    public final int getTextAlignment()

  Returns:
    column text horizontal alignment

### setTextAlignment

    public final void setTextAlignment(int alignment)

  Set column text horizontal alignement.

  Parameters:
    `alignment` - column text horizontal alignement; possible values: "SwingConstants.LEFT", "SwingConstants.RIGHT", "SwingConstants.CENTER".

### getAdditionalHeaderColumnName

    public final java.lang.String getAdditionalHeaderColumnName()

  Returns:
    additional column header description

### getAdditionalHeaderColumnSpan

    public final int getAdditionalHeaderColumnSpan()

  Returns:
    additional column header description

### setAdditionalHeaderColumnName

    public final void setAdditionalHeaderColumnName(java.lang.String additionalHeaderColumnName)

  Set the additional column header description.

  Parameters:
    `additionalHeaderColumnName` - additional column header description

### setAdditionalHeaderColumnSpan

    public final void setAdditionalHeaderColumnSpan(int additionalHeaderColumnSpan)

  Set the additional column header description.

  Parameters:
    `additionalHeaderColumnSpan` - additional column header description

### getCellRenderer

    public javax.swing.table.TableCellRenderer getCellRenderer(GridController tableContainer,
                                                               Grids grids)

  Returns:
    TableCellRenderer for this column

### getCellEditor

    public javax.swing.table.TableCellEditor getCellEditor(GridController tableContainer,
                                                           Grids grids)

  Returns:
    TableCellEditor for this column

### setListFilter

    public final void setListFilter(ListFilterController filter)

  Add a list-filter for the specified column, showed in the quick filter panel.

### getListFilter

    public final ListFilterController getListFilter()

  Returns:
    list-filter for the specified column, showed in the quick filter panel

### isAutoFitColumn

    public final boolean isAutoFitColumn()

  Returns:
    flag used to auto fit column size, according to text header

### setAutoFitColumn

    public final void setAutoFitColumn(boolean autoFitColumn)

  Set auto fit column size, according to text headers. Default value: `ClientSettings.AUTO_FIT_COLUMNS`

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD