public class FormDesigner extends TargetComponent<Form> implements javax.swing.event.TreeSelectionListener, java.lang.reflect.InvocationHandler, BaseFormDesigner, ParaDefinitePane
限定符和类型 | 字段和说明 |
---|---|
protected java.util.List<UpdateAction> |
designerActions |
protected static java.awt.Dimension |
LARGE_PREFERRED_SIZE |
protected static java.util.ArrayList<java.lang.String> |
NAME_ARRAY_LIST |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
构造器和说明 |
---|
FormDesigner(Form form) |
FormDesigner(Form form,
javax.swing.Action switchAction) |
限定符和类型 | 方法和说明 |
---|---|
void |
addDesignerEditListener(DesignerEditListener listener)
增加监听事件
|
void |
addingAllParameter2Editor()
一键添加所有参数
|
void |
addingParameter2Editor(Parameter parameter)
加入参数到参数面板
|
void |
addingParameter2EditorWithQueryButton(Parameter parameter)
加入参数到参数面板,有查询按钮
|
void |
addInvocationHandler(java.lang.reflect.InvocationHandler h)
增加组件事件
|
void |
addParaComponent()
加入参数面板
|
boolean |
autoAddComponent(XCreator xCreator,
int x,
int y)
自动添加组件
|
void |
cancelFormat()
取消格式
|
void |
copy()
复制
|
AuthorityEditPane |
createAuthorityEditPane()
返回表单控件权限编辑pane
|
protected FormDesignerModeForSpecial<?> |
createFormDesignerTargetMode() |
boolean |
cut()
剪切
|
void |
dmlActions(java.util.List<UpdateAction> actions)
扩展菜单项
|
void |
doMousePress(double evtX,
double evtY)
鼠标按定位置(evtX, evtY).
|
UpdateAction[] |
getActions()
返回复制粘贴删除等动作
鼠标右键菜单
|
AddingModel |
getAddingModel() |
FormArea |
getArea()
返回表单区域
|
XCreator |
getComponentAt(int x,
int y) |
XCreator |
getComponentAt(int x,
int y,
XCreator[] except) |
XCreator |
getComponentAt(java.awt.event.MouseEvent e) |
XCreator |
getComponentAt(java.awt.Point p) |
FormDesignerModeForSpecial<?> |
getDesignerMode() |
ConnectorHelper |
getDrawLineHelper()
返回连线类
|
javax.swing.JPanel |
getEastDownPane() |
javax.swing.JPanel |
getEastUpPane() |
CreatorEventListenerTable |
getEditListenerTable() |
FormElementCaseProvider |
getElementCase() |
FormElementCaseContainerProvider |
getElementCaseContainer() |
java.lang.String |
getElementCaseContainerName() |
java.awt.Dimension |
getElementCaseContainerSize() |
Direction |
getLoc2Root(java.awt.event.MouseEvent e) |
int |
getMenuState() |
Parameter[] |
getNoRepeatParas(Parameter[] paras) |
protected javax.swing.border.Border |
getOuterBorder() |
protected java.awt.Rectangle |
getOutlineBounds() |
protected java.awt.Insets |
getOutlineInsets() |
Painter |
getPainter() |
XLayoutContainer |
getParaComponent() |
int |
getParaHeight()
返回参数界面高度
|
Parameter[] |
getParameterArray() |
int |
getResolution() |
XLayoutContainer |
getRootComponent() |
SelectionModel |
getSelectionModel() |
StateModel |
getStateModel() |
ToolBarMenuDockPlus |
getToolBarMenuDockPlus()
提供默认空实现。
|
java.awt.Component |
getTopContainer()
返回根节点父容器
|
boolean |
hasWAbsoluteLayout()
表单则判断参数面板是否为绝对布局
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
更新界面布局,重绘
|
boolean |
isCurrentComponentMovableDown() |
boolean |
isCurrentComponentMovableUp() |
boolean |
isDrawLineMode()
是否画线模式
|
boolean |
isFormParaDesigner()
是否是报表的参数面板
|
boolean |
isReportBlockEditing()
是否为报表块编辑
|
boolean |
isRoot(XCreator comp)
是否为底层容器
|
boolean |
isRootRelatedAction(java.lang.String name)
是否含有action名
|
boolean |
isRootSelected()
是否选中了自适应布局或底层form
|
boolean |
isSupportAuthority()
是否支持权限编辑
|
boolean |
isWidgetsIntersect() |
boolean |
isWithQueryButton()
是否有查询按钮
|
void |
makeVisible(XCreator comp)
显示组件
|
MenuDef[] |
menus4Target()
工具栏菜单
|
void |
paintContent(java.awt.Graphics clipg)
绘制组件根节点
|
void |
paintPara(java.awt.Graphics clipg) |
boolean |
paste()
粘贴
|
void |
populateParameterPropertyPane()
刷新控件树面板
|
void |
populateRootSize()
同步
|
boolean |
prepareForAdd(XCreator creator,
int x,
int y,
XWParameterLayout layout)
在参数很多时,全部添加的时候,可以向下一次排版,若去掉就会在参数面板堆到一起
|
void |
refreshDesignerUI()
刷新界面渲染容器
|
void |
refreshParameter()
刷新参数
|
void |
refreshRoot()
刷新底层容器
|
void |
removeParaComponent()
删除参数界面
|
void |
removeSelection()
移除选中状态
|
boolean |
renameCreator(XCreator creator,
java.lang.String newName)
是否重命名控件
|
void |
resetEditorComponentBounds()
重置组件边界
|
void |
selectComponents(java.awt.event.MouseEvent e)
在拖拽区域选择方式鼠标释放时调用此函数来更新所选择的组件
|
void |
setDrawLineMode(boolean mode)
设置DrawLineMode
|
void |
setElementCase(FormElementCaseProvider elementCase) |
void |
setElementCaseBackground(java.awt.image.BufferedImage image) |
void |
setElementCaseContainer(FormElementCaseContainerProvider elementCaseContainer) |
void |
setPainter(Painter p) |
void |
setParaHeight(int height)
重置para的高度
|
void |
setParameterArray(Parameter[] ps) |
void |
setParent(FormArea formArea)
设置上层区域
|
void |
setReportBlockEditing(boolean isEditing)
设置是否为报表块编辑
|
void |
setResolution(int resolution) |
protected void |
setRootComponent(XLayoutContainer component) |
protected void |
setToolbarButtons() |
void |
setWidgetsIntersect(boolean isWidgetsIntersect) |
ShortCut[] |
shortcut4TemplateMenu()
模版菜单
|
ShortCut[] |
shortCuts4Authority()
权限菜单
|
void |
showAuthorityEditPane()
显示权限编辑界面
|
void |
showMessageDialog(java.lang.String message) |
void |
startDraggingBean(XCreator xCreator)
拖拽准备
|
void |
startDraggingComponent(XCreator xCreator,
java.awt.event.MouseEvent lastPressEvent,
int x,
int y)
拖拽时相关处理
|
void |
stopAddingState()
停止添加模式、返回编辑模式
|
void |
stopEditing()
TODO ALEX_SEP 暂时不做什么事
|
void |
stopEditing(javax.swing.tree.TreePath path) |
void |
switchTab(FormElementCaseContainerProvider elementCaseContainer)
切换
|
javax.swing.JComponent[] |
toolBarButton4Form()
返回工具栏按钮组件
|
ToolBarDef[] |
toolbars4Target()
返回ToolBarDef
|
void |
updateDrawLineMode(java.awt.event.MouseEvent e)
更新边框线状态
|
void |
updateUI()
设置其UI类为DesignerUI,负责渲染
|
void |
updateWidth(int width)
保存参数界面的宽度
|
void |
valueChanged(javax.swing.event.TreeSelectionEvent e)
改变组件值
|
addTargetModifiedListener, createEditingState, fireTargetModified, getTarget, removeTargetModifiedListener, setTarget
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected static final java.util.ArrayList<java.lang.String> NAME_ARRAY_LIST
protected static final java.awt.Dimension LARGE_PREFERRED_SIZE
protected java.util.List<UpdateAction> designerActions
public FormDesigner(Form form)
public FormDesigner(Form form, javax.swing.Action switchAction)
public void populateParameterPropertyPane()
public Parameter[] getNoRepeatParas(Parameter[] paras)
getNoRepeatParas
在接口中 ParaDefinitePane
public void setParameterArray(Parameter[] ps)
setParameterArray
在接口中 ParaDefinitePane
public Parameter[] getParameterArray()
getParameterArray
在接口中 ParaDefinitePane
public void refreshParameter()
refreshParameter
在接口中 ParaDefinitePane
public boolean isWithQueryButton()
isWithQueryButton
在接口中 ParaDefinitePane
public void addingParameter2Editor(Parameter parameter)
addingParameter2Editor
在接口中 ParaDefinitePane
parameter
- 参数public void addingParameter2EditorWithQueryButton(Parameter parameter)
addingParameter2EditorWithQueryButton
在接口中 ParaDefinitePane
parameter
- 参数public void addingAllParameter2Editor()
addingAllParameter2Editor
在接口中 ParaDefinitePane
public boolean autoAddComponent(XCreator xCreator, int x, int y)
xCreator
- 组件x
- 横坐标y
- 纵坐标public boolean prepareForAdd(XCreator creator, int x, int y, XWParameterLayout layout)
creator
- 组件x
- 长度y
- 长度layout
- 布局public void addParaComponent()
public java.awt.Component getTopContainer()
public int getParaHeight()
public void setParaHeight(int height)
height
- 高度public void removeParaComponent()
public void switchTab(FormElementCaseContainerProvider elementCaseContainer)
elementCaseContainer
- 容器public void setElementCaseContainer(FormElementCaseContainerProvider elementCaseContainer)
public FormElementCaseProvider getElementCase()
public java.lang.String getElementCaseContainerName()
public void setElementCase(FormElementCaseProvider elementCase)
public void setElementCaseBackground(java.awt.image.BufferedImage image)
public java.awt.Dimension getElementCaseContainerSize()
public FormElementCaseContainerProvider getElementCaseContainer()
protected FormDesignerModeForSpecial<?> createFormDesignerTargetMode()
public FormDesignerModeForSpecial<?> getDesignerMode()
public CreatorEventListenerTable getEditListenerTable()
public void addDesignerEditListener(DesignerEditListener listener)
listener
- 界面组件编辑事件public void cancelFormat()
cancelFormat
在类中 TargetComponent<Form>
public boolean hasWAbsoluteLayout()
public void setReportBlockEditing(boolean isEditing)
isEditing
- 是否为报表块编辑public boolean isReportBlockEditing()
public void setWidgetsIntersect(boolean isWidgetsIntersect)
public boolean isWidgetsIntersect()
public boolean renameCreator(XCreator creator, java.lang.String newName)
creator
- 组件newName
- 新的组件名public void showMessageDialog(java.lang.String message)
public void updateWidth(int width)
width
- 指定的宽度public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
在接口中 java.lang.reflect.InvocationHandler
proxy
- 动态代理类method
- 接口方法args
- 参数java.lang.Throwable
public void addInvocationHandler(java.lang.reflect.InvocationHandler h)
h
- 动态代理public void stopAddingState()
public void updateUI()
updateUI
在类中 javax.swing.JComponent
public void selectComponents(java.awt.event.MouseEvent e)
e
- 当前鼠标事件,用来和起始点构成选择框,计算被圈入的组件public void updateDrawLineMode(java.awt.event.MouseEvent e)
e
- 鼠标事件public void refreshRoot()
protected java.awt.Insets getOutlineInsets()
public Painter getPainter()
public void setPainter(Painter p)
public XLayoutContainer getRootComponent()
public XLayoutContainer getParaComponent()
public boolean isFormParaDesigner()
public boolean isRoot(XCreator comp)
comp
- 组件public Direction getLoc2Root(java.awt.event.MouseEvent e)
protected void setRootComponent(XLayoutContainer component)
public StateModel getStateModel()
public AddingModel getAddingModel()
public XCreator getComponentAt(java.awt.event.MouseEvent e)
public XCreator getComponentAt(java.awt.Point p)
getComponentAt
在类中 java.awt.Container
public XCreator getComponentAt(int x, int y)
getComponentAt
在类中 java.awt.Container
public SelectionModel getSelectionModel()
public void removeSelection()
public void startDraggingBean(XCreator xCreator)
xCreator
- 组件public void startDraggingComponent(XCreator xCreator, java.awt.event.MouseEvent lastPressEvent, int x, int y)
xCreator
- 组件lastPressEvent
- 鼠标事件x
- 坐标xy
- 坐标ypublic void valueChanged(javax.swing.event.TreeSelectionEvent e)
valueChanged
在接口中 javax.swing.event.TreeSelectionListener
e
- 组件选择事件public boolean isRootSelected()
public void showAuthorityEditPane()
public boolean isSupportAuthority()
protected void setToolbarButtons()
public boolean isRootRelatedAction(java.lang.String name)
name
- action名public void makeVisible(XCreator comp)
comp
- 组件public void refreshDesignerUI()
public UpdateAction[] getActions()
public void dmlActions(java.util.List<UpdateAction> actions)
actions
- public boolean isCurrentComponentMovableUp()
public boolean isCurrentComponentMovableDown()
protected javax.swing.border.Border getOuterBorder()
protected java.awt.Rectangle getOutlineBounds()
public void populateRootSize()
public FormArea getArea()
public void setParent(FormArea formArea)
formArea
- 表单区域public void paintContent(java.awt.Graphics clipg)
clipg
- 图形public void paintPara(java.awt.Graphics clipg)
public void resetEditorComponentBounds()
public ConnectorHelper getDrawLineHelper()
public boolean isDrawLineMode()
public void setDrawLineMode(boolean mode)
mode
- 是or或public void doMousePress(double evtX, double evtY)
evtX
- event x position 坐标evtY
- event y position 坐标public void stopEditing()
stopEditing
在类中 TargetComponent<Form>
public void stopEditing(javax.swing.tree.TreePath path)
public AuthorityEditPane createAuthorityEditPane()
createAuthorityEditPane
在类中 TargetComponent<Form>
public javax.swing.JPanel getEastUpPane()
getEastUpPane
在类中 TargetComponent<Form>
public javax.swing.JPanel getEastDownPane()
getEastDownPane
在类中 TargetComponent<Form>
public ToolBarMenuDockPlus getToolBarMenuDockPlus()
TargetComponent
getToolBarMenuDockPlus
在类中 TargetComponent<Form>
public void copy()
copy
在类中 TargetComponent<Form>
public boolean paste()
paste
在类中 TargetComponent<Form>
public boolean cut()
cut
在类中 TargetComponent<Form>
public MenuDef[] menus4Target()
menus4Target
在类中 TargetComponent<Form>
public int getMenuState()
getMenuState
在类中 TargetComponent<Form>
public ShortCut[] shortcut4TemplateMenu()
shortcut4TemplateMenu
在类中 TargetComponent<Form>
public ShortCut[] shortCuts4Authority()
shortCuts4Authority
在类中 TargetComponent<Form>
public ToolBarDef[] toolbars4Target()
toolbars4Target
在类中 TargetComponent<Form>
public javax.swing.JComponent[] toolBarButton4Form()
toolBarButton4Form
在类中 TargetComponent<Form>
public void setResolution(int resolution)
public int getResolution()