ariba.ui.table
Class AWTDisplayGroup

java.lang.Object
  extended by ariba.ui.table.AWTDisplayGroup

public final class AWTDisplayGroup
extends java.lang.Object


Nested Class Summary
static interface AWTDisplayGroup.Grouper
           
static class AWTDisplayGroup.GroupingState
          use this type to mark grouping rows, tell if they're expanded, ...
static class AWTDisplayGroup.InitialExpandType
           
 
Field Summary
 int _scrollTopOffset
           
static int GroupingDefaultAllOpen
           
static int GroupingDefaultClosed
           
static int GroupingDefaultFirstOpen
           
static int GroupingDefaultFitBatch
          dynamically choose open all, or close all
 
Constructor Summary
AWTDisplayGroup()
          Constructor and misc
 
Method Summary
 void _setItemToForceVisible(java.lang.Object rootItem, java.lang.Object leafItem)
           
 void _setNumberOfObjectsPerBatch(int size)
           
 void addItemListener(AWTDataTable.Column listener, java.lang.Object listenerState)
          Tell us about a column that needs to hear about changes to the current item.
A display group will inform a single column about changes to the current item via callbacks to AWTDataTable.Column.setCurrentItem()
 java.util.List allObjects()
           
static java.lang.Object[] arrayFromOrderedList(java.lang.Object list)
          TODO: move to ListUtil or ArrayUtil.
 int batchCount()
           
 int batchEndIndex()
           
 int batchStartIndex()
          This is the index of the top row of the batch.
 boolean bufferSelectionEdits()
           
 void centerBatchOnRow(int desiredScrollTopIndex)
          Doesn't quite center the batch on the row, more like 33% above, 66% below.
 void checkDataSource()
           
 void checkObjectArray(java.lang.Object list)
          Check if our objectArray is out of sync.
As side effect, if the object array has changed, remember the list as the new value.
 void clearSelection()
           
 java.util.List computeSortedObjects(java.util.List objects)
           
 int currentBatchIndex()
           
 boolean currentDetailExpanded()
           
 boolean currentGroupingExpanded()
           
 AWTDisplayGroup.GroupingState currentGroupingState()
           
 java.lang.Object currentItem()
           
 java.util.Map currentItemExtras()
          This is a useful bag for storing state associated with a row.
 int currentItemGroupingCount()
           
 boolean currentSelectedState()
          Selected / Selection Support
 AWTDataSource dataSource()
          FIXME: stub implementations...
 AWTDisplayGroup.InitialExpandType detailInitialExpansionType()
           
 boolean detailRowAutoCollapse()
           
 java.util.List displayedObjects()
          Use with care -- causes array to get created.
 void displayNextBatch()
           
 void displayPreviousBatch()
           
 java.util.List<AWTSortOrdering> effectiveSortOrderings()
          This returns the concatenation of the primarySortOrdering and sortOrderings.
 java.util.Map extrasForItem(java.lang.Object item)
           
 void fetch()
           
 java.util.List filteredObjects()
           
 void flushSelectionEdits()
           
 boolean forceCurrentItemVisibleLatch()
           
 java.lang.Object getListenerState(AWTDataTable.Column listener)
           
 int groupingExpansionDefault()
           
 java.lang.String groupingKey()
           
 AWTDisplayGroup.GroupingState groupingState(java.lang.Object row)
           
 boolean hasMultipleBatches()
           
 void hibernate()
           
 java.lang.Object insert()
           
 java.lang.Object insert(boolean autoAdd)
           
 boolean isCurrentItemGrouping()
           
 boolean isCurrentItemVisible()
           
 boolean isGroupingExpanded(java.lang.Object row)
           
 boolean isGroupingRow(java.lang.Object row)
           
 boolean isResetScrollTop()
           
static boolean listsIdentical(java.util.List l1, java.util.List l2)
          TODO: move to ListUtil.
 int numberOfDisplayedObjects()
           
 int numberOfObjectsPerBatch()
           
static boolean orderedListArrayMatch(java.lang.Object list, java.lang.Object[] array)
          TODO: move to ListUtil or ArrayUtil.
static AWTSortOrdering orderingMatchingKey(java.util.List list, java.lang.String key)
           
 OutlineState outlineState()
           
 AWTPivotState pivotState()
           
 java.util.List<AWTSortOrdering> primarySortOrderings()
           
 int scrollBottomCount()
           
 int scrollTopCount()
          Accessors for AWTScrollTableWrapper for scroll faulting
 int scrollTopIndex()
          The scrollTopIndex is the index of the top row that is currently displayed.
 java.lang.Object selectedObject()
          the first of the selectedObjects that is part of the displayedObjects
 java.util.List selectedObjects()
          the "source of truth" on the selection
 void selectNext()
           
 void selectPrevious()
           
 void setBatchStartIndex(int index)
          This accepts any value.
 void setBufferSelectionEdits(boolean yn)
           
 void setCurrentBatchIndex(int num)
           
 void setCurrentGroupingExpanded(boolean expanded)
           
 void setCurrentItem(java.lang.Object item)
          Item / Current Item Support
 void setCurrentSelectedState(boolean state)
           
 void setDataSource(AWTDataSource dataSource)
           
 void setDetailInitialExpansionType(AWTDisplayGroup.InitialExpandType detailInitialExpansionType)
           
 void setDetailRowAutoCollapse(boolean detailRowAutoCollapse)
           
 void setGroupingExpanded(java.lang.Object row, boolean expanded)
           
 void setGroupingExpansionDefault(int value)
           
 void setGroupingKey(java.lang.String keyPathString)
           
 void setGroupSortOrdering(AWTSortOrdering ordering)
           
 void setItemToForceVisible(java.lang.Object item)
           
 void setNumberOfObjectsPerBatch(int size)
           
 void setObjectArray(java.util.List allObjects)
          Caching Support and misc methods
 void setOutlineAllObjects(java.util.List list)
          Called by OutlineRepetition with the unrolled set of objects.
 void setOutlineState(OutlineState state)
           
 void setPathToForceVisible(java.util.List path)
           
 void setPrimarySortOrderings(java.util.List sortOrderings)
          These can be set as a baseline (unalterable by the user) pre-sort.
 void setScrollBatchSize(int size)
           
 int setScrollTopIndex(int index)
          See setScrollTopIndex(int, boolean)().
 int setScrollTopIndex(int index, boolean forceUpdateBatchStartIndex)
          This sets and validates the scroll top index.
 void setSelectedObject(java.lang.Object object)
          Selection manipulation.
 void setSelectedObjects(java.util.List selection)
           
 void setSortOrderings(java.util.List sortOrderings)
          Sorting -- these are set interactively by the user of the table
 void setUseBatching(boolean yn)
          the useBatching() property determines whether displayedObjects() is a subarray of the whole array, or whether it's a the entire array (and the client is just rendering the subset of items from batchStartIndex() to batchEndIndex().
 java.util.List sortedChildList(java.util.List objects)
           
 java.util.List sortedMainList(java.util.List objects)
           
 java.util.List<AWTSortOrdering> sortOrderings()
           
static java.lang.Object subarray(java.lang.Object array, int startIndex, int stopIndex)
          TODO: move to ArrayUtil.
 void toggleCurrentDetailExpanded()
           
 void updateDisplayedObjects()
           
 boolean useBatching()
           
static java.util.List vectorFromOrderedList(java.lang.Object list)
          TODO: move to ListUtil.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GroupingDefaultClosed

public static final int GroupingDefaultClosed
See Also:
Constant Field Values

GroupingDefaultAllOpen

public static final int GroupingDefaultAllOpen
See Also:
Constant Field Values

GroupingDefaultFirstOpen

public static final int GroupingDefaultFirstOpen
See Also:
Constant Field Values

GroupingDefaultFitBatch

public static final int GroupingDefaultFitBatch
dynamically choose open all, or close all

See Also:
Constant Field Values

_scrollTopOffset

public int _scrollTopOffset
Constructor Detail

AWTDisplayGroup

public AWTDisplayGroup()
Constructor and misc

Method Detail

addItemListener

public void addItemListener(AWTDataTable.Column listener,
                            java.lang.Object listenerState)
Tell us about a column that needs to hear about changes to the current item.
A display group will inform a single column about changes to the current item via callbacks to AWTDataTable.Column.setCurrentItem()

Parameters:
listener - the column that is told about current items

getListenerState

public java.lang.Object getListenerState(AWTDataTable.Column listener)

pivotState

public AWTPivotState pivotState()

setObjectArray

public void setObjectArray(java.util.List allObjects)
Caching Support and misc methods


isResetScrollTop

public boolean isResetScrollTop()

vectorFromOrderedList

public static java.util.List vectorFromOrderedList(java.lang.Object list)
TODO: move to ListUtil.

Parameters:
list -
Returns:

arrayFromOrderedList

public static java.lang.Object[] arrayFromOrderedList(java.lang.Object list)
TODO: move to ListUtil or ArrayUtil.

Parameters:
list -
Returns:

orderedListArrayMatch

public static boolean orderedListArrayMatch(java.lang.Object list,
                                            java.lang.Object[] array)
TODO: move to ListUtil or ArrayUtil.

Parameters:
list -
Returns:

checkObjectArray

public void checkObjectArray(java.lang.Object list)
Check if our objectArray is out of sync.
As side effect, if the object array has changed, remember the list as the new value.

Parameters:
list - The new object array

checkDataSource

public void checkDataSource()

hibernate

public void hibernate()

allObjects

public java.util.List allObjects()

effectiveSortOrderings

public java.util.List<AWTSortOrdering> effectiveSortOrderings()
This returns the concatenation of the primarySortOrdering and sortOrderings.


orderingMatchingKey

public static AWTSortOrdering orderingMatchingKey(java.util.List list,
                                                  java.lang.String key)
Parameters:
list - of type List<AWTSortOrdering>
key -
Returns:

computeSortedObjects

public java.util.List computeSortedObjects(java.util.List objects)

filteredObjects

public java.util.List filteredObjects()
Returns:
Throws:
java.lang.NullPointerException - if setObjectArray(java.util.List)() has not been called yet. setObjectArray will call this though...

sortedMainList

public java.util.List sortedMainList(java.util.List objects)

sortedChildList

public java.util.List sortedChildList(java.util.List objects)

listsIdentical

public static boolean listsIdentical(java.util.List l1,
                                     java.util.List l2)
TODO: move to ListUtil.

Parameters:
l1 -
l2 -
Returns:

setOutlineAllObjects

public void setOutlineAllObjects(java.util.List list)
Called by OutlineRepetition with the unrolled set of objects. For the purpose of batching, etc we need to treat this as the full displayed set.


groupingExpansionDefault

public int groupingExpansionDefault()

setGroupingExpansionDefault

public void setGroupingExpansionDefault(int value)

currentGroupingState

public AWTDisplayGroup.GroupingState currentGroupingState()

groupingState

public AWTDisplayGroup.GroupingState groupingState(java.lang.Object row)

isGroupingRow

public boolean isGroupingRow(java.lang.Object row)

isCurrentItemGrouping

public boolean isCurrentItemGrouping()

isGroupingExpanded

public boolean isGroupingExpanded(java.lang.Object row)

setGroupingExpanded

public void setGroupingExpanded(java.lang.Object row,
                                boolean expanded)

setGroupSortOrdering

public void setGroupSortOrdering(AWTSortOrdering ordering)

setGroupingKey

public void setGroupingKey(java.lang.String keyPathString)

groupingKey

public java.lang.String groupingKey()

currentGroupingExpanded

public boolean currentGroupingExpanded()

currentItemGroupingCount

public int currentItemGroupingCount()

isCurrentItemVisible

public boolean isCurrentItemVisible()

setCurrentGroupingExpanded

public void setCurrentGroupingExpanded(boolean expanded)

detailInitialExpansionType

public AWTDisplayGroup.InitialExpandType detailInitialExpansionType()

setDetailInitialExpansionType

public void setDetailInitialExpansionType(AWTDisplayGroup.InitialExpandType detailInitialExpansionType)

detailRowAutoCollapse

public boolean detailRowAutoCollapse()

setDetailRowAutoCollapse

public void setDetailRowAutoCollapse(boolean detailRowAutoCollapse)

currentDetailExpanded

public boolean currentDetailExpanded()

toggleCurrentDetailExpanded

public void toggleCurrentDetailExpanded()

displayedObjects

public java.util.List displayedObjects()
Use with care -- causes array to get created. This is the list of objects that will be displayed between batchStartIndex() and batchEndIndex(). Clients rendering are best using filteredObjects() directly with AWFor set to use.

See Also:
setUseBatching(boolean)

outlineState

public OutlineState outlineState()

setOutlineState

public void setOutlineState(OutlineState state)

updateDisplayedObjects

public void updateDisplayedObjects()

setCurrentItem

public void setCurrentItem(java.lang.Object item)
Item / Current Item Support


currentItem

public java.lang.Object currentItem()

_setItemToForceVisible

public void _setItemToForceVisible(java.lang.Object rootItem,
                                   java.lang.Object leafItem)

setItemToForceVisible

public void setItemToForceVisible(java.lang.Object item)

setPathToForceVisible

public void setPathToForceVisible(java.util.List path)

forceCurrentItemVisibleLatch

public boolean forceCurrentItemVisibleLatch()

extrasForItem

public java.util.Map extrasForItem(java.lang.Object item)

currentItemExtras

public java.util.Map currentItemExtras()
This is a useful bag for storing state associated with a row.


currentSelectedState

public boolean currentSelectedState()
Selected / Selection Support


bufferSelectionEdits

public boolean bufferSelectionEdits()

setBufferSelectionEdits

public void setBufferSelectionEdits(boolean yn)

flushSelectionEdits

public void flushSelectionEdits()

setCurrentSelectedState

public void setCurrentSelectedState(boolean state)

selectedObjects

public java.util.List selectedObjects()
the "source of truth" on the selection


setSelectedObjects

public void setSelectedObjects(java.util.List selection)

selectedObject

public java.lang.Object selectedObject()
the first of the selectedObjects that is part of the displayedObjects


setSelectedObject

public void setSelectedObject(java.lang.Object object)
Selection manipulation. These will push the visible batch to include the first selected object.


selectNext

public void selectNext()

selectPrevious

public void selectPrevious()

clearSelection

public void clearSelection()

setUseBatching

public void setUseBatching(boolean yn)
the useBatching() property determines whether displayedObjects() is a subarray of the whole array, or whether it's a the entire array (and the client is just rendering the subset of items from batchStartIndex() to batchEndIndex().


useBatching

public boolean useBatching()

setBatchStartIndex

public void setBatchStartIndex(int index)
This accepts any value.

Parameters:
index - This accepts any integer and edits it to a valid value.
See Also:
batchStartIndex()

batchStartIndex

public int batchStartIndex()
This is the index of the top row of the batch.

Returns:

batchEndIndex

public int batchEndIndex()

numberOfDisplayedObjects

public int numberOfDisplayedObjects()

_setNumberOfObjectsPerBatch

public void _setNumberOfObjectsPerBatch(int size)

setNumberOfObjectsPerBatch

public void setNumberOfObjectsPerBatch(int size)

setScrollBatchSize

public void setScrollBatchSize(int size)

numberOfObjectsPerBatch

public int numberOfObjectsPerBatch()

batchCount

public int batchCount()

hasMultipleBatches

public boolean hasMultipleBatches()

currentBatchIndex

public int currentBatchIndex()

setCurrentBatchIndex

public void setCurrentBatchIndex(int num)

displayNextBatch

public void displayNextBatch()

displayPreviousBatch

public void displayPreviousBatch()

scrollTopCount

public int scrollTopCount()
Accessors for AWTScrollTableWrapper for scroll faulting


scrollBottomCount

public int scrollBottomCount()

centerBatchOnRow

public void centerBatchOnRow(int desiredScrollTopIndex)
Doesn't quite center the batch on the row, more like 33% above, 66% below. Will adjust the input value to validity.

Parameters:
desiredScrollTopIndex - The row index to move the batch to.
See Also:
setUseBatching(boolean), scrollTopIndex()

scrollTopIndex

public int scrollTopIndex()
The scrollTopIndex is the index of the top row that is currently displayed.

Returns:
The scrollTopIndex

setScrollTopIndex

public int setScrollTopIndex(int index)
See setScrollTopIndex(int, boolean)().

Parameters:
index -
Returns:

setScrollTopIndex

public int setScrollTopIndex(int index,
                             boolean forceUpdateBatchStartIndex)
This sets and validates the scroll top index.

Parameters:
index - the new value, can be any int
forceUpdateBatchStartIndex - force an update of the internal batching data.
Returns:
the new (possibly modified) scroll top index.
See Also:
scrollTopIndex()

subarray

public static java.lang.Object subarray(java.lang.Object array,
                                        int startIndex,
                                        int stopIndex)
TODO: move to ArrayUtil.

Parameters:
array -
startIndex -
stopIndex -
Returns:

setSortOrderings

public void setSortOrderings(java.util.List sortOrderings)
Sorting -- these are set interactively by the user of the table

Parameters:
sortOrderings - of type List<AWTSortOrdering>

sortOrderings

public java.util.List<AWTSortOrdering> sortOrderings()

setPrimarySortOrderings

public void setPrimarySortOrderings(java.util.List sortOrderings)
These can be set as a baseline (unalterable by the user) pre-sort.

Parameters:
sortOrderings - of type List<AWTSortOrdering>

primarySortOrderings

public java.util.List<AWTSortOrdering> primarySortOrderings()

dataSource

public AWTDataSource dataSource()
FIXME: stub implementations...


setDataSource

public void setDataSource(AWTDataSource dataSource)

fetch

public void fetch()

insert

public java.lang.Object insert()

insert

public java.lang.Object insert(boolean autoAdd)


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.