public abstract class WLayout extends AbstractGapWidget
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_HEIGHT |
static int |
DEFAULT_WIDTH |
static java.lang.String |
EVENT_AFTERINIT
初始化后事件
|
static java.lang.String |
EVENT_CLICK
点击事件
|
static int |
MIN_HEIGHT |
static int |
MIN_WIDTH |
protected java.util.List |
widgetList
当前容器中控件的集合
|
static java.lang.String |
XML_TAG
xml标签
|
compInterval, hgap, vgap
background, borderStyle, margin
AFTEREDIT, AFTERINIT, BEFOREEDIT, CHANGE, DEFAULT_FONT_SIZE, disabled, EVENT_STATECHANGE, invisible, STOPEDIT, widgetName
构造器和说明 |
---|
WLayout() |
限定符和类型 | 方法和说明 |
---|---|
void |
addWidget(Widget widget)
添加widget到list
|
boolean |
canCurrentMarginAvailable(PaddingMargin margin)
当前设置的边距值是否可用,若设置后有控件达到最小尺寸则返回false
|
java.lang.Object |
clone()
克隆
|
JSONObject |
createJSONConfig(Repository repo,
Calculator c,
NodeVisitor visitor)
返回布局的配置信息, 并且将布局内所有控件的配置信息以JSONArray形式存放在JSONObject的"items"字段
|
protected JSONArray |
createJSONItems(Repository repo,
Calculator c,
NodeVisitor toFindChart)
以JSONArray方式返回布局内所有控件的配置信息。
|
void |
createPara4Mobile(Repository repo,
JSONObject jo,
Form form)
生成移动端所用的参数面板控件信息
|
boolean |
equals(java.lang.Object obj)
equals
|
CRBoundsWidget |
getBoundsWidget(Widget widget)
返回对应的BoundsWidget
|
abstract java.lang.String |
getLayoutToolTip()
获取容器的提示
|
abstract java.awt.Dimension |
getMinDesignSize()
获取容器的设计最小dimension
|
Widget |
getWidget(int index)
获取指定index的widget
|
Widget |
getWidget(java.lang.String name)
获取指定name的widget
|
int |
getWidgetCount()
获取widget的数量
|
int |
getWidgetIndex(Widget widget)
获取指定index的widget
|
int |
hashCode()
hash值
|
boolean |
isEditor()
是否编辑
|
boolean |
isScrollable()
组件内是否可以滚动
|
void |
readXML(XMLableReader reader)
读取xml
|
void |
removeAll()
移除所有的widget
|
void |
removeWidget(Widget widget)
移除指定的widget
|
void |
replace(Widget widget,
Widget oldWidget)
替换老的widget
|
void |
resize(double width,
double height,
double fontScale)
后台容器自适应reize
|
void |
setBounds(Widget data,
java.awt.Rectangle newBounds)
设置控件边界大小
|
void |
setCompVisible(Widget widget,
JSONObject jo,
boolean visibility,
Form form,
java.util.Map<java.lang.String,java.lang.Object> para)
不同布局下设置组件可见和不可见
|
void |
setScrollable(boolean scrollable)
设置是否可以滚动
|
void |
setWidgetIndex(Widget widget,
int idx)
设置指定index的widget
|
java.lang.String[] |
supportedEvents()
支持的事件类型
|
void |
toImage(Calculator ca,
java.awt.Rectangle rec,
java.awt.Graphics g)
将当前控件转化为图片, 目前支持报表块与图表块
|
void |
writeXML(XMLPrintWriter writer)
输出xml
|
getCompInterval, getHgap, getVgap, getXType, 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 static final java.lang.String EVENT_AFTERINIT
public static final java.lang.String EVENT_CLICK
public static final java.lang.String XML_TAG
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public static int MIN_WIDTH
public static int MIN_HEIGHT
protected java.util.List widgetList
public boolean isEditor()
isEditor
在类中 AbstractGapWidget
public java.lang.String[] supportedEvents()
supportedEvents
在类中 AbstractGapWidget
public void addWidget(Widget widget)
widget
- 控件public void removeWidget(Widget widget)
widget
- 控件public void removeAll()
public int getWidgetCount()
public Widget getWidget(int index)
public Widget getWidget(java.lang.String name)
public int getWidgetIndex(Widget widget)
public void setWidgetIndex(Widget widget, int idx)
public void replace(Widget widget, Widget oldWidget)
widget
- 控件oldWidget
- 旧的控件public boolean isScrollable()
public void setScrollable(boolean scrollable)
public abstract java.lang.String getLayoutToolTip()
public abstract java.awt.Dimension getMinDesignSize()
public boolean canCurrentMarginAvailable(PaddingMargin margin)
canCurrentMarginAvailable
在类中 AbstractBorderStyleWidget
margin
- 边距public JSONObject createJSONConfig(Repository repo, Calculator c, NodeVisitor visitor) throws JSONException
createJSONConfig
在类中 AbstractGapWidget
repo
- 文本c
- 指定解析器visitor
- 查找JSONException
- 异常protected JSONArray createJSONItems(Repository repo, Calculator c, NodeVisitor toFindChart) throws JSONException
repo
- : see Repositoryc
- : 指定解析器JSONException
public void readXML(XMLableReader reader)
readXML
在接口中 XMLReadable
readXML
在类中 AbstractGapWidget
reader
- XML读取对象XMLableReader
public void writeXML(XMLPrintWriter writer)
writeXML
在接口中 XMLWriter
writeXML
在类中 AbstractGapWidget
writer
- the PrintWriter.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
在接口中 FCloneable
clone
在类中 AbstractBorderStyleWidget
java.lang.CloneNotSupportedException
- 如果克隆失败则抛出此异常public void toImage(Calculator ca, java.awt.Rectangle rec, java.awt.Graphics g)
public void createPara4Mobile(Repository repo, JSONObject jo, Form form) throws JSONException
repo
- 会话环境jo
- 参数界面json对象form
- 当前表单对象JSONException
public CRBoundsWidget getBoundsWidget(Widget widget)
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
widget
- 控件jo
- 返回信息visibility
- 可见性form
- 表单对象para
- 参数信息java.lang.Exception
public void setBounds(Widget data, java.awt.Rectangle newBounds)
data
- 控件newBounds
- 边界