forked from FR-Global/plugin-event-manager
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
43 lines
1.0 KiB
package com.fr.plugin.event.manager.data; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
import com.fr.design.designer.creator.XCreatorUtils; |
|
import com.fr.form.ui.Widget; |
|
|
|
import javax.swing.Icon; |
|
|
|
/** |
|
* 树的节点,包含一个控件对象 |
|
* 因为树节点可能是纯目录型的,比如sheet,block,也可能是带有控件的 |
|
* @author Joe |
|
* Created by Joe on 12/14/2020 |
|
*/ |
|
public class MyWidget extends MyNode { |
|
private Widget widget; |
|
|
|
// 是否含有事件 |
|
private boolean hasEvent = false; |
|
|
|
public MyWidget(Widget widget) { |
|
this.widget = widget; |
|
this.nodeName = widget.getWidgetName(); |
|
XCreator creator = XCreatorUtils.createXCreator(widget); |
|
this.icon = XCreatorUtils.getCreatorIcon(creator); |
|
} |
|
|
|
public Widget getWidget() { |
|
return widget; |
|
} |
|
|
|
public void setWidget(Widget widget) { |
|
this.widget = widget; |
|
} |
|
|
|
public boolean isHasEvent() { |
|
return hasEvent; |
|
} |
|
|
|
public void setHasEvent(boolean hasEvent) { |
|
this.hasEvent = hasEvent; |
|
} |
|
}
|
|
|