com.swfm.mica.widgets
Class MiTable

java.lang.Object
  extended bycom.swfm.mica.core.MiPart
      extended bycom.swfm.mica.core.MiContainer
          extended bycom.swfm.mica.layouts.MiLayout
              extended bycom.swfm.mica.core.MiVisibleContainer
                  extended bycom.swfm.mica.widgets.MiWidget
                      extended bycom.swfm.mica.widgets.MiTable
All Implemented Interfaces:
MiiActionTypes, MiiAdjustableGrid, MiiAttributeTypes, MiiBackgroundableGrid, MiiCopyable, MiiDragAndDropParticipant, MiiEventTypes, MiiLayout, MiiNames, MiiPropertyTypes, MiiScrollableData, MiiSelectableTableContentSupplier, MiiTypes
Direct Known Subclasses:
MiList, MiTreeList

public class MiTable
extends MiWidget
implements MiiScrollableData, MiiBackgroundableGrid, MiiAdjustableGrid, MiiSelectableTableContentSupplier

getColumnDefaults(columnNumber).setStatusHelp(hlepInfo);

Version:
%I% %G%
Author:
Michael L. Davis

Field Summary
static int COLUMN_FOOTER_NUMBER
           
static int COLUMN_HEADER_NUMBER
           
static java.lang.String Mi_CELL_BG_PROPERTY_NAME
           
static java.lang.String Mi_COLUMN_FOOTER_BG_PROPERTY_NAME
           
static java.lang.String Mi_COLUMN_HEADER_BG_PROPERTY_NAME
           
static java.lang.String Mi_CONTENTS_BG_PROPERTY_NAME
           
static int Mi_LINE_BY_LINE_POLICY
           
static int Mi_PAGE_BY_PAGE_POLICY
           
static int Mi_PIXEL_BY_PIXEL_POLICY
           
static java.lang.String Mi_ROW_FOOTER_BG_PROPERTY_NAME
           
static java.lang.String Mi_ROW_HEADER_BG_PROPERTY_NAME
           
static java.lang.String Mi_TABLE_CELL_FULLY_INTERACTIVE_CONTENT_GRAPHICS_RESORUCE_NAME
           
static int ROW_FOOTER_NUMBER
           
static int ROW_HEADER_NUMBER
           
                   
Constructor Summary
MiTable()
           
 
Method Summary
 MiTableCell addCell(int rowNumber, int columnNumber, MiPart part)
           
 MiTableCell addCell(int rowNumber, int columnNumber, java.lang.String value)
           
 void addCell(MiTableCell cell)
           
 void appendColumn(MiTableCells cells)
           
 void appendItem(MiPart graphics)
          Appends the given item to this container.
 void appendItem(java.lang.String text)
           
 void appendItems(Strings strings)
           
 void appendNonOverlappingContentsCells(MiTableCells cells)
          For speed, also only cell.getGraphics which are widgets are actually appended to this table as graphics as are therefore pickable using mouse.
 void appendRow(MiTableCells cells)
           
 int calcNumberOfVisibleColumns()
           
 int calcNumberOfVisibleRows()
           
 void createCellsToFillInAnyGapsCreatedByNewCell()
          Can be called in conjunction with (after) appendNonOverlappingContentsCells for slower but more flexible and still fairly fast adding of cells
 MiGridBackgrounds getBackgroundManager()
           
 MiTableCell getCell(int index)
           
 MiTableCell getCell(int rowNumber, int columnNumber)
           
 MiBounds getCellBounds(int rowNumber, int columnNumber, MiBounds bounds)
           
 MiTableCell getCellWithTag(java.lang.Object tag)
           
 MiBounds getColumnBounds(int columnNumber, int startRow, int endRow, MiBounds bounds)
           
 MiTableCells getColumnCells(int columnNumber)
           
 MiTableCell getColumnDefaults(int columnNumber)
           
 MiPart getColumnFooterBackground()
           
 MiMargins getColumnFooterMargins()
           
 MiPart getColumnHeaderBackground()
           
 MiMargins getColumnHeaderMargins()
           
 Strings getColumnValues(int columnNumber)
           
 double getColumnWidth(int columnNumber)
           
 MiTableCell getContentAreaDefaults()
           
 MiPart getContentsBackground()
           
 MiBounds getContentsBounds(MiBounds b)
           
 MiTableCells getContentsCells()
           
 MiMargins getContentsMargins()
          Gets the margins that surround the table contents, the rows and columns excluding of any headers or footers
 int getContextCursor(MiBounds area)
          Gets the context cursor assigned to the given area of this MiPart.
 MiiContextMenu getContextMenu(MiBounds area)
          Gets the context menu, if any, assigned to this MiPart at the given point.
 boolean getHasFixedTotalNumberOfColumns()
           
 boolean getHasFixedTotalNumberOfRows()
           
 int getHorizontalScrollAlignmentPolicy()
           
 int getIndexOfItem(java.lang.String value)
           
 int getIndexOfItem(java.lang.String value, boolean ignoreCase)
           
 MiPart getItem(int index)
          Gets the item of this container at the given index.
 int getLeftColumnOfLastVisibleScreen()
           
 boolean getLeftGravitatesToCellBoundry()
           
 int getLeftVisibleColumn()
           
 MiTableCell getMadeColumnDefaults(int columnNumber)
           
 MiTableCell getMadeRowDefaults(int rowNumber)
           
 int getMaximumNumberOfVisibleColumns()
           
 int getMaximumNumberOfVisibleRows()
           
 double getMinimumColumnWidth()
           
 int getMinimumNumberOfVisibleColumns()
           
 int getMinimumNumberOfVisibleRows()
           
 double getMinimumRowHeight()
           
 double getNormalizedHorizontalAmountVisible()
          Gets the normalized (between 0.0 and 1.0 inclusive) horizontal size of the data (0.0 indicates none of the data is visible and 1.0 indicates all of the data's width is visible).
 double getNormalizedHorizontalPosition()
          Gets the normalized (between 0.0 and 1.0 inclusive) horizontal position of the data (0.0 is the left side and 1.0 is the right side).
 double getNormalizedVerticalAmountVisible()
          Gets the normalized (between 0.0 and 1.0 inclusive) vertical size of the data (0.0 indicates none of the data is visible and 1.0 indicates all of the data's height is visible).
 double getNormalizedVerticalPosition()
          Gets the normalized (between 0.0 and 1.0 inclusive) vertical position of the data (0.0 is the bottom side and 1.0 is the top side).
 int getNumberOfCells()
           
 int getNumberOfColumns()
           
 int getNumberOfItems()
          Gets the number of items this container has.
 int getNumberOfRows()
           
 int getNumberOfVisibleColumns()
           
 int getNumberOfVisibleRowAtTopIfBottomRowIsGivenRowNumber(int rowNumber)
           
 int getNumberOfVisibleRows()
           
 MiiOverlayRenderer getOverlayRenderer()
           
 double getPercentToScrollWhenTopDoesNotGravitateToCellBoundry()
           
 int getPreferredNumberOfVisibleColumns()
           
 int getPreferredNumberOfVisibleRows()
           
 java.lang.String getPropertyValue(java.lang.String name)
          Gets the textual value of the property with the given name.
 MiBounds getRowBounds(int rowNumber, int startColumn, int endColumn, MiBounds bounds)
           
 MiTableCells getRowCells(int rowNumber)
           
 MiTableCell getRowDefaults(int rowNumber)
           
 MiPart getRowFooterBackground()
           
 MiMargins getRowFooterMargins()
           
 MiPart getRowHeaderBackground()
           
 MiMargins getRowHeaderMargins()
           
 Strings getRowValues(int rowNumber)
           
 MiMargins getSectionMargins()
          Gets the margins that surround the whole table, outside of any headers or footers
 java.lang.String getSelectedItem()
           
 MiTableSelectionManager getSelectionManager()
           
 MiTableSortManager getSortManager()
           
 MiiHelpInfo getStatusHelp(MiPoint point)
          Gets the context cursor assigned to the given point of this MiPart.
 MiTableHeaderAndFooterManager getTableHeaderAndFooterManager()
           
 MiTableLayout getTableLayout()
           
 MiTableCell getTableWideDefaults()
           
 MiiHelpInfo getToolHintHelp(MiPoint point)
          Gets the tool hint assigned to the given point of this MiPart.
 boolean getTopGravitatesToCellBoundry()
           
 int getTopRowOfLastVisibleScreen()
           
 int getTopVisibleRow()
           
 int getTotalNumberOfColumns()
           
 int getTotalNumberOfRows()
           
 int getVerticalScrollAlignmentPolicy()
           
 double getVisibleColumnLayoutWidth()
           
 int[] getVisibleColumns()
           
 double getVisibleRowLayoutHeight()
           
 int[] getVisibleRows()
           
 boolean hasColumnFooters()
           
 boolean hasColumnHeaders()
           
 boolean hasRowFooters()
           
 boolean hasRowHeaders()
           
 void insertColumn(MiTableCells cells, int columnNumber)
           
 void insertRow(MiTableCells cells, int rowNumber)
           
 void invalidateArea()
          Invalidates the entire area (drawBounds) of this MiPart.
 void invalidateArea(MiBounds area)
          Invalidates the given area of this container that intersects the draw bounds.
 boolean isCellIntersectingRowColumn(int cellRowNum, int cellColumnNum, int rowNum, int columnNum)
           
 boolean isCellVisible(MiTableCell cell)
           
 boolean isHandlingScrollingDiscreteAmountsLocally()
          Gets whether actions like scrollLineDown is handled in this interfaces implementation or whether these type of methods are merely to be notified of the scrolling calculated elsewhere and executed by calling scrollToNormalizedVerticalPosition.
 boolean isSelectable(int rowNumber, int columnNumber)
           
 boolean isVisibleCell(int rowNumber, int columnNumber)
           
 void makeVisible(int rowNumber, int columnNumber)
           
 void moveColumn(int fromColumnNumber, int toColumnNumber)
           
 void moveRow(int fromRowNumber, int toRowNumber)
           
 MiTableCell pickCell(MiBounds pickArea)
           
 boolean pickCell(MiBounds pickArea, int[] rowNumber, int[] columnNumber)
           
 MiTableCell pickCellIncludingHeadersAndFooters(MiBounds pickArea)
           
 MiTableCells pickCells(MiBounds pickArea)
           
 void refreshLookAndFeel()
           
 void removeAllCells()
           
 void removeAllCellsAndHeadersAndFooterCells()
           
 void removeAllColumnFooters()
           
 void removeAllColumnHeaders()
           
 void removeAllItems()
          Removes all items from this container.
 void removeAllRowFooters()
           
 void removeAllRowHeaders()
           
 void removeCellsAddedToFillInAnyGapsCreatedByNewCell()
          Can be called in conjunction with (before) appendNonOverlappingContentsCells for slower but more flexible and still fairly fast adding of cells
 void removeColumn(int columnNumber)
           
 void removeRow(int rowNumber)
           
 void render(MiRenderer renderer)
           
 void renderOverlay(MiRenderer renderer)
           
 void replaceColumn(MiTableCells cells, int columnNumber)
           
 void replaceRow(MiTableCells cells, int rowNumber)
           
 void scrollChunkDown()
          Scrolls one chunk down (conversely, move the data one chunk up).
 void scrollChunkLeft()
          Scrolls one chunk left (conversely, move the data one chunk right).
 void scrollChunkRight()
          Scrolls one chunk right (conversely, move the data one chunk left).
 void scrollChunkUp()
          Scrolls one chunk up (conversely, move the data one chunk down).
 void scrollLineDown()
          Scrolls one line down (conversely, move the data one line up).
 void scrollLineLeft()
          Scrolls one line left (conversely, move the data one line right).
 void scrollLineRight()
          Scrolls one line right (conversely, move the data one line left).
 void scrollLineUp()
          Scrolls one line up (conversely, move the data one line down).
 void scrollPageDown()
          Scrolls one page down (conversely, move the data one page up).
 void scrollPageLeft()
          Scrolls one page left (conversely, move the data one page right).
 void scrollPageRight()
          Scrolls one page right (conversely, move the data one page left).
 void scrollPageUp()
          Scrolls one page up (conversely, move the data one page down).
 void scrollToBottom()
          Scrolls to the bottom of the data.
 void scrollToLeftSide()
          Scrolls to the left side of the data.
 void scrollToNormalizedHorizontalPosition(double normalizedLocation)
          Scrolls to the bottom of the data.
 void scrollToNormalizedVerticalPosition(double normalizedLocation)
          Scrolls to the top of the data.
 void scrollToRightSide()
          Scrolls to the right side of the data.
 void scrollToTop()
          Scrolls to the top of the data.
 void setBackgroundManager(MiGridBackgrounds backgrounds)
           
 void setColumnDefaults(MiTableCell cell)
           
 void setColumnFooterBackground(MiPart border)
           
 void setColumnFooterMargins(MiMargins m)
           
 void setColumnHeaderBackground(MiPart border)
           
 void setColumnHeaderMargins(MiMargins m)
           
 void setColumnVisibility(int columnNumber, boolean isVisible)
           
 void setColumnWidth(int columnNumber, double width)
           
 void setContentAreaDefaults(MiTableCell cell)
           
 void setContents(Strings strings)
          Sets the contents (list of values) this widget displays.
 void setContentsBackground(MiPart border)
           
 void setContentsMargins(MiMargins m)
          Sets the margins that surround the table contents, the rows and columns excluding of any headers or footers
 void setDoubleBufferedScrollEnabled(boolean flag)
          default = true
 void setHasFixedTotalNumberOfColumns(boolean flag)
          Specifies whether or not there are a fixed number of columns.
 void setHasFixedTotalNumberOfRows(boolean flag)
          Specifies whether or not there are a fixed number of rows.
 void setHeaderAndFooterMargins(MiMargins m)
           
 void setHorizontalScrollAlignmentPolicy(int policy)
           
 void setLeftGravitatesToCellBoundry(boolean flag)
           
 void setLeftVisibleColumn(int number)
           
 void setMaximumNumberOfVisibleColumns(int number)
           
 void setMaximumNumberOfVisibleRows(int number)
           
 void setMinimumColumnWidth(double width)
           
 void setMinimumNumberOfVisibleColumns(int number)
           
 void setMinimumNumberOfVisibleRows(int number)
           
 void setMinimumRowHeight(double height)
           
 void setNormalizedHorizontalPosition(double position)
           
 void setNormalizedVerticalPosition(double position)
           
 void setOverlayRenderer(MiiOverlayRenderer renderer)
           
 void setPercentToScrollWhenTopDoesNotGravitateToCellBoundry(double normalizedAmount)
           
 void setPreferredNumberOfVisibleColumns(int number)
           
 void setPreferredNumberOfVisibleRows(int number)
           
 void setPropertyValue(java.lang.String name, java.lang.String value)
          Sets the property with the given name to the given value.
 void setRowDefaults(MiTableCell cell)
           
 void setRowFooterBackground(MiPart border)
           
 void setRowFooterMargins(MiMargins m)
           
 void setRowHeaderBackground(MiPart border)
           
 void setRowHeaderMargins(MiMargins m)
           
 void setRowHeight(int rowNumber, double height)
           
 void setRowVisibility(int rowNumber, boolean isVisible)
           
 void setSectionMargins(MiMargins m)
          Sets the margins that surround the whole table, outside of any headers or footers
 void setSelectionManager(MiTableSelectionManager manager)
           
 void setSortManager(MiTableSortManager manager)
           
 void setTableHeaderAndFooterManager(MiTableHeaderAndFooterManager manager)
           
 void setTableLayout(MiTableLayout layout)
           
 void setTableWideDefaults(MiTableCell cell)
           
 void setTopGravitatesToCellBoundry(boolean flag)
           
 void setTopVisibleRow(int number)
           
 void setTotalNumberOfColumns(int numberOfColumns)
           
 void setTotalNumberOfRows(int numberOfRows)
           
 void setVerticalScrollAlignmentPolicy(int policy)
           
 void setVisibleColumnLayoutWidth(double w)
          This overrides the 'estimatedWidth' used for calculating the size of the visible columns to display during layout's calculation of minimum and preferred size.
 void setVisibleRowLayoutHeight(double h)
          This overrides the 'estimatedHeight' used for calculating the size of the visible rows to display during layout's calculation of minimum and preferred size Otherwise the actual height of the displayed rows is used whenever this table is re-layout'd.
 void switchColumns(int oneColumnNumber, int otherColumnNumber)
           
 void switchColumns(MiTableCells cells, int oneColumnNumber, int otherColumnNumber)
           
 void switchRows(int oneRowNumber, int otherRowNumber)
           
 boolean useNormalizedPositionForContinuousHorizontalAdjustment()
           
 boolean useNormalizedPositionForContinuousVerticalAdjustment()
           
 
Methods inherited from class com.swfm.mica.widgets.MiWidget
copy, doExport, getContents, getEnterKeyFocusAttributes, getEnterKeyFocusBackgroundColor, getEnterKeyFocusBorderLook, getEnterKeyFocusColor, getEnterKeyFocusStatusHelp, getInSensitiveAttributes, getInSensitiveBackgroundColor, getInSensitiveBorderLook, getInSensitiveColor, getInSensitiveStatusHelp, getKeyboardFocusAttributes, getKeyboardFocusBackgroundColor, getKeyboardFocusBorderLook, getKeyboardFocusColor, getKeyboardFocusStatusHelp, getMouseFocusAttributes, getMouseFocusBackgroundColor, getMouseFocusBorderLook, getMouseFocusColor, getMouseFocusStatusHelp, getNormalAttributes, getNormalBackgroundColor, getNormalBorderLook, getNormalColor, getNormalStatusHelp, getPropertyDescriptions, getRadioStateEnforcer, getSelectedAttributes, getSelectedBackgroundColor, getSelectedBorderLook, getSelectedColor, getSelectedStatusHelp, getToolkit, getValue, getWidgetAttributes, isAutoAttributesEnabled, isDesignTime, select, setAttributes, setAutoAttributesEnabled, setCurrentBackgroundColor, setCurrentColor, setEnterKeyFocus, setEnterKeyFocusAttributes, setEnterKeyFocusBackgroundColor, setEnterKeyFocusBorderLook, setEnterKeyFocusColor, setEnterKeyFocusStatusHelpMessage, setInSensitiveAttributes, setInSensitiveBackgroundColor, setInSensitiveBorderLook, setInSensitiveColor, setInSensitiveStatusHelpMessage, setKeyboardFocus, setKeyboardFocusAttributes, setKeyboardFocusBackgroundColor, setKeyboardFocusBorderLook, setKeyboardFocusColor, setKeyboardFocusStatusHelpMessage, setMouseFocus, setMouseFocusAttributes, setMouseFocusBackgroundColor, setMouseFocusBorderLook, setMouseFocusColor, setMouseFocusStatusHelpMessage, setNormalAttributes, setNormalBackgroundColor, setNormalBorderLook, setNormalColor, setNormalStatusHelpMessage, setPropertyValues, setRadioStateEnforcer, setSelectedAttributes, setSelectedBackgroundColor, setSelectedBorderLook, setSelectedColor, setSelectedStatusHelpMessage, setSensitive, setValue, setWidgetAttributes, setWidgetAttributes
 
Methods inherited from class com.swfm.mica.core.MiVisibleContainer
calcMinimumSize, calcPreferredSize, getContainerLayoutSpec, getDisplaysFocusBorder, getInnerBounds, getIntersectionWithLine, getOKToDrawOutsideInnerBounds, getShadowShape, getShape, getTotalMargins, getVisibleContainerAutomaticLayoutEnabled, isShapeShrinkToFitEnabled, pick, setContainerLayoutSpec, setDisplaysFocusBorder, setMargins, setOKToDrawOutsideInnerBounds, setShape, setShape, setShapeShrinkToFitEnabled, setVisibleContainerAutomaticLayoutEnabled
 
Methods inherited from class com.swfm.mica.layouts.MiLayout
determinesPreferredAndMinimumSizes, getAlleyHSpacing, getAlleyMargins, getAlleyVSpacing, getCellMargins, getCellMargins, getElementHJustification, getElementHSizing, getElementVJustification, getElementVSizing, getInsetMargins, getInsetMargins, getLastElementJustification, getTarget, getUniqueElementIndex, getUniqueElementSizing, isEnabled, isIndependantOfTargetPosition, isScalingOfPartsWhenBoundsChangesHandledDuringLayout, layoutParts, makeCopy, setAlleyHSpacing, setAlleySpacing, setAlleyVSpacing, setCellMargins, setCellMargins, setElementHJustification, setElementHSizing, setElementJustification, setElementSizing, setElementVJustification, setElementVSizing, setEnabled, setInsetMargins, setInsetMargins, setLastElementJustification, setScalingOfPartsWhenBoundsChangesHandledDuringLayout, setTarget, setUniqueElementIndex, setUniqueElementSizing, toString
 
Methods inherited from class com.swfm.mica.core.MiContainer
appendPart, containsPart, deepCopy, doImport, getIndexOfPart, getKeepConnectionsBelowNodes, getNumberOfParts, getPart, getPart, getSupportedImportFormats, hasEventHandlers, hasValidCachedEventHandlerInfo, insertPart, invalidateCachedEventHandlerInfo, isContainerOf, isContainerOf, isContainerOfWithAttachments, pickDeepListContents, pickObject, removeAllParts, removePart, removePart, setKeepConnectionsBelowNodes, setPart, translate
 
Methods inherited from class com.swfm.mica.core.MiPart
_reCalcBounds, _render, _replaceBounds, _setContainer, _setDrawManager, _setValidatingLayout, appendActionHandler, appendActionHandler, appendActionHandler, appendActionHandler, appendActionHandler, appendAttachment, appendAttachment, appendCommandHandler, appendCommandHandler, appendCommandHandler, appendConnection, appendContainer, appendEventHandler,