Package docking.widgets.fieldpanel
Interface LayoutModel
- All Known Implementing Classes:
ClangLayoutController
,EmptyBigLayoutModel
,ListingModelAdapter
,TestBigLayoutModel
The Big Layout Model interface. Objects that implement this interface can be dispayed
using a BigFieldPanel.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutModelListener
(LayoutModelListener listener) Adds a LayoutModelListener to be notified when changes occur.void
Returns true if the model knows about changes that haven't yet been told to the LayoutModelListeners.getIndexAfter
(BigInteger index) Returns the closest larger index in the model that has a non-null layout.getIndexBefore
(BigInteger index) Returns the closest smaller index in the model that has a non-null layout.getLayout
(BigInteger index) Returns a layout for the given index.Returns the total number of indexes.Returns the width of the largest possible layout.boolean
Returns true if every index returns a non-null layout and all the layouts are the same height.default LayoutModelIterator
iterator()
Returns an iterator that walks all the Layout items in this model.default LayoutModelIterator
iterator
(BigInteger startIndex) Returns an iterator that walks all the Layout items in this model, starting at the specified index.void
removeLayoutModelListener
(LayoutModelListener listener) Removes a LayoutModelListener to be notified when changes occur.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
isUniform
boolean isUniform()Returns true if every index returns a non-null layout and all the layouts are the same height. -
getPreferredViewSize
Dimension getPreferredViewSize()Returns the width of the largest possible layout. -
getNumIndexes
BigInteger getNumIndexes()Returns the total number of indexes. -
getIndexAfter
Returns the closest larger index in the model that has a non-null layout.- Parameters:
index
- for which to find the next index with a non-null layout.- Returns:
- returns the closest larger index in the model that has a non-null layout.
-
getIndexBefore
Returns the closest smaller index in the model that has a non-null layout.- Parameters:
index
- for which to find the previous index with a non-null layout.- Returns:
- returns the closest smaller index in the model that has a non-null layout.
-
getLayout
Returns a layout for the given index.- Parameters:
index
- the index of the layout to retrieve.
-
iterator
Returns an iterator that walks all the Layout items in this model. -
iterator
Returns an iterator that walks all the Layout items in this model, starting at the specified index.- Parameters:
startIndex
- start index in the model to beginning iterating- Returns:
- new iterator
-
addLayoutModelListener
Adds a LayoutModelListener to be notified when changes occur.- Parameters:
listener
- the LayoutModelListener to add.
-
removeLayoutModelListener
Removes a LayoutModelListener to be notified when changes occur.- Parameters:
listener
- the LayoutModelListener to remove.
-
flushChanges
void flushChanges()Returns true if the model knows about changes that haven't yet been told to the LayoutModelListeners.
-