forked from fanruan/design
kerry
5 years ago
21 changed files with 198 additions and 150 deletions
@ -0,0 +1,35 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.stable.fun.mark.Immutable; |
||||
|
||||
import javax.swing.JComponent; |
||||
import java.awt.Dimension; |
||||
import java.awt.image.BufferedImage; |
||||
|
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
* 临时接口,后续自适应内置后删除 |
||||
*/ |
||||
public interface FormAdaptiveConfigUIProcessor extends Immutable { |
||||
|
||||
String MARK_STRING = "FormAdaptiveConfigUI"; |
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
/** |
||||
* 获取表单自适应配置界面 |
||||
* @return 表单自适应配置界面 |
||||
*/ |
||||
BasicBeanPane getConfigPane(); |
||||
|
||||
/** |
||||
* 绘制自适应下报表块在表单界面中显示图片 |
||||
* @param size 绘制尺寸 |
||||
* @param elementCasePane 报表块内容对象 |
||||
* @return 自适应下报表块在表单界面中显示的图片 |
||||
*/ |
||||
BufferedImage paintFormElementCaseImage(Dimension size, JComponent elementCasePane); |
||||
|
||||
} |
||||
|
@ -0,0 +1,39 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.stable.fun.mark.Mutable; |
||||
import com.fr.stable.unit.UNIT; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
public interface ReportLengthUNITProvider extends Mutable { |
||||
String MARK_STRING = "ReportLengthUNITProvider"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
/** |
||||
* 标尺单位显示字符 |
||||
* @return 标尺单位字符 |
||||
*/ |
||||
String unitText(); |
||||
|
||||
/** |
||||
* 标尺单位类型(之前是将int类型的值直接保存在数据库里面的) |
||||
* @return 返回标尺单位类型 |
||||
*/ |
||||
int unitType(); |
||||
|
||||
/** |
||||
* UNIT转标尺单位值 |
||||
* @param value UNIT |
||||
* @return 标尺单位值 |
||||
*/ |
||||
float unit2Value4Scale(UNIT value); |
||||
|
||||
/** |
||||
* 标尺单位值转UNIT |
||||
* @param value 标尺单位值 |
||||
* @return UNIT |
||||
*/ |
||||
UNIT float2UNIT(float value); |
||||
} |
@ -0,0 +1,38 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
|
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.fun.FormAdaptiveConfigUIProcessor; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
import javax.swing.JComponent; |
||||
import java.awt.Dimension; |
||||
import java.awt.image.BufferedImage; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
@API(level = FormAdaptiveConfigUIProcessor.CURRENT_LEVEL) |
||||
public abstract class AbstractFormAdaptiveConfigUIProcessor extends AbstractProvider implements FormAdaptiveConfigUIProcessor { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public int layerIndex() { |
||||
return DEFAULT_LAYER_INDEX; |
||||
} |
||||
|
||||
@Override |
||||
public BasicBeanPane getConfigPane() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public BufferedImage paintFormElementCaseImage(Dimension size, JComponent elementCasePane) { |
||||
return null; |
||||
} |
||||
} |
@ -0,0 +1,41 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
|
||||
import com.fr.design.fun.ReportLengthUNITProvider; |
||||
import com.fr.stable.StringUtils; |
||||
import com.fr.stable.fun.impl.AbstractProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
import com.fr.stable.unit.UNIT; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
@API(level = ReportLengthUNITProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractReportLengthUNITProvider extends AbstractProvider implements ReportLengthUNITProvider { |
||||
|
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String unitText() { |
||||
return StringUtils.EMPTY; |
||||
} |
||||
|
||||
@Override |
||||
public int unitType() { |
||||
return 0; |
||||
} |
||||
|
||||
@Override |
||||
public float unit2Value4Scale(UNIT value) { |
||||
return 0; |
||||
} |
||||
|
||||
@Override |
||||
public UNIT float2UNIT(float value) { |
||||
return null; |
||||
} |
||||
} |
@ -1,18 +0,0 @@
|
||||
package com.fr.design.report.fit.menupane; |
||||
|
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
public abstract class AbstractFormAdaptiveConfigUI implements FormAdaptiveConfigUI { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public int layerIndex() { |
||||
return DEFAULT_LAYER_INDEX; |
||||
} |
||||
} |
@ -1,26 +0,0 @@
|
||||
package com.fr.design.report.fit.menupane; |
||||
|
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.stable.fun.mark.Immutable; |
||||
|
||||
import javax.swing.JComponent; |
||||
import java.awt.Dimension; |
||||
import java.awt.image.BufferedImage; |
||||
|
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
public interface FormAdaptiveConfigUI extends Immutable { |
||||
|
||||
String MARK_STRING = "FormAdaptiveConfigUI"; |
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
|
||||
BasicBeanPane getConfigPane(); |
||||
|
||||
BufferedImage getElementCaseImage(Dimension size, JComponent elementCasePane); |
||||
|
||||
|
||||
} |
||||
|
@ -1,21 +0,0 @@
|
||||
package com.fr.design.unit; |
||||
|
||||
import com.fr.stable.fun.mark.Mutable; |
||||
import com.fr.stable.unit.UNIT; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
public interface ReportLengthUNIT extends Mutable { |
||||
String MARK_STRING = "ReportLengthUNIT"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
String unitText(); |
||||
|
||||
int unitType(); |
||||
|
||||
float unit2Value4Scale(UNIT value); |
||||
|
||||
UNIT float2UNIT(float value); |
||||
} |
@ -1,14 +0,0 @@
|
||||
package com.fr.design.unit; |
||||
|
||||
import com.fr.stable.fun.mark.Immutable; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
public interface ReportLengthUnitProcessor extends Immutable { |
||||
String MARK_STRING = "ReportLengthUnitProcessor"; |
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
ReportLengthUNIT getReportLengthUNIT(int unitType); |
||||
|
||||
} |
@ -1,19 +0,0 @@
|
||||
package com.fr.design.unit.impl; |
||||
|
||||
import com.fr.design.unit.ReportLengthUnitProcessor; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
public abstract class AbstracReportLengthUnitProcessor implements ReportLengthUnitProcessor { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public int layerIndex() { |
||||
return DEFAULT_LAYER_INDEX; |
||||
} |
||||
} |
@ -1,22 +0,0 @@
|
||||
package com.fr.design.unit.impl; |
||||
|
||||
|
||||
import com.fr.design.unit.ReportLengthUNIT; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-04-09 |
||||
*/ |
||||
public abstract class AbstractReportLengthUNIT implements ReportLengthUNIT { |
||||
|
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue