站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

DefaultViewLayoutState (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.lib.editor.view
Class DefaultViewLayoutState

java.lang.Object
  extended by org.netbeans.lib.editor.view.SimpleViewLayoutState
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.netbeans.editor.view.spi.ViewLayoutState
ViewLayoutState.Parent
 
Field Summary
 
Fields inherited from class org.netbeans.lib.editor.view.SimpleViewLayoutState
LAST_USED_BIT
 
Constructor Summary
DefaultViewLayoutState(View v)
           
 
Method Summary
 float getLayoutMinorAxisMaximumSpan()
          Get the maximum span of the view along minor axis.
 float getLayoutMinorAxisMinimumSpan()
          Get the minimum span of the view along minor axis.
protected  boolean minorAxisUpdateLayout(int minorAxis)
           
 void setLayoutMinorAxisMaximumSpan(float layoutMinorAxisMaximumSpan)
           
 void setLayoutMinorAxisMinimumSpan(float layoutMinorAxisMinimumSpan)
           
 
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
 

Constructor Detail

DefaultViewLayoutState

public DefaultViewLayoutState(View v)
Method Detail

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)

org.netbeans.modules.editor.lib/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.