zack
4 years ago
7 changed files with 127 additions and 3 deletions
@ -0,0 +1,23 @@
|
||||
package com.fr.design.cell; |
||||
|
||||
import com.fr.design.designer.TargetComponent; |
||||
import com.fr.design.dialog.BasicPane; |
||||
|
||||
import javax.swing.JPanel; |
||||
|
||||
/** |
||||
* @author zack |
||||
* @version 10.0 |
||||
* Created by zack on 2020/7/14 |
||||
*/ |
||||
public abstract class AbstractCellElementPropertyPane extends BasicPane implements CellElementPropertyComponent { |
||||
@Override |
||||
public JPanel toPanel() { |
||||
return this; |
||||
} |
||||
|
||||
@Override |
||||
public boolean accept(TargetComponent tc) { |
||||
return true; |
||||
} |
||||
} |
@ -0,0 +1,34 @@
|
||||
package com.fr.design.cell; |
||||
|
||||
import com.fr.design.designer.TargetComponent; |
||||
|
||||
import javax.swing.JPanel; |
||||
|
||||
/** |
||||
* 单元格属性配置面板接口 |
||||
* @author zack |
||||
* @version 10.0 |
||||
* Created by zack on 2020/7/14 |
||||
*/ |
||||
public interface CellElementPropertyComponent { |
||||
|
||||
/** |
||||
* 判断当前编辑的对象是否显示当前实现 |
||||
* @param tc |
||||
* @return |
||||
*/ |
||||
boolean accept(TargetComponent tc); |
||||
|
||||
/** |
||||
* 加载数据 |
||||
* @param tc |
||||
*/ |
||||
void populate(TargetComponent tc); |
||||
|
||||
/** |
||||
* 返回当前属性面板,默认返回this |
||||
* @return |
||||
*/ |
||||
JPanel toPanel(); |
||||
|
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.cell.CellElementPropertyComponent; |
||||
|
||||
/** |
||||
* 单元格设置(属性)扩展接口 |
||||
* @author zack |
||||
* @version 10.0 |
||||
* Created by zack on 2020/7/14 |
||||
*/ |
||||
public interface CellPropertyPaneProvider extends PropertyItemPaneProvider { |
||||
|
||||
/** |
||||
* 构造单元格属性面板,面板实现需要使用单例模式实现 |
||||
* @return 面板类 |
||||
*/ |
||||
CellElementPropertyComponent getSingletonCelPropertyPane(); |
||||
} |
@ -0,0 +1,15 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.CellPropertyPaneProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Created by zhouping on 2015/11/11. |
||||
*/ |
||||
@API(level = CellPropertyPaneProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractCellPropertyPaneProvider extends AbstractPropertyItemPaneProvider implements CellPropertyPaneProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CellPropertyPaneProvider.CURRENT_LEVEL; |
||||
} |
||||
} |
Loading…
Reference in new issue