public class WFitLayout extends WSortLayout
限定符和类型 | 字段和说明 |
---|---|
static int |
SCROLL_BAR_WIDTH |
static int |
STATE_FULL |
static int |
STATE_ORIGIN |
DEFAULT_HEIGHT, DEFAULT_WIDTH, EVENT_AFTERINIT, EVENT_CLICK, MIN_HEIGHT, MIN_WIDTH, widgetList, XML_TAG
compInterval, hgap, vgap
background, borderStyle, margin
AFTEREDIT, AFTERINIT, BEFOREEDIT, CHANGE, DEFAULT_FONT_SIZE, disabled, EVENT_STATECHANGE, invisible, STOPEDIT, widgetName
构造器和说明 |
---|
WFitLayout()
构造函数
|
WFitLayout(java.lang.String widgetName)
构造方法,指定控件名
|
限定符和类型 | 方法和说明 |
---|---|
void |
calculateNoRelatedWhileRightBott(java.awt.Rectangle rectangle) |
void |
calculateRelatedComponent(java.awt.Rectangle rectangle) |
void |
calculateRelatedJson(java.awt.Rectangle rectangle,
CRBoundsWidget crBoundsWidget,
JSONObject jo) |
void |
calculateRelatedWidgets(java.awt.Rectangle rectangle,
CRBoundsWidget crBoundsWidget) |
boolean |
canCurrentMarginAvailable(PaddingMargin marg)
当前设置的边距值是否可用,若设置后有控件达到最小尺寸则返回false
|
JSONObject |
createJSONConfig(Repository repo,
Calculator c,
NodeVisitor visitor)
以JSONObject方式返回自适应布局的配置信息, 并且将自适应布局内所有控件的配置信息以JSONArray形式存放在JSONObject的"items"
字段下,其他的则为控件间隔 是否缩放 容器大小
|
protected JSONArray |
createJSONItems(Repository repo,
Calculator c,
NodeVisitor toFindChart)
以JSONArray方式返回布局内所有控件的配置信息
|
void |
dealInvisible()
处理组件内部不可见组件
|
int |
getActualHeight() |
int |
getActualWidth() |
int |
getAllCompHeight(java.util.List<CRBoundsWidget> Widgets) |
int |
getAllCompWidth(java.util.List<CRBoundsWidget> Widgets) |
WBodyLayoutType |
getBodyLayoutType() |
CRBoundsWidget |
getBoundsWidget(Widget widget)
返回对应的BoundsWidget
|
int |
getCompState()
返回控件在布局中状态
|
int |
getContainerHeight()
返回布局控件的高度
|
int |
getContainerWidth()
返回布局控件的宽度
|
int |
getContentHeight() |
int |
getContentWidth() |
int[] |
getHorComps()
获取水平方向上所有的x值
|
java.lang.String |
getLayoutToolTip()
鼠标提示
|
java.awt.Dimension |
getMinDesignSize()
layout的最小尺寸
|
double |
getResolutionScaling()
获取分辨率缩放参数
|
int[] |
getVertiComps()
获取垂直方向上所有的y值
|
java.lang.String |
getXType()
布局类型
|
void |
initWidgetsList() |
boolean |
isAppRelayout()
返回是否启用手机重布局
|
void |
processFitLayoutInterval(int actualWidth,
int actualHeight) |
void |
processFitLayoutMargin() |
void |
readXML(XMLableReader reader)
XML读取对象
|
boolean |
resetStyle() |
void |
resize(double width,
double height,
double fontScale)
重新调整大小
|
void |
resizeFitLayout(double width,
double height,
double fontScale) |
void |
setAllVisible(WFitLayout wFitLayout) |
void |
setAppRelayout(boolean value)
设置是否启用手机重布局
|
void |
setBounds(Widget data,
java.awt.Rectangle newBounds)
设置控件边界大小
|
void |
setCompState(int value)
设置组件原样缩放还是铺满
|
void |
setCompVisible(Widget widget,
JSONObject jo,
boolean visibility,
Form form,
java.util.Map<java.lang.String,java.lang.Object> para)
不同布局下设置组件可见和不可见
|
void |
setContainerHeight(int containerHeight)
设置布局控件的高度
|
void |
setContainerWidth(int containerWidth)
设置布局控件的宽度
|
void |
setHasResized(boolean hasResized) |
void |
setLayoutType(WBodyLayoutType layoutType) |
void |
setResolutionScaling(double resolutionScaling)
设置分辨率缩放参数
|
protected void |
writeLayoutTypeAttr(XMLPrintWriter writer) |
void |
writeXML(XMLPrintWriter writer)
XML写入对象
|
addMobileWidget, addMobileWidget, addToMobileList, addToMobileList, adjustOrder, clearMobileWidgetList, createItemIndexList, getMobileWidget, getMobileWidgetIterator, getMobileWidgetListSize, getOrderedMobileWidgetList, isContainsMoibleWidget, isSorted, removeMobileWidget, setSorted, updateSortedMobileWidgetList
addWidget, clone, createPara4Mobile, equals, getWidget, getWidget, getWidgetCount, getWidgetIndex, hashCode, isEditor, isScrollable, removeAll, removeWidget, replace, setScrollable, setWidgetIndex, supportedEvents, toImage
getCompInterval, getHgap, getVgap, setCompInterval, setHgap, setVgap
addWidgetAttrMark, clearMargin, getBackground, getBorderStyle, getMargin, getWidgetAttrMark, readExtra, setBackground, setBorderStyle, setBorderStyleNoBackground, setMargin
acceptType, changeOnlyVisibleAuthorityState, changeUsableAuthorityState, changeVisibleAuthorityState, cleanAuthority, dealWithPresentableValue, getDescription, getDisableAction, getEnableAction, getInvisibleAction, getLabelName, getVisibleAction, getWidgetName, getWidgetPrivilegeControl, hasDataOnInit, isChartRelated, isDirtyWidget, isDoneUsableAuthority, isDoneVisibleAuthority, isEnabled, isUsableAuthority, isVisible, isVisibleAuthority, resize, setChartRelated, setDescription, setEnabled, setLabelName, setVisible, setWidgetName, setWidgetPrivilegeControl, supportMobile, toImage, toString, updateChildBounds, value2Config
addListener, clearListeners, createJSONListener, createListeners, dealWithListener4Compatible, getConvertMap, getListener, getListenerSize
copy, getId, getNameSpace, setId, setNameSpace
getClassInfo, getData, invalidate, isLoad, setClassInfo, setData
public static final int STATE_FULL
public static final int STATE_ORIGIN
public static final int SCROLL_BAR_WIDTH
public WFitLayout()
public WFitLayout(java.lang.String widgetName)
widgetName
- 控件名public java.lang.String getLayoutToolTip()
getLayoutToolTip
在类中 WLayout
public boolean canCurrentMarginAvailable(PaddingMargin marg)
canCurrentMarginAvailable
在类中 WLayout
marg
- 边距public java.awt.Dimension getMinDesignSize()
getMinDesignSize
在类中 WLayout
public int[] getVertiComps()
public int[] getHorComps()
public java.lang.String getXType()
getXType
在类中 AbstractGapWidget
public CRBoundsWidget getBoundsWidget(Widget widget)
getBoundsWidget
在类中 WLayout
widget
- 控件public JSONObject createJSONConfig(Repository repo, Calculator c, NodeVisitor visitor) throws JSONException
createJSONConfig
在类中 WSortLayout
repo
- : see Repository正文c
- : 指定解析器visitor
- 查找JSONException
- json异常public void initWidgetsList()
public void calculateRelatedJson(java.awt.Rectangle rectangle, CRBoundsWidget crBoundsWidget, JSONObject jo) throws java.lang.Exception
java.lang.Exception
public void calculateRelatedWidgets(java.awt.Rectangle rectangle, CRBoundsWidget crBoundsWidget) throws java.lang.Exception
java.lang.Exception
public void calculateRelatedComponent(java.awt.Rectangle rectangle) throws java.lang.Exception
java.lang.Exception
public void calculateNoRelatedWhileRightBott(java.awt.Rectangle rectangle) throws java.lang.Exception
java.lang.Exception
public int getAllCompHeight(java.util.List<CRBoundsWidget> Widgets)
public int getAllCompWidth(java.util.List<CRBoundsWidget> Widgets)
public void processFitLayoutMargin()
public int getActualWidth()
public int getActualHeight()
public void processFitLayoutInterval(int actualWidth, int actualHeight)
protected JSONArray createJSONItems(Repository repo, Calculator c, NodeVisitor toFindChart) throws JSONException
createJSONItems
在类中 WLayout
repo
- : 环境变量c
- : 指定解析器JSONException
public void setBounds(Widget data, java.awt.Rectangle newBounds)
public void readXML(XMLableReader reader)
readXML
在接口中 XMLReadable
readXML
在类中 WSortLayout
reader
- 读取XMLableReader
public void writeXML(XMLPrintWriter writer)
writeXML
在接口中 XMLWriter
writeXML
在类中 WSortLayout
writer
- 写入protected void writeLayoutTypeAttr(XMLPrintWriter writer)
public int getCompState()
public void setCompState(int value)
value
- set是否缩放public double getResolutionScaling()
public void setResolutionScaling(double resolutionScaling)
resolutionScaling
- 缩放参数public WBodyLayoutType getBodyLayoutType()
public void setLayoutType(WBodyLayoutType layoutType)
public int getContainerWidth()
public void setContainerWidth(int containerWidth)
containerWidth
- the containerWidth to setpublic int getContainerHeight()
public void setContainerHeight(int containerHeight)
containerHeight
- the containerHeight to setpublic boolean isAppRelayout()
public void setAppRelayout(boolean value)
value
- set是否重布局public int getContentWidth()
getContentWidth
在类中 Widget
public int getContentHeight()
getContentHeight
在类中 Widget
public void setCompVisible(Widget widget, JSONObject jo, boolean visibility, Form form, java.util.Map<java.lang.String,java.lang.Object> para) throws java.lang.Exception
WLayout
setCompVisible
在类中 WLayout
widget
- 控件jo
- 返回信息visibility
- 可见性form
- 表单对象para
- 参数信息java.lang.Exception
public void setAllVisible(WFitLayout wFitLayout) throws java.lang.Exception
java.lang.Exception
public void setHasResized(boolean hasResized)
public void resize(double width, double height, double fontScale)
public boolean resetStyle()
public void resizeFitLayout(double width, double height, double fontScale)
public void dealInvisible() throws java.lang.Exception
Widget
dealInvisible
在类中 Widget
java.lang.Exception