public abstract class AbstractLayoutAdapter extends java.lang.Object implements LayoutAdapter
| 限定符和类型 | 字段和说明 |
|---|---|
protected XLayoutContainer |
container |
protected java.awt.LayoutManager |
layout |
| 构造器和说明 |
|---|
AbstractLayoutAdapter(XLayoutContainer container) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addAfter(XCreator target,
XCreator added)
插在目标组件后面
|
boolean |
addBean(XCreator creator,
int x,
int y)
组件的ComponentAdapter在添加组件时,如果发现布局管理器不为空,会继而调用该布局管理器的
addComp方法来完成组件的具体添加。
|
void |
addBefore(XCreator target,
XCreator added)
目标控件位置插入组件
|
protected abstract void |
addComp(XCreator creator,
int x,
int y) |
void |
addNextComponent(XCreator dragged)
增加下一个组件
|
boolean |
canAcceptMoreComponent()
是否能接收更多的组件
|
protected void |
delete(XCreator creator,
int creatorWidth,
int creatorHeight) |
void |
fix(XCreator creator)
有的控件在拖拽调整大小后需要根据自身内容重新计算下当前的尺寸是否合适,如果不合适,就需要重新fix一下
|
XLayoutContainer |
getContainer() |
ConstraintsGroupModel |
getLayoutConstraints(XCreator creator) |
GroupModel |
getLayoutProperties() |
HoverPainter |
getPainter()
返回该布局管理适配器的Painter,为容器提供放置位置的标识。
|
void |
removeBean(XCreator creator,
int creatorWidth,
int creatorHeight)
删除组件
|
void |
showComponent(XCreator child)
显示parent的字组件child,解决CardLayout中显示某个非显示组件的特殊情况
|
boolean |
supportBackupSize()
是否支持用备份大小
|
boolean |
whetherUseBackupSize(XCreator xCreator)
是否使用控件备份大小
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacceptprotected XLayoutContainer container
protected java.awt.LayoutManager layout
public AbstractLayoutAdapter(XLayoutContainer container)
public boolean whetherUseBackupSize(XCreator xCreator)
xCreator - 控件public boolean supportBackupSize()
public void fix(XCreator creator)
fix 在接口中 LayoutAdaptercreator - 组件public void showComponent(XCreator child)
showComponent 在接口中 LayoutAdapterchild - 组件public boolean addBean(XCreator creator, int x, int y)
addBean 在接口中 LayoutAdaptercreator - 被添加的新组件x - 添加的位置x,该位置是相对于container的y - 添加的位置y,该位置是相对于container的public void removeBean(XCreator creator, int creatorWidth, int creatorHeight)
removeBean 在接口中 LayoutAdaptercreator - 组件creatorWidth - creatorHeight - protected void delete(XCreator creator, int creatorWidth, int creatorHeight)
protected abstract void addComp(XCreator creator, int x, int y)
public void addNextComponent(XCreator dragged)
addNextComponent 在接口中 LayoutAdapterdragged - 组件public void addBefore(XCreator target, XCreator added)
addBefore 在接口中 LayoutAdaptertarget - 目标added - 增加组件public void addAfter(XCreator target, XCreator added)
addAfter 在接口中 LayoutAdaptertarget - 目标added - 增加组件public HoverPainter getPainter()
LayoutAdaptergetPainter 在接口中 LayoutAdapterpublic boolean canAcceptMoreComponent()
canAcceptMoreComponent 在接口中 LayoutAdapterpublic ConstraintsGroupModel getLayoutConstraints(XCreator creator)
getLayoutConstraints 在接口中 LayoutAdapterpublic GroupModel getLayoutProperties()
getLayoutProperties 在接口中 LayoutAdapterpublic XLayoutContainer getContainer()