javax.swing.text
public class ZoneView extends BoxView
Since: 1.3
Constructor Summary | |
---|---|
ZoneView(Element element, int axis)
Creates a new ZoneView for the specified element and axis.
|
Method Summary | |
---|---|
protected View | createZone(int p0, int p1)
Creates a zone for the specified range. |
int | getMaximumZoneSize()
Returns the maximum zone size. |
int | getMaxZonesLoaded()
Returns the number of zones that are allowed to be loaded.
|
protected int | getViewIndexAtPosition(int pos)
Returns the index of the child view at the document position
pos .
|
void | insertUpdate(DocumentEvent e, Shape a, ViewFactory vf) |
protected boolean | isZoneLoaded(View zone)
Returns true when the specified zone is loaded,
false otherwise. |
protected void | loadChildren(ViewFactory vf)
Overridden to not load all the child views. |
void | removeUpdate(DocumentEvent e, Shape a, ViewFactory vf) |
void | setMaximumZoneSize(int size)
Sets the maximum zone size. |
void | setMaxZonesLoaded(int num)
Sets the maximum number of zones that are allowed to be loaded at the
same time. |
protected void | unloadZone(View zone)
This unloads the specified zone. |
protected boolean | updateChildren(DocumentEvent.ElementChange ec, DocumentEvent e, ViewFactory vf) |
protected void | zoneWasLoaded(View zone)
Gets called after a zone has been loaded. |
Parameters: element the element for which to create a ZoneView axis the major layout axis for the box
Parameters: p0 the start of the range p1 the end of the range
Returns: the zone
Returns: the maximum zone size
See Also: ZoneView
Returns: the number of zones that are allowed to be loaded
See Also: ZoneView
pos
.
This overrides the CompositeView implementation because the ZoneView does
not provide a one to one mapping from Elements to Views.
Parameters: pos the document position
Returns: the index of the child view at the document position
pos
true
when the specified zone is loaded,
false
otherwise. The default implementation checks if
the zone view has child elements.
Parameters: zone the zone view to check
Returns: true
when the specified zone is loaded,
false
otherwise
Parameters: vf not used
Parameters: size the maximum zone size to set
See Also: getMaximumZoneSize
Parameters: num the number of zones allowed to be loaded at the same time
Throws: IllegalArgumentException if num <= 0
See Also: getMaxZonesLoaded
Parameters: zone the zone to be unloaded
Parameters: zone the zone that has been loaded