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.
67 lines
1.5 KiB
67 lines
1.5 KiB
package com.tptj.tool.hg.fineui.swing.element; |
|
|
|
import com.eclipsesource.v8.V8Array; |
|
import com.eclipsesource.v8.V8Object; |
|
|
|
import javax.swing.*; |
|
import java.util.List; |
|
import java.util.Map; |
|
|
|
/** |
|
* @author 秃破天际 |
|
* @version 10.0 |
|
* Created by 秃破天际 on 2021/10/29 |
|
* 模拟dom的基本操作 |
|
**/ |
|
public interface Element<T extends JComponent> { |
|
T getComponent(); |
|
void setType(String type); |
|
void mounted(); |
|
JComponent getWrapper(); |
|
|
|
boolean hasScrollbar(); |
|
|
|
Map<String,Object> getStyle(); |
|
int getRectStyleAttr( String name,int max, int min ); |
|
|
|
AbstractElement parent(); |
|
void setParent(AbstractElement parent); |
|
void ref( V8Object obj ); |
|
void removeClass(String clazz); |
|
|
|
/** |
|
* swing组件的渲染都从这个地方接入 |
|
* @param name |
|
* @param val |
|
*/ |
|
void css(String name,String val); |
|
void cssMap(V8Object map); |
|
void unbind(); |
|
void updateUI(); |
|
void destroy(); |
|
|
|
void setData(String name,Object data); |
|
Object getData(String name); |
|
|
|
void addClass(String clazz); |
|
|
|
void setAttr(String name,Object val); |
|
Object getAttr(String name); |
|
|
|
void empty(); |
|
void layout(String layoutType); |
|
void append( AbstractElement element ); |
|
List<AbstractElement> children(); |
|
void appendTo( AbstractElement element ); |
|
void appendChild( AbstractElement element ); |
|
|
|
void setWidth(String width); |
|
void setHeight(String height); |
|
int getWidth(); |
|
int getHeight(); |
|
|
|
void setVal(Object val); |
|
Object getVal(); |
|
|
|
void populate(V8Array items); |
|
}
|
|
|