Browse Source

更新自定义面板demo

master
Nicholas.Jee 2 years ago
parent
commit
21911f7d59
  1. 4
      build.gradle
  2. BIN
      lib/report/fine-plugin-data-factory-2.5.13.jar
  3. BIN
      lib/report/fine-plugin-data-factory-2.5.7.jar
  4. 3
      plugin.xml
  5. 62
      src/main/java/com/fr/plugin/tptj/tabledata/factory/demo/TextTable.java

4
build.gradle

@ -1,7 +1,9 @@
apply plugin: 'java' apply plugin: 'java'
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
ext { ext {
/** /**
* jar的路径 * jar的路径

BIN
lib/report/fine-plugin-data-factory-2.5.13.jar

Binary file not shown.

BIN
lib/report/fine-plugin-data-factory-2.5.7.jar

Binary file not shown.

3
plugin.xml

@ -3,7 +3,7 @@
<id>com.fr.plugin.jee.tabledata.factory.demo</id> <id>com.fr.plugin.jee.tabledata.factory.demo</id>
<name><![CDATA[数据工厂demo]]></name> <name><![CDATA[数据工厂demo]]></name>
<active>yes</active> <active>yes</active>
<version>1.0</version> <version>1.2</version>
<env-version>10.0~11.0</env-version> <env-version>10.0~11.0</env-version>
<jartime>2018-07-31</jartime> <jartime>2018-07-31</jartime>
<vendor>jee</vendor> <vendor>jee</vendor>
@ -21,6 +21,7 @@
<TableDataPreprocessor class="com.fr.plugin.tptj.tabledata.factory.demo.DemoPreprocessor"/> <TableDataPreprocessor class="com.fr.plugin.tptj.tabledata.factory.demo.DemoPreprocessor"/>
<TableDataFormatter class="com.fr.plugin.tptj.tabledata.factory.demo.DemoFormatter"/> <TableDataFormatter class="com.fr.plugin.tptj.tabledata.factory.demo.DemoFormatter"/>
<TableDataFilter class="com.fr.plugin.tptj.tabledata.factory.demo.DemoFilter"/> <TableDataFilter class="com.fr.plugin.tptj.tabledata.factory.demo.DemoFilter"/>
<TableDataConfigTable class="com.fr.plugin.tptj.tabledata.factory.demo.TextTable"/>
</extra-core> </extra-core>
<function-recorder class="com.fr.plugin.tptj.tabledata.factory.demo.DemoLoader"/> <function-recorder class="com.fr.plugin.tptj.tabledata.factory.demo.DemoLoader"/>

62
src/main/java/com/fr/plugin/tptj/tabledata/factory/demo/TextTable.java

@ -0,0 +1,62 @@
package com.fr.plugin.tptj.tabledata.factory.demo;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.tptj.plugin.hg.fun.ParameterRefreshAction;
import com.tptj.plugin.hg.impl.AbstractConfigTable;
import javax.swing.*;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
public class TextTable extends AbstractConfigTable<DemoLoader> {
private final static double P = TableLayout.PREFERRED;
private final static double F = TableLayout.FILL;
JTextArea textArea;
public TextTable() {
}
@Override
public JPanel getTable(ParameterRefreshAction action) {
textArea = new UITextArea();
textArea.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
}
@Override
public void focusLost(FocusEvent e) {
action.doAction();
}
});
//textArea.setPreferredSize(new Dimension(350,216));
UIScrollPane scrollPane = new UIScrollPane(textArea);
scrollPane.setPreferredSize(new Dimension(350,216));
return TableLayoutHelper.createTableLayoutPane(
new Component[][] {{
scrollPane
}},
new double[] { F },
new double[] { F }
);
}
@Override
public void setValue(String text) {
textArea.setText(text);
}
@Override
public String getValue() {
return textArea.getText();
}
}
Loading…
Cancel
Save