public class CheckBoxList extends Table
Table
to implement a check-able list of literals.
The model for the embedded JotyJTable object maps the second column on the
literals of the LiteralStruct
associated with the
CheckListTerm
instance.
Then a data hosting vector of integer, of the same size of the list in that way derived, is built.
The first column renders a javax.swing.JCheckBox
object that is
mapped to the content of the data vector (it behaves checked if the
corresponding - topologically speaking - integer is 1). The vector values are
set by means of the setChecked
method that is invoked either during
the loading of data, managed by the CheListTerm instance, or on a user action
on the check-box.
A particular implementation is made when the component works as secondary item: if some row is 'checked' the row of the master CheckBoxList, corresponding to the secondary buffer currently used by the CheckListTerm instance, is also checked; typically the primary CheckListTerm instance has the 'dataLoadOnly' attribute set, that is, it doesn't participate in the storage transaction and it has its checks checked only on data loading and as effect of the selection made in the secondary component.
Application.LiteralStruct
,
CheckListTerm
,
Serialized FormTable.JotyCellEditor, Table.JotyJTable
ScrollGridPane.ClickHandler, ScrollGridPane.ListSelectionHandler
javax.swing.JScrollPane.AccessibleJScrollPane, javax.swing.JScrollPane.ScrollBar
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
java.lang.String |
m_caption |
TermContainerPanel |
m_termContainerPanel |
java.lang.String |
m_truthFieldName |
m_absoluteColWidths, m_blueColor, m_colAlignement, m_colWidths, m_dataTableCellRenderer, m_jtable, m_lightBlueColor, m_lightGreyColor, m_model, m_sortClickDenied, m_whiteColor
m_changeEventsEnabled, m_gridTerm
m_panel, m_term
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
Constructor and Description |
---|
CheckBoxList(Panel panel,
GridTerm term) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
alignmentAndCellEditingRequired() |
void |
buildTruthVector() |
void |
createModel() |
void |
enableChkList(boolean state) |
java.lang.Integer |
getCheck(int index) |
protected javax.swing.table.DefaultTableCellRenderer |
getDefaultRenderer(int colIndex) |
long |
getItemData(int row) |
java.lang.String |
getSelectedText() |
java.lang.String |
getText(int row) |
void |
initVerboseLayout() |
protected boolean |
isEditing() |
protected void |
onSelchange(javax.swing.event.ListSelectionEvent e) |
void |
removeAll() |
void |
setCheck(int index,
int val) |
void |
setColsProperties()
Sets the properties of the columns of the JotyJTable object.
|
protected void |
setDataTableCellRenderer() |
protected void |
setHeaderListener()
Installs a mouse listener on the header of the JotyJtable object to
allow the invoking of the re-sorting of the grid data.
|
protected void |
setInnerComponentEnabled(boolean truth) |
void |
setListener() |
void |
setTermData(int iPos,
java.lang.Object rowKey) |
addToolTipRow, applyCellRenderer, doActualRemoval, ensureIndexIsVisible, getBuffer, getCurValueAt, getPaneComponent, getRowQty, getSelectedColumn, getSelection, getSortInfo, init, manageBarEnable, managedAppend, managedDeleteRow, managedListLoad, manageDoubleClick, newDataAvailable, newDataAvailable, newDataAvailableWithoutEvents, nextRow, previousRow, repaintCell, repaintCell, setAllColsAlignement, setColAlignement, setCustomRowHeight, setEnabled, setSelection, setSortInfo, setToolTipText, signalRemoval
addTerm, getRelatedEnable, managedUpdateRow
getTerm, setFormat
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, updateUI
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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, 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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
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, 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, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TermContainerPanel m_termContainerPanel
public java.lang.String m_caption
public java.lang.String m_truthFieldName
protected boolean alignmentAndCellEditingRequired()
alignmentAndCellEditingRequired
in class Table
public void buildTruthVector()
public void createModel()
createModel
in class Table
public void enableChkList(boolean state)
public java.lang.Integer getCheck(int index)
protected javax.swing.table.DefaultTableCellRenderer getDefaultRenderer(int colIndex)
getDefaultRenderer
in class Table
public long getItemData(int row)
public java.lang.String getSelectedText()
public java.lang.String getText(int row)
public void initVerboseLayout()
initVerboseLayout
in class ScrollGridPane
protected boolean isEditing()
protected void onSelchange(javax.swing.event.ListSelectionEvent e)
onSelchange
in class ScrollGridPane
public void removeAll()
removeAll
in class ScrollGridPane
public void setCheck(int index, int val)
public void setColsProperties()
Table
It makes direct use of the the information in the
GridRowDescriptor
object localized in the building of the model.
setColsProperties
in class Table
GridRowDescriptor
protected void setDataTableCellRenderer()
setDataTableCellRenderer
in class Table
protected void setHeaderListener()
Table
setHeaderListener
in class Table
protected void setInnerComponentEnabled(boolean truth)
setInnerComponentEnabled
in class ScrollPane
public void setListener()
public void setTermData(int iPos, java.lang.Object rowKey)