|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
leon.view.win.swing.component.LyJTableComponent
public class LyJTableComponent
This class implements graphical component that display the data in a table view.
LySwingTable
,
JTable
,
Serialized FormNested Class Summary | |
---|---|
class |
LyJTableComponent._LyJTableHeader
Handles table headers. |
Nested classes/interfaces inherited from class javax.swing.JTable |
---|
javax.swing.JTable.DropLocation, javax.swing.JTable.PrintMode |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
java.awt.event.MouseListener |
_mouseListener
The mouseListener of this table. |
static int |
TIP_MAX_CHARS
The maximum width of a line in a tooltip. |
Fields inherited from class javax.swing.JTable |
---|
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS |
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 | |
---|---|
LyJTableComponent(java.awt.Image downImage,
java.awt.Image upImage,
java.awt.event.MouseListener mouseListener,
javax.swing.event.ListSelectionListener selectionListener)
Creates a table object that don't have drag and drop and initializes it. |
|
LyJTableComponent(java.awt.Image downImage,
java.awt.Image upImage,
java.awt.event.MouseListener mouseListener,
javax.swing.event.ListSelectionListener selectionListener,
boolean dragNDrop)
Deprecated. |
Method Summary | |
---|---|
void |
actionPerformed(LyActionEvent e)
Invoked when an action occurs. |
void |
addLyJTableMouseListener()
Registers mouse events for this table and its header. |
void |
addLyJTableSelectionListener()
Registers selection events for this table. |
void |
cacheHeight()
Automatically computes the heights of rows. |
int |
computeLevelHeight(int row,
java.lang.String level)
Computes the height for a given row and a given level. |
void |
createDefaultColumnsFromModel()
|
void |
editNextCell(boolean next)
Edit the next editable cell of this table. |
LyActionTransmitter |
getActionTransmitter()
Gets the action transmitter of the current component. |
javax.swing.table.TableCellRenderer |
getCellRenderer(int row,
int column)
|
java.awt.Dimension |
getCustomizedScrollablePreferredSize()
Determines the part of the table that must activate scrollbars apparition. |
javax.swing.table.TableCellEditor |
getDefaultEditor(java.lang.Class<?> columnClass)
|
java.awt.event.MouseListener |
getLyJTableMouseListener()
Gets the mouse events listener of this table. |
java.awt.Dimension |
getPreferredScrollableViewportSize()
|
LySelectionTransmitter |
getSelectionTransmitter()
Gets the selection transmitter of the current component. |
java.awt.Dimension |
getSize()
Doesn't consider the last cosmetic column in layout computing and ignores the empty rows. |
javax.swing.Icon |
getSortDownIcon()
Gets the icon for sort down. |
java.awt.Image |
getSortDownImage()
Gets the image for sort down. |
javax.swing.Icon |
getSortUpIcon()
Gets the icon for sort up. |
java.awt.Image |
getSortUpImage()
Gets the image for sort up. |
LyJTableModel |
getTableModel()
Gets this table data model. |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent e)
|
boolean |
hasEditableCells()
Indicates whether table has at least one editable cell. |
void |
initialize()
Initializes this table component. |
boolean |
isComputeHeight()
Indicates that height must be computed for each row of the table. |
boolean |
isEditing()
Checks that the cell is still in edition. |
void |
paint(java.awt.Graphics g)
|
void |
removeLyJTableMouseListener()
Unregisters mouse events for this table and its header. |
void |
removeLyJTableSelectionListener()
Unregisters selection events for this table. |
void |
scrollToColumn(int column)
Scrolls this table to show the column at the specified index. |
void |
scrollToRow(int row)
Scrolls this table to show the row at the specified index. |
void |
selectionPerformed(LySelectionEvent e)
Implementation of the LySelectionListener interface. |
void |
setCellRenderer(javax.swing.table.TableCellRenderer cellRenderer)
Sets the cell renderer of this table. |
void |
setComputeHeight(boolean compute)
Specifies that the height must be computed for each row of the table. |
void |
setDisplayedHeight(int height)
Sets the displayed height. |
void |
setDragAndDrop()
Initialize drag and drop or table component. |
void |
setEditableCells(boolean hasEditableCells)
Sets the value of the parameter that indicates if table has at least one editable cell. |
void |
setHeaderColor(java.awt.Color color)
Sets the header background color. |
void |
setHeaderNames(java.lang.String[] names)
Sets the header identifiers. |
void |
setMinChars(int chars)
Set the minimum number of char ro display. |
void |
setMinHeight(int height)
Sets the minimum height. |
void |
setRightMargin(int margin)
Sets the right margin. |
Methods inherited from class javax.swing.JTable |
---|
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, convertColumnIndexToModel, convertColumnIndexToView, convertRowIndexToModel, convertRowIndexToView, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUIClassID, getUpdateSelectionOnSort, getValueAt, isCellEditable, isCellSelected, isColumnSelected, isRowSelected, moveColumn, prepareEditor, prepareRenderer, print, print, print, print, print, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, tableChanged, updateUI, valueChanged |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, 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, 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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static int TIP_MAX_CHARS
public java.awt.event.MouseListener _mouseListener
Constructor Detail |
---|
public LyJTableComponent(java.awt.Image downImage, java.awt.Image upImage, java.awt.event.MouseListener mouseListener, javax.swing.event.ListSelectionListener selectionListener)
downImage
- the sort down imageupImage
- the sort up imagemouseListener
- the mouse listener of this tableselectionListener
- the selection listener of this tablepublic LyJTableComponent(java.awt.Image downImage, java.awt.Image upImage, java.awt.event.MouseListener mouseListener, javax.swing.event.ListSelectionListener selectionListener, boolean dragNDrop)
downImage
- the sort down imageupImage
- the sort up imagemouseListener
- the mouse listener of this tableselectionListener
- the selection listener of this tabledragNDrop
- Indicates that drag and drop is allowed on this component.Method Detail |
---|
public void initialize()
public void setDragAndDrop()
public boolean isEditing()
isEditing
in class javax.swing.JTable
JTable.isEditing()
public javax.swing.table.TableCellEditor getDefaultEditor(java.lang.Class<?> columnClass)
getDefaultEditor
in class javax.swing.JTable
public java.awt.Image getSortDownImage()
public java.awt.Image getSortUpImage()
public javax.swing.Icon getSortDownIcon()
public javax.swing.Icon getSortUpIcon()
public void addLyJTableMouseListener()
removeLyJTableMouseListener()
public void addLyJTableSelectionListener()
removeLyJTableSelectionListener()
public void removeLyJTableMouseListener()
addLyJTableMouseListener()
public void removeLyJTableSelectionListener()
addLyJTableSelectionListener()
public java.awt.event.MouseListener getLyJTableMouseListener()
public java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface javax.swing.Scrollable
getPreferredScrollableViewportSize
in class javax.swing.JTable
public void setMinChars(int chars)
chars
- the minimum number of char to displaypublic void setRightMargin(int margin)
margin
- the new right marginpublic void setMinHeight(int height)
height
- the new minimum heightpublic void setDisplayedHeight(int height)
height
- the new displayed heightpublic java.awt.Dimension getSize()
getSize
in class java.awt.Component
Component.getSize()
public java.awt.Dimension getCustomizedScrollablePreferredSize()
getCustomizedScrollablePreferredSize
in interface LyJCustomizedScrollable
LyJCustomizedScrollable.getCustomizedScrollablePreferredSize()
public LyJTableModel getTableModel()
public void createDefaultColumnsFromModel()
createDefaultColumnsFromModel
in class javax.swing.JTable
public void scrollToRow(int row)
row
- the index of the rowpublic void scrollToColumn(int column)
column
- the index of the columnpublic javax.swing.table.TableCellRenderer getCellRenderer(int row, int column)
getCellRenderer
in class javax.swing.JTable
public void setCellRenderer(javax.swing.table.TableCellRenderer cellRenderer)
cellRenderer
- the cell renderergetCellRenderer(int, int)
public void setHeaderNames(java.lang.String[] names)
names
- the array of columns identifierspublic boolean hasEditableCells()
public void setEditableCells(boolean hasEditableCells)
hasEditableCells
- the new parameter status.public void editNextCell(boolean next)
next
- indicates if next or previous cell must be edited.public void setHeaderColor(java.awt.Color color)
color
- the new background color for the headerpublic void actionPerformed(LyActionEvent e)
LyActionListener
actionPerformed
in interface LyActionListener
public void selectionPerformed(LySelectionEvent e)
LySelectionListener
selectionPerformed
in interface LySelectionListener
e
- description of the selection which has occuredpublic LyActionTransmitter getActionTransmitter()
LyEventTransmitter
getActionTransmitter
in interface LyEventTransmitter
public LySelectionTransmitter getSelectionTransmitter()
LyEventTransmitter
getSelectionTransmitter
in interface LyEventTransmitter
public java.lang.String getToolTipText(java.awt.event.MouseEvent e)
getToolTipText
in class javax.swing.JTable
public void setComputeHeight(boolean compute)
compute
- Indicates that height must be computed for each row of the table.public boolean isComputeHeight()
true
if height must be computed for each row of the table,
false
otherwisepublic void cacheHeight()
public int computeLevelHeight(int row, java.lang.String level)
row
- index of the row to be computedlevel
- level to be computed
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |