| java.lang.Object org.netbeans.modules.visualweb.css2.BoxList
BoxList | public class BoxList (Code) | | Maintains a list of boxes, which can be sorted in z-order.
author: Tor Norbye |
Constructor Summary | |
public | BoxList(int initialSize) Create a list of boxes. |
Method Summary | |
public void | add(CssBox box, CssBox after, CssBox before) Add a box to the list. | public CssBox | get(int index) Return the box at the given position in the list.
When the list is sorted, the higher the index, the
further up in the stack / the closer the box will
appear (e.g. | public int | indexOf(CssBox cssBox) | public boolean | remove(CssBox box) Remove the given box from the list and update parent indices. | public void | setKeepSorted(boolean keepSorted) Set whether or not the box list should be sorted
according to the z-order attribute on boxes. | public void | setSyncParentIndices(boolean sync) Set whether the box list should keep the parent indices
for the boxes synced as the box list is manipulated. | public int | size() | public String | toString() | public void | truncate(int pos) Truncate the boxlist to contain only the boxes up to and including
the given position.
Parameters: pos - The position of the last box to be left in the list. | public void | zsort() Sort the list in z order. |
BoxList | public BoxList(int initialSize)(Code) | | Create a list of boxes. The initialSize parameter is a hint
as to how large to make the list, but more boxes than that
can be added to the lsit.
|
add | public void add(CssBox box, CssBox after, CssBox before)(Code) | | Add a box to the list. This method will NOT preserve
the sortedness of the list, so if a sorted list is necessary,
the client must call sort again. If both after and before are null,
the box will be appended.
Parameters: after - Add the box after the given box, if not null Parameters: before - Add the box right before the given box, if not null |
get | public CssBox get(int index)(Code) | | Return the box at the given position in the list.
When the list is sorted, the higher the index, the
further up in the stack / the closer the box will
appear (e.g. higher indices occlude lower indices when
their coordinates overlap.)
|
remove | public boolean remove(CssBox box)(Code) | | Remove the given box from the list and update parent indices.
Returns true if the box was deleted, false if it was not found.
|
setKeepSorted | public void setKeepSorted(boolean keepSorted)(Code) | | Set whether or not the box list should be sorted
according to the z-order attribute on boxes.
Default is false.
|
setSyncParentIndices | public void setSyncParentIndices(boolean sync)(Code) | | Set whether the box list should keep the parent indices
for the boxes synced as the box list is manipulated.
|
size | public int size()(Code) | | Return the number of boxes in the list
|
truncate | public void truncate(int pos)(Code) | | Truncate the boxlist to contain only the boxes up to and including
the given position.
Parameters: pos - The position of the last box to be left in the list. Mustbe less than or equal to the size of the list. |
zsort | public void zsort()(Code) | | Sort the list in z order.
|
|
|