superman
9 years ago
95 changed files with 456 additions and 971 deletions
@ -1 +1 @@
|
||||
package com.fr.design.report;
import com.fr.data.Verifier;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.VerifyDefineProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ObjectJControlPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.report.write.ReportWriteAttr;
import com.fr.report.write.ValueVerifier;
import com.fr.report.write.WClassVerifier;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import java.util.ArrayList;
/**
* 校验列表
*/
public class VerifierListPane extends ObjectJControlPane {
public VerifierListPane(ElementCasePane ePane) {
super(ePane);
}
/**
* 创建选项
*
* @return 选项
*/
public NameableCreator[] createNameableCreators() {
NameableCreator[] creators = new NameableCreator[]{
new NameObjectCreator(Inter.getLocText(new String[]{"BuildIn", "Verify"}),
"/com/fr/web/images/reportlet.png",
ValueVerifier.class,
BuildInVerifierPane.class)
};
for (VerifyDefineProvider provider : ExtraDesignClassManager.getInstance().getVerifyDefineProviders()) {
creators = ArrayUtils.add(creators, new NameObjectCreator(
provider.nameForVerifier(),
provider.iconPath(),
provider.classForVerifier(),
provider.appearanceForVerifier()
) {
});
}
creators = ArrayUtils.add(creators, new NameObjectCreator(
Inter.getLocText(new String[]{"Custom", "Verify"}),
"/com/fr/web/images/reportlet.png",
WClassVerifier.class,
CustomVerifierPane.class));
return creators;
}
@Override
protected String title4PopupWindow() {
return "Verify Collections";
}
public void populate(ReportWriteAttr reportWriteAttr) {
if (reportWriteAttr == null) {
return;
}
java.util.List<NameObject> nameObjectList = new ArrayList<>();
int verifierCount = reportWriteAttr.getVerifierCount();
for (int i = 0; i < verifierCount; i++) {
Verifier verifier = reportWriteAttr.getVerifier(i);
nameObjectList.add(new NameObject(verifier.getName(), verifier));
}
this.populate(nameObjectList.toArray(new NameObject[nameObjectList.size()]));
}
public void updateReportWriteAttr(ReportWriteAttr reportWriteAttr) {
// Nameable[]居然不能强转成NameObject[],一定要这么写...
Nameable[] res = this.update();
NameObject[] res_array = new NameObject[res.length];
java.util.Arrays.asList(res).toArray(res_array);
reportWriteAttr.clearVerifiers();
for (int i = 0; i < res_array.length; i++) {
NameObject nameObject = res_array[i];
if (nameObject.getObject() instanceof Verifier) {
Verifier verifier = (Verifier) nameObject.getObject();
verifier.setName(nameObject.getName());
reportWriteAttr.addVerifier(verifier);
}
}
}
} |
||||
package com.fr.design.report;
import com.fr.data.Verifier;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.VerifyDefineProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ObjectJControlPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.report.write.ReportWriteAttr;
import com.fr.report.write.ValueVerifier;
import com.fr.report.write.WClassVerifier;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import java.util.ArrayList;
import java.util.Set;
/**
* 校验列表
*/
public class VerifierListPane extends ObjectJControlPane {
public VerifierListPane(ElementCasePane ePane) {
super(ePane);
}
/**
* 创建选项
*
* @return 选项
*/
public NameableCreator[] createNameableCreators() {
NameableCreator[] creators = new NameableCreator[]{
new NameObjectCreator(Inter.getLocText(new String[]{"BuildIn", "Verify"}),
"/com/fr/web/images/reportlet.png",
ValueVerifier.class,
BuildInVerifierPane.class)
};
Set<VerifyDefineProvider> set = ExtraDesignClassManager.getInstance().getArray(VerifyDefineProvider.MARK_STRING);
for (VerifyDefineProvider provider : set) {
creators = ArrayUtils.add(creators, new NameObjectCreator(
provider.nameForVerifier(),
provider.iconPath(),
provider.classForVerifier(),
provider.appearanceForVerifier()
) {
});
}
creators = ArrayUtils.add(creators, new NameObjectCreator(
Inter.getLocText(new String[]{"Custom", "Verify"}),
"/com/fr/web/images/reportlet.png",
WClassVerifier.class,
CustomVerifierPane.class));
return creators;
}
@Override
protected String title4PopupWindow() {
return "Verify Collections";
}
public void populate(ReportWriteAttr reportWriteAttr) {
if (reportWriteAttr == null) {
return;
}
java.util.List<NameObject> nameObjectList = new ArrayList<>();
int verifierCount = reportWriteAttr.getVerifierCount();
for (int i = 0; i < verifierCount; i++) {
Verifier verifier = reportWriteAttr.getVerifier(i);
nameObjectList.add(new NameObject(verifier.getName(), verifier));
}
this.populate(nameObjectList.toArray(new NameObject[nameObjectList.size()]));
}
public void updateReportWriteAttr(ReportWriteAttr reportWriteAttr) {
// Nameable[]居然不能强转成NameObject[],一定要这么写...
Nameable[] res = this.update();
NameObject[] res_array = new NameObject[res.length];
java.util.Arrays.asList(res).toArray(res_array);
reportWriteAttr.clearVerifiers();
for (int i = 0; i < res_array.length; i++) {
NameObject nameObject = res_array[i];
if (nameObject.getObject() instanceof Verifier) {
Verifier verifier = (Verifier) nameObject.getObject();
verifier.setName(nameObject.getName());
reportWriteAttr.addVerifier(verifier);
}
}
}
} |
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,23 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.CellWidgetOptionProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @date 2015-05-13 |
||||
* @since 8.0 |
||||
*/ |
||||
public abstract class AbstractCellWidgetOptionProvider implements CellWidgetOptionProvider { |
||||
@API(level = CellWidgetOptionProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractCellWidgetOptionProvider extends AbstractProvider implements CellWidgetOptionProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,16 +1,24 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.ConnectionProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @date 2015-05-13 |
||||
* @since 8.0 |
||||
*/ |
||||
public abstract class AbstractConnectionProvider implements ConnectionProvider { |
||||
@API(level = ConnectionProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractConnectionProvider extends AbstractProvider implements ConnectionProvider { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,15 +1,21 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.GlobalListenerProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Created by zack on 2015/8/17. |
||||
*/ |
||||
public abstract class AbstractGlobalListenerProvider implements GlobalListenerProvider { |
||||
@API(level = GlobalListenerProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractGlobalListenerProvider extends AbstractProvider implements GlobalListenerProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,16 +1,23 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.HighlightProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @date 2015-05-13 |
||||
* @since 8.0 |
||||
*/ |
||||
public abstract class AbstractHighlightProvider implements HighlightProvider { |
||||
@API(level = HighlightProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractHighlightProvider extends AbstractProvider implements HighlightProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,14 +1,21 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.HyperlinkProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Created by zack on 2016/1/18. |
||||
*/ |
||||
public abstract class AbstractHyperlinkProvider implements HyperlinkProvider { |
||||
@API(level = HyperlinkProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractHyperlinkProvider extends AbstractProvider implements HyperlinkProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,14 +1,21 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.JavaScriptActionProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Created by zack on 2015/8/20. |
||||
*/ |
||||
public abstract class AbstractJavaScriptActionProvider implements JavaScriptActionProvider { |
||||
@API(level = JavaScriptActionProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractJavaScriptActionProvider extends AbstractProvider implements JavaScriptActionProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,16 +1,23 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.ParameterWidgetOptionProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @date 2015-05-13 |
||||
* @since 8.0 |
||||
*/ |
||||
public abstract class AbstractParameterWidgetOptionProvider implements ParameterWidgetOptionProvider { |
||||
@API(level = ParameterWidgetOptionProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractParameterWidgetOptionProvider extends AbstractProvider implements ParameterWidgetOptionProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,17 +1,23 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.PresentKindProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @date 2015-05-22 |
||||
* @since 8.0 |
||||
*/ |
||||
public abstract class AbstractPresentKindProvider implements PresentKindProvider { |
||||
@API(level = PresentKindProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractPresentKindProvider extends AbstractProvider implements PresentKindProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,12 +1,39 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.data.datapane.TableDataNameObjectCreator; |
||||
import com.fr.design.data.tabledata.wrapper.TableDataFactory; |
||||
import com.fr.design.fun.ServerTableDataDefineProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @date 2015-05-13 |
||||
* @since 8.0 |
||||
*/ |
||||
public abstract class AbstractServerTableDataDefineProvider implements ServerTableDataDefineProvider { |
||||
@API(level = ServerTableDataDefineProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractServerTableDataDefineProvider extends AbstractProvider implements ServerTableDataDefineProvider { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
|
||||
@Override |
||||
public void process() { |
||||
TableDataNameObjectCreator creator = new TableDataNameObjectCreator( |
||||
nameForTableData(), |
||||
prefixForTableData(), |
||||
iconPathForTableData(), |
||||
classForTableData(), |
||||
classForInitTableData(), |
||||
appearanceForTableData() |
||||
); |
||||
TableDataFactory.register(classForTableData(), creator); |
||||
} |
||||
} |
@ -1,12 +1,18 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.SubmitProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
public abstract class AbstractSubmitProvider implements SubmitProvider { |
||||
@API(level = SubmitProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractSubmitProvider extends AbstractProvider implements SubmitProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,16 +1,39 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.data.datapane.TableDataNameObjectCreator; |
||||
import com.fr.design.data.tabledata.wrapper.TableDataFactory; |
||||
import com.fr.design.fun.TableDataDefineProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* @author richie |
||||
* @date 2015-05-13 |
||||
* @since 8.0 |
||||
*/ |
||||
public abstract class AbstractTableDataDefineProvider implements TableDataDefineProvider { |
||||
@API(level = TableDataDefineProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractTableDataDefineProvider extends AbstractProvider implements TableDataDefineProvider { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
|
||||
@Override |
||||
public void process() { |
||||
TableDataNameObjectCreator creator = new TableDataNameObjectCreator( |
||||
nameForTableData(), |
||||
prefixForTableData(), |
||||
iconPathForTableData(), |
||||
classForTableData(), |
||||
classForInitTableData(), |
||||
appearanceForTableData() |
||||
); |
||||
TableDataFactory.register(classForTableData(), creator); |
||||
} |
||||
} |
@ -1,14 +1,21 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.ToolbarItemProvider; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Created by richie on 15/12/1. |
||||
*/ |
||||
public abstract class AbstractToolbarItem implements ToolbarItemProvider { |
||||
@API(level = ToolbarItemProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractToolbarItem extends AbstractProvider implements ToolbarItemProvider { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
} |
@ -1,11 +1,18 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.WidgetDesignHandler; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Coder: zack |
||||
* Date: 2016/5/12 |
||||
* Time: 10:41 |
||||
*/ |
||||
@API(level = WidgetDesignHandler.CURRENT_LEVEL) |
||||
public abstract class AbstractWidgetDesignHandler implements WidgetDesignHandler { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
} |
||||
|
@ -1,13 +1,26 @@
|
||||
package com.fr.design.mainframe; |
||||
|
||||
import com.fr.base.io.IOFile; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* Created by Administrator on 2016/3/17/0017. |
||||
*/ |
||||
public abstract class AbstractAppProvider<T extends IOFile> implements App{ |
||||
@API(level = App.CURRENT_LEVEL) |
||||
public abstract class AbstractAppProvider<T extends IOFile> extends AbstractProvider implements App{ |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
|
||||
@Override |
||||
public void process() { |
||||
DesignerFrame.registApp(this); |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue