当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
DefaultViewLayoutState (Editor Library) - NetBeans API Javadoc (Current Development Version)
org.netbeans.lib.editor.view
Class DefaultViewLayoutState
java.lang.Object
org.netbeans.lib.editor.view.SimpleViewLayoutState
org.netbeans.lib.editor.view.DefaultViewLayoutState
- All Implemented Interfaces:
- ViewLayoutState
public class DefaultViewLayoutState
- extends SimpleViewLayoutState
Extension of SimpleViewLayoutState
that thoroughly handles minimum and maximum spans.
Methods inherited from class org.netbeans.lib.editor.view.SimpleViewLayoutState |
clearStatusBits, doUpdateLayout, getLayoutMajorAxisPreferredSpan, getLayoutMajorAxisPreferredSpanFloat, getLayoutMajorAxisRawOffset, getLayoutMinorAxisAlignment, getLayoutMinorAxisPreferredSpan, getLayoutStateParent, getMajorAxis, getMinorAxis, getStatusBits, getView, getViewRawIndex, isFlyweight, isLayoutValid, isStatusBitsNonZero, isXMajorAxis, markViewSizeInvalid, selectLayoutMajorAxis, setLayoutMajorAxisPreferredSpan, setLayoutMajorAxisRawOffset, setLayoutMinorAxisAlignment, setLayoutMinorAxisPreferredSpan, setStatusBits, setViewRawIndex, updateLayout, viewPreferenceChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultViewLayoutState
public DefaultViewLayoutState(View v)
minorAxisUpdateLayout
protected boolean minorAxisUpdateLayout(int minorAxis)
- Overrides:
minorAxisUpdateLayout
in class SimpleViewLayoutState
getLayoutMinorAxisMaximumSpan
public float getLayoutMinorAxisMaximumSpan()
- Description copied from interface:
ViewLayoutState
- Get the maximum span of the view along minor axis.
The value is expected to be cached for fast access.
As the default GapBoxView
implementations
do not use the maximum span of their children
the particular layout state may decide not to cache
the maximum span value and return preferred span instead
to save memory that would otherwise be used for caching variables.
If there is a dedicated variable for this value then
that variable gets updated by ViewLayoutState.updateLayout()
which usually happens once the view
has called View.preferenceChanged()
in the parent.
After the value gets updated the layout state must immediately call
Parent.minorAxisPreferenceChanged()
to notify the parent about the change of minor span.
- Specified by:
getLayoutMinorAxisMaximumSpan
in interface ViewLayoutState
- Overrides:
getLayoutMinorAxisMaximumSpan
in class SimpleViewLayoutState
setLayoutMinorAxisMaximumSpan
public void setLayoutMinorAxisMaximumSpan(float layoutMinorAxisMaximumSpan)
getLayoutMinorAxisMinimumSpan
public float getLayoutMinorAxisMinimumSpan()
- Description copied from interface:
ViewLayoutState
- Get the minimum span of the view along minor axis.
The value is expected to be cached for fast access.
By default GapBoxView
implementations
do not use the minimum span of their children
so the particular layout state may decide not to cache
the minimum span value and return preferred span instead
to save memory that would otherwise be used for caching variables.
If there is a dedicated variable for this value then
that variable should be updated during ViewLayoutState.updateLayout()
which usually happens once the view
has called View.preferenceChanged()
in the parent.
After the value gets updated the layout state must immediately call
Parent.minorAxisPreferenceChanged()
to notify the parent about the change of minor span.
- Specified by:
getLayoutMinorAxisMinimumSpan
in interface ViewLayoutState
- Overrides:
getLayoutMinorAxisMinimumSpan
in class SimpleViewLayoutState
setLayoutMinorAxisMinimumSpan
public void setLayoutMinorAxisMinimumSpan(float layoutMinorAxisMinimumSpan)