public final class WGridLayout extends WLayout
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
构造器和说明 |
---|
WGridLayout() |
WGridLayout(int rows,
int cols,
int hgap,
int vgap) |
限定符和类型 | 方法和说明 |
---|---|
void |
addWidget(Widget widget)
添加控件
|
void |
addWidget(Widget widget,
int col,
int row)
添加控件
|
void |
addWidget(Widget widget,
java.awt.Point p)
添加控件
|
JSONObject |
createJSONConfig(Repository repo,
Calculator c,
NodeVisitor toFindChart)
* 生成形如
{columns: 4,
rows : 3,
items : [
// 格子布局的第一个格子位置
{ column : 0,
row : 0,
el : {.....}
},
// 格子布局的最后一个格子位置
{
column : 3,
row : 2
el : {....}
}
]
}
|
protected JSONArray |
createJSONItems(Repository repo,
Calculator c,
NodeVisitor toFindChart)
以JSONArray方式返回布局内所有控件的配置信息。
|
int |
getColumns() |
java.lang.String |
getLayoutToolTip()
获取容器的提示
|
java.awt.Dimension |
getMinDesignSize()
获取容器的设计最小dimension
|
int |
getRows() |
Widget |
getWidget(java.awt.Point p) |
java.lang.String |
getXType()
控件xType,每个控件的特有标记和控件一一对应
|
java.util.Iterator |
iterator()
迭代器
|
void |
readXML(XMLableReader reader)
读取xml
|
void |
removeAll()
删除所以控件
|
void |
removeWidget(Widget widget)
删除指定个控件
|
void |
setColumns(int cols) |
void |
setRows(int rows) |
void |
writeXML(XMLPrintWriter writer)
输出xml
|
canCurrentMarginAvailable, clone, createPara4Mobile, equals, getBoundsWidget, getWidget, getWidget, getWidgetCount, getWidgetIndex, hashCode, isEditor, isScrollable, replace, resize, setBounds, setCompVisible, 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, dealInvisible, dealWithPresentableValue, getContentHeight, getContentWidth, 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 WGridLayout()
public WGridLayout(int rows, int cols, int hgap, int vgap)
public void addWidget(Widget widget, int col, int row)
widget
- 控件col
- 列row
- 行public void addWidget(Widget widget, java.awt.Point p)
widget
- 控件p
- 点public void removeWidget(Widget widget)
removeWidget
在类中 WLayout
widget
- 控件public java.lang.String getLayoutToolTip()
WLayout
getLayoutToolTip
在类中 WLayout
public java.awt.Dimension getMinDesignSize()
WLayout
getMinDesignSize
在类中 WLayout
public java.util.Iterator iterator()
public Widget getWidget(java.awt.Point p)
public int getRows()
public void setRows(int rows)
public int getColumns()
public void setColumns(int cols)
public java.lang.String getXType()
Widget
getXType
在类中 AbstractGapWidget
public JSONObject createJSONConfig(Repository repo, Calculator c, NodeVisitor toFindChart) throws JSONException
createJSONConfig
在类中 WLayout
repo
- 文本c
- 指定解析器toFindChart
- 查找JSONException
- 抛错protected JSONArray createJSONItems(Repository repo, Calculator c, NodeVisitor toFindChart) throws JSONException
createJSONItems
在类中 WLayout
toFindChart
- 图表查找repo
- : see Repositoryc
- : 指定解析器JSONException
public void readXML(XMLableReader reader)
WLayout
readXML
在接口中 XMLReadable
readXML
在类中 WLayout
reader
- XML读取对象XMLableReader