Destiny.Lin
3 months ago
37 changed files with 259 additions and 184 deletions
@ -0,0 +1,46 @@ |
|||||||
|
package com.fr.design.data.tabledata.tabledatapane; |
||||||
|
|
||||||
|
import com.fr.base.AbstractTableData; |
||||||
|
import com.fr.design.data.tabledata.datacenter.DCTableDataPane; |
||||||
|
import com.fr.third.guava.collect.Sets; |
||||||
|
|
||||||
|
import java.util.Set; |
||||||
|
|
||||||
|
/** |
||||||
|
* 数据集面板帮助类 |
||||||
|
* |
||||||
|
* @author vito |
||||||
|
* @since 11.0 |
||||||
|
* Created on 2024/9/10 |
||||||
|
*/ |
||||||
|
public class TableDataPaneHelper { |
||||||
|
/** |
||||||
|
* 标记优先使用带名称的构造方法 |
||||||
|
*/ |
||||||
|
private final static Set<Class<? extends AbstractTableDataPane<? extends AbstractTableData>>> NAMED_TABLE_DATA_PANE = |
||||||
|
Sets.newHashSet( |
||||||
|
MultiTDTableDataPane.class, |
||||||
|
GlobalMultiTDTableDataPane.class, |
||||||
|
TreeTableDataPane.class, |
||||||
|
GlobalTreeTableDataPane.class, |
||||||
|
DCTableDataPane.class); |
||||||
|
|
||||||
|
/** |
||||||
|
* 是否为带名称的数据集面板 |
||||||
|
* |
||||||
|
* @param tableDataPaneClass 数据集面板类 |
||||||
|
* @return 是否为带名称的数据集面板 |
||||||
|
*/ |
||||||
|
public static boolean isNamedTableDataPane(Class<?> tableDataPaneClass) { |
||||||
|
return NAMED_TABLE_DATA_PANE.contains(tableDataPaneClass); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 注册需要名称的数据集面板 |
||||||
|
* |
||||||
|
* @param tableDataPaneClass 数据集面板类 |
||||||
|
*/ |
||||||
|
public static void registerNamedTableDataPane(Class<? extends AbstractTableDataPane<? extends AbstractTableData>> tableDataPaneClass) { |
||||||
|
NAMED_TABLE_DATA_PANE.add(tableDataPaneClass); |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.5 KiB |
File diff suppressed because one or more lines are too long
@ -1,29 +0,0 @@ |
|||||||
package com.fr.design.ui.report; |
|
||||||
|
|
||||||
import com.fr.design.DesignerEnvManager; |
|
||||||
import com.fr.design.ui.ModernUIPane; |
|
||||||
import com.fr.design.ui.ModernUIPaneTest; |
|
||||||
|
|
||||||
import javax.swing.*; |
|
||||||
import java.awt.*; |
|
||||||
|
|
||||||
/** |
|
||||||
* Created by windy on 2019/3/25. |
|
||||||
* 报表服务器参数demo |
|
||||||
*/ |
|
||||||
public class ReportServerParamDemo { |
|
||||||
|
|
||||||
public static void main(String... args) { |
|
||||||
final JFrame frame = new JFrame(); |
|
||||||
frame.setSize(660, 600); |
|
||||||
JPanel contentPane = (JPanel) frame.getContentPane(); |
|
||||||
// 是否需要开启调试窗口
|
|
||||||
DesignerEnvManager.getEnvManager().setOpenDebug(true); |
|
||||||
|
|
||||||
final ModernUIPane<ModernUIPaneTest.Model> pane = new ModernUIPane.Builder<ModernUIPaneTest.Model>() |
|
||||||
.withComponent(ReportServerParamComponent.KEY).build(); |
|
||||||
contentPane.add(pane, BorderLayout.CENTER); |
|
||||||
frame.setVisible(true); |
|
||||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue