Browse Source
* commit '5d1bbe212e0dc3d366888b558a38a646c8a4a3a3': (46 commits) 绝对布局基本功能2 上传design项目的3个build.gradle文件 1 冲突 冲突 修改下instanceof,改成acceptType好一些 国际化 表单绝对布局的基本功能1 方法名 空import exe启动插件被禁用 整理 设计器无法保存文字竖排 read plugin 代码规范 修改一些规范问题 他装了插件后, 可以设置显示或者不显示 装了插件后, 可以设置显示或者不显示 装了插件后, 可以设置显示或者不显示 去掉qq帮助,并在关于软件中显示qq号码,冻结时给提示 ...master
vito
9 years ago
61 changed files with 1847 additions and 374 deletions
@ -0,0 +1,61 @@
|
||||
|
||||
apply plugin: 'java' |
||||
tasks.withType(JavaCompile){ |
||||
options.encoding = 'UTF-8' |
||||
} |
||||
version='8.0' |
||||
|
||||
jar{ |
||||
baseName='fr-designer-core' |
||||
} |
||||
|
||||
|
||||
def srcDir="${System.getenv()['JENKINS_HOME']}/workspace/design" |
||||
def libDir="${System.getenv()['JENKINS_HOME']}/workspace/lib" |
||||
|
||||
sourceSets{ |
||||
main{ |
||||
java{ |
||||
srcDirs=["${srcDir}/designer_base/src"] |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
dependencies{ |
||||
compile fileTree(dir:'../../',include:'**/*.jar') |
||||
compile fileTree(dir:libDir,include:'*.jar') |
||||
compile fileTree(dir:"${libDir}/jetty",include:'*.jar') |
||||
testCompile 'junit:junit:4.12' |
||||
} |
||||
|
||||
task copyFile(type:Copy,dependsOn:compileJava){ |
||||
copy{ |
||||
from ("${srcDir}/designer_base/src"){ |
||||
exclude '**/*.java' |
||||
} |
||||
into 'build/classes/main' |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
//ѹËõÏîÄ¿ÖеÄjsÎļþ |
||||
task compressJS{ |
||||
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ |
||||
classpath { |
||||
fileset(dir:'../../lib',includes:'*.jar') |
||||
} |
||||
} |
||||
ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ |
||||
fileset (dir:"${srcDir}/designer_base/src"){ |
||||
include (name:'**/*.js') |
||||
|
||||
} |
||||
|
||||
} |
||||
} |
||||
jar.dependsOn compressJS |
||||
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
package com.fr.design.beans.location; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.gui.ibutton.UIButton; |
||||
import com.fr.design.icon.IconPathConstants; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
/** |
||||
* Created by zhouping on 2016/7/24. |
||||
*/ |
||||
public class WidgetForbidWindow extends JWindow { |
||||
|
||||
private static final int WIDTH = 150; |
||||
private static final int HEIGHT = 20; |
||||
|
||||
private UIButton promptButton = new UIButton(Inter.getLocText("FR-Designer_Forbid_Widgets_Intersects"), BaseUtils.readIcon(IconPathConstants.FORBID_ICON_PATH)); |
||||
|
||||
/** |
||||
* 构造函数 |
||||
*/ |
||||
public WidgetForbidWindow() { |
||||
this.add(promptButton); |
||||
|
||||
this.setSize(WIDTH, HEIGHT); |
||||
} |
||||
|
||||
/** |
||||
* 在指定位置显示窗口, 默认将window的中心点放到指定位置上 |
||||
* |
||||
* @param x x坐标 |
||||
* @param y y坐标 |
||||
* |
||||
*/ |
||||
public void showWindow(int x, int y){ |
||||
this.setLocation(x - WIDTH / 2, y - HEIGHT / 2); |
||||
this.setVisible(true); |
||||
} |
||||
|
||||
/** |
||||
* 隐藏当前窗口 |
||||
* |
||||
*/ |
||||
public void hideWindow(){ |
||||
this.setVisible(false); |
||||
} |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.designer.creator.CRPropertyDescriptor; |
||||
import com.fr.stable.fun.mark.Immutable; |
||||
|
||||
/** |
||||
* Created by zpc on 16/7/21. |
||||
*/ |
||||
public interface ParameterWindowEditorProcessor extends Immutable { |
||||
|
||||
String MARK_STRING = "ParameterWindowEditorProcessor"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
|
||||
/** |
||||
* 生成属性表 |
||||
*/ |
||||
CRPropertyDescriptor[] createPropertyDescriptor(Class<?> temp); |
||||
} |
||||
|
@ -0,0 +1,31 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.designer.creator.CRPropertyDescriptor; |
||||
import com.fr.design.fun.ParameterWindowEditorProcessor; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
|
||||
/** |
||||
* Created by zpc on 2016/7/21. |
||||
*/ |
||||
@API(level = ParameterWindowEditorProcessor.CURRENT_LEVEL) |
||||
public abstract class AbstractParameterWindowEditorProcessor implements ParameterWindowEditorProcessor { |
||||
|
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
public int layerIndex() { |
||||
return DEFAULT_LAYER_INDEX; |
||||
} |
||||
|
||||
|
||||
|
||||
/** |
||||
* 生成属性表 |
||||
*/ |
||||
@Override |
||||
public CRPropertyDescriptor[] createPropertyDescriptor(Class<?> temp) { |
||||
return new CRPropertyDescriptor[0]; |
||||
} |
||||
} |
@ -0,0 +1,123 @@
|
||||
package com.fr.design.gui.ispinner; |
||||
|
||||
import java.text.ParseException; |
||||
import java.util.List; |
||||
|
||||
import javax.swing.JComponent; |
||||
import javax.swing.JFormattedTextField; |
||||
import javax.swing.JSpinner; |
||||
import javax.swing.SpinnerDateModel; |
||||
import javax.swing.SpinnerListModel; |
||||
import javax.swing.SpinnerModel; |
||||
import javax.swing.SpinnerNumberModel; |
||||
import javax.swing.text.AttributeSet; |
||||
import javax.swing.text.BadLocationException; |
||||
import javax.swing.text.DefaultFormatterFactory; |
||||
import javax.swing.text.DocumentFilter; |
||||
|
||||
import com.fr.stable.StableUtils; |
||||
//_kerry: 用来修复Spinner输入数字自动填充的bug
|
||||
public class ColumnRowSpinner extends UIBasicSpinner { |
||||
public ColumnRowSpinner(SpinnerModel model) { |
||||
super(model); |
||||
} |
||||
|
||||
protected JComponent createEditor(SpinnerModel model) { |
||||
if (model instanceof SpinnerDateModel) { |
||||
return new DateEditor(this); |
||||
} else if (model instanceof SpinnerListModel) { |
||||
return new FillBugEditor(this); |
||||
} else if (model instanceof SpinnerNumberModel) { |
||||
return new NumberEditor(this); |
||||
} else { |
||||
return new DefaultEditor(this); |
||||
} |
||||
} |
||||
|
||||
private class FillBugEditor extends DefaultEditor { |
||||
public FillBugEditor(JSpinner spinner) { |
||||
super(spinner); |
||||
if (!(spinner.getModel() instanceof SpinnerListModel)) { |
||||
throw new IllegalArgumentException( |
||||
"model not a SpinnerListModel"); |
||||
} |
||||
getTextField().setEditable(true); |
||||
getTextField().setFormatterFactory( |
||||
new DefaultFormatterFactory(new ListFormatter())); |
||||
} |
||||
|
||||
public SpinnerListModel getModel() { |
||||
return (SpinnerListModel) (getSpinner().getModel()); |
||||
} |
||||
|
||||
private class ListFormatter extends |
||||
JFormattedTextField.AbstractFormatter { |
||||
private DocumentFilter filter; |
||||
|
||||
public String valueToString(Object value) throws ParseException { |
||||
if (value == null) { |
||||
return ""; |
||||
} |
||||
return value.toString(); |
||||
} |
||||
|
||||
public Object stringToValue(String string) |
||||
throws ParseException { |
||||
//add将行数转换成ABC
|
||||
return string; |
||||
} |
||||
|
||||
protected DocumentFilter getDocumentFilter() { |
||||
if (filter == null) { |
||||
filter = new Filter(); |
||||
} |
||||
return filter; |
||||
} |
||||
|
||||
private class Filter extends DocumentFilter { |
||||
public void replace(FilterBypass fb, int offset, |
||||
int length, String string, AttributeSet attrs) |
||||
throws BadLocationException { |
||||
if (string != null |
||||
&& (offset + length) == fb.getDocument() |
||||
.getLength()) { |
||||
List list = getModel().getList(); |
||||
Object next = null; |
||||
for (int counter = 0; counter < list.size(); counter++) { |
||||
Object value = list.get(counter); |
||||
String str = value.toString(); |
||||
|
||||
if (str != null |
||||
&& str.startsWith(fb.getDocument() |
||||
.getText(0, offset) |
||||
+ string)) { |
||||
next = value; |
||||
break; |
||||
} |
||||
} |
||||
|
||||
String value = (next != null) ? next.toString() |
||||
: null; |
||||
|
||||
if (value != null) { |
||||
fb.remove(0, offset + length); |
||||
fb.insertString(0, value, null); |
||||
getFormattedTextField().select( |
||||
offset + string.length(), |
||||
value.length()); |
||||
return; |
||||
} |
||||
} |
||||
super.replace(fb, offset, length, string, attrs); |
||||
} |
||||
|
||||
public void insertString(FilterBypass fb, int offset, |
||||
String string, AttributeSet attr) |
||||
throws BadLocationException { |
||||
replace(fb, offset, 0, string, attr); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
Before Width: | Height: | Size: 861 B |
Before Width: | Height: | Size: 269 B |
Before Width: | Height: | Size: 861 B |
Before Width: | Height: | Size: 269 B |
@ -0,0 +1,57 @@
|
||||
|
||||
apply plugin: 'java' |
||||
tasks.withType(JavaCompile){ |
||||
options.encoding = 'UTF-8' |
||||
} |
||||
|
||||
version='8.0' |
||||
|
||||
def srcDir="${System.getenv()['JENKINS_HOME']}/workspace/design" |
||||
def libDir="${System.getenv()['JENKINS_HOME']}/workspace/lib" |
||||
|
||||
|
||||
jar{ |
||||
baseName='fr-designer-chart' |
||||
} |
||||
|
||||
sourceSets{ |
||||
main{ |
||||
java{ |
||||
srcDirs=["${srcDir}/designer_chart/src"] |
||||
} |
||||
} |
||||
} |
||||
dependencies{ |
||||
compile fileTree(dir:'../../',include:'**/*.jar') |
||||
compile fileTree(dir:libDir,include:'*.jar') |
||||
compile fileTree(dir:"${libDir}/jetty",include:'*.jar') |
||||
testCompile 'junit:junit:4.12' |
||||
} |
||||
|
||||
task copyFile(type:Copy,dependsOn:compileJava){ |
||||
copy{ |
||||
from ("${srcDir}/designer_chart/src"){ |
||||
exclude '**/*.java' |
||||
} |
||||
into 'build/classes/main' |
||||
} |
||||
|
||||
} |
||||
|
||||
//ѹËõÏîÄ¿ÖеÄjsÎļþ |
||||
task compressJS{ |
||||
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ |
||||
classpath { |
||||
fileset(dir:'../../lib',includes:'*.jar') |
||||
} |
||||
} |
||||
ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ |
||||
fileset (dir:"${srcDir}/designer_chart/src"){ |
||||
include (name:'**/*.js') |
||||
|
||||
} |
||||
|
||||
} |
||||
} |
||||
jar.dependsOn compressJS |
||||
|
@ -0,0 +1,65 @@
|
||||
|
||||
apply plugin: 'java' |
||||
tasks.withType(JavaCompile){ |
||||
options.encoding = 'UTF-8' |
||||
} |
||||
|
||||
version='8.0' |
||||
|
||||
def srcDir="${System.getenv()['JENKINS_HOME']}/workspace/design" |
||||
def libDir="${System.getenv()['JENKINS_HOME']}/workspace/lib" |
||||
|
||||
|
||||
jar{ |
||||
baseName='fr-designer-report' |
||||
} |
||||
|
||||
sourceSets{ |
||||
main{ |
||||
java{ |
||||
srcDirs=["${srcDir}/designer/src", |
||||
"${srcDir}/designer_form/src"] |
||||
} |
||||
} |
||||
} |
||||
dependencies{ |
||||
compile fileTree(dir:'../../',include:'**/*.jar') |
||||
compile fileTree(dir:libDir,include:'*.jar') |
||||
compile fileTree(dir:"${libDir}/jetty",include:'*.jar') |
||||
testCompile 'junit:junit:4.12' |
||||
} |
||||
|
||||
|
||||
task copyFile(type:Copy,dependsOn:compileJava){ |
||||
copy{ |
||||
from ("${srcDir}/designer/src"){ |
||||
exclude '**/*.java' |
||||
} |
||||
from ("${srcDir}/designer_form/src") |
||||
into ('build/classes/main') |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
//ѹËõÏîÄ¿ÖеÄjsÎļþ |
||||
task compressJS{ |
||||
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ |
||||
classpath { |
||||
fileset(dir:'../../lib',includes:'*.jar') |
||||
} |
||||
} |
||||
ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false", , charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ |
||||
fileset (dir:"${srcDir}/designer/src"){ |
||||
include (name:'**/*.js') |
||||
|
||||
} |
||||
fileset (dir:"${srcDir}/designer_form/src"){ |
||||
include (name:'**/*.js') |
||||
|
||||
} |
||||
|
||||
} |
||||
} |
||||
jar.dependsOn compressJS |
||||
|
@ -1,21 +0,0 @@
|
||||
package com.fr.design.designer.beans.adapters.layout; |
||||
|
||||
import com.fr.design.beans.GroupModel; |
||||
import com.fr.design.designer.creator.XLayoutContainer; |
||||
import com.fr.design.designer.creator.XWFitLayout; |
||||
import com.fr.design.designer.properties.BodyMobileLayoutPropertiesGroupModel; |
||||
|
||||
public class FRBodyFitLayoutAdapter extends FRFitLayoutAdapter { |
||||
|
||||
public FRBodyFitLayoutAdapter(XLayoutContainer container) { |
||||
super(container); |
||||
} |
||||
/** |
||||
* 返回布局自身属性,方便一些特有设置在layout刷新时处理 |
||||
*/ |
||||
@Override |
||||
public GroupModel getLayoutProperties() { |
||||
XWFitLayout xfl = (XWFitLayout) container; |
||||
return new BodyMobileLayoutPropertiesGroupModel(xfl); |
||||
} |
||||
} |
@ -0,0 +1,26 @@
|
||||
package com.fr.design.designer.beans.painters; |
||||
|
||||
import com.fr.design.designer.creator.XLayoutContainer; |
||||
|
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by zhouping on 2016/7/11. |
||||
*/ |
||||
public class FRAbsoluteLayoutPainter extends AbstractPainter { |
||||
public FRAbsoluteLayoutPainter(XLayoutContainer container) { |
||||
super(container); |
||||
} |
||||
|
||||
/** |
||||
* 组件渲染 |
||||
* |
||||
* @param g 画图类 |
||||
* @param startX 开始位置x |
||||
* @param startY 开始位置y |
||||
*/ |
||||
@Override |
||||
public void paint(Graphics g, int startX, int startY) { |
||||
super.paint(g, startX, startY); |
||||
} |
||||
} |
@ -1,20 +0,0 @@
|
||||
package com.fr.design.designer.creator; |
||||
|
||||
import com.fr.design.designer.beans.LayoutAdapter; |
||||
import com.fr.design.designer.beans.adapters.layout.FRBodyFitLayoutAdapter; |
||||
import com.fr.form.ui.container.WFitLayout; |
||||
import java.awt.Dimension; |
||||
|
||||
public class XWBodyFitLayout extends XWFitLayout { |
||||
public XWBodyFitLayout() { |
||||
this(new WFitLayout(), new Dimension()); |
||||
} |
||||
|
||||
public XWBodyFitLayout(WFitLayout widget, Dimension initSize) { |
||||
super(widget, initSize); |
||||
} |
||||
@Override |
||||
public LayoutAdapter getLayoutAdapter() { |
||||
return new FRBodyFitLayoutAdapter(this); |
||||
} |
||||
} |
@ -1,111 +0,0 @@
|
||||
package com.fr.design.designer.properties; |
||||
|
||||
import com.fr.design.beans.GroupModel; |
||||
import com.fr.form.ui.container.WFitLayout; |
||||
import com.fr.design.designer.creator.XWFitLayout; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.mainframe.widget.editors.BooleanEditor; |
||||
import com.fr.design.mainframe.widget.editors.PropertyCellEditor; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import javax.swing.table.TableCellEditor; |
||||
import javax.swing.table.TableCellRenderer; |
||||
import java.awt.*; |
||||
|
||||
public class BodyMobileLayoutPropertiesGroupModel implements GroupModel { |
||||
private PropertyCellEditor reLayoutEditor; |
||||
private CheckBoxCellRenderer reLayoutrenderer; |
||||
private WFitLayout layout; |
||||
private XWFitLayout xfl; |
||||
|
||||
public BodyMobileLayoutPropertiesGroupModel(XWFitLayout xfl) { |
||||
this.xfl = xfl; |
||||
this.layout = xfl.toData(); |
||||
reLayoutrenderer = new CheckBoxCellRenderer(); |
||||
reLayoutEditor = new PropertyCellEditor(new BooleanEditor()); |
||||
} |
||||
|
||||
@Override |
||||
public String getGroupName() { |
||||
return Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"); |
||||
} |
||||
|
||||
@Override |
||||
public int getRowCount() { |
||||
return 1; |
||||
} |
||||
|
||||
@Override |
||||
public TableCellRenderer getRenderer(int row) { |
||||
return reLayoutrenderer; |
||||
} |
||||
|
||||
@Override |
||||
public TableCellEditor getEditor(int row) { |
||||
return reLayoutEditor; |
||||
} |
||||
|
||||
@Override |
||||
public Object getValue(int row, int column) { |
||||
if (column == 0) { |
||||
return Inter.getLocText("FR-Designer-App_ReLayout"); |
||||
}else { |
||||
return layout.getAppRelayout(); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public boolean setValue(Object value, int row, int column) { |
||||
int state = 0; |
||||
boolean appRelayoutState = true; |
||||
if(value instanceof Integer) { |
||||
state = (Integer)value; |
||||
}else if (value instanceof Boolean) { |
||||
appRelayoutState = (boolean)value; |
||||
} |
||||
if (column == 0 || state < 0) { |
||||
return false; |
||||
} else { |
||||
layout.setAppRelayout(appRelayoutState); |
||||
return true; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 是否可编辑 |
||||
* @param row 行 |
||||
* @return 否 |
||||
*/ |
||||
@Override |
||||
public boolean isEditable(int row) { |
||||
return true; |
||||
} |
||||
|
||||
private class CheckBoxCellRenderer extends UICheckBox implements TableCellRenderer { |
||||
|
||||
|
||||
public CheckBoxCellRenderer() { |
||||
super(); |
||||
setOpaque(true); |
||||
|
||||
} |
||||
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { |
||||
if (value instanceof Boolean) { |
||||
setSelected(((Boolean) value).booleanValue()); |
||||
setEnabled(table.isCellEditable(row, column)); |
||||
if (isSelected) { |
||||
setBackground(table.getSelectionBackground()); |
||||
setForeground(table.getSelectionForeground()); |
||||
} else { |
||||
setForeground(table.getForeground()); |
||||
setBackground(table.getBackground()); |
||||
} |
||||
} else { |
||||
return null; |
||||
} |
||||
return this; |
||||
} |
||||
} |
||||
} |
@ -1 +1 @@
|
||||
package com.fr.design.gui.core;
import javax.swing.Icon;
import com.fr.base.BaseUtils;
import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WCardLayout;
import com.fr.form.ui.container.WFitLayout;
import com.fr.form.ui.container.WHorizontalBoxLayout;
import com.fr.form.ui.container.WParameterLayout;
import com.fr.form.ui.container.WVerticalBoxLayout;
import com.fr.general.Inter;
/**
* Author : Shockway
* Date: 13-6-17
* Time: 上午10:40
*/
public class FormWidgetOption extends WidgetOption {
/**
* 返回名字
* @return 名字
*/
@Override
public String optionName() {
return null;
}
/**
* 返回图标
* @return 图标
*/
@Override
public Icon optionIcon() {
return null;
}
/**
* 组件类
* @return 类
*/
@Override
public Class<? extends Widget> widgetClass() {
return null;
}
/**
* 返回组件
* @return 控件
*/
@Override
public Widget createWidget() {
return null;
}
/*
* 表单容器
*/
public static WidgetOption[] getFormContainerInstance() {
return new WidgetOption[] { ABSOLUTELAYOUTCONTAINER, BORDERLAYOUTCONTAINER, HORIZONTALBOXLAYOUTCONTAINER, VERTICALBOXLAYOUTCONTAINER,
CARDLAYOUTCONTAINER, FITLAYOUTCONTAINER };
}
/**
* 表单工具栏上的布局
* @return 控件
*/
public static WidgetOption[] getFormLayoutInstance() {
return new WidgetOption[] {CARDLAYOUTCONTAINER};
}
public static final WidgetOption ABSOLUTELAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_AbsoluteLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_absolute.png"),
WAbsoluteLayout.class);
public static final WidgetOption BORDERLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_BorderLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_border.png"),
WBorderLayout.class);
public static final WidgetOption CARDLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_CardLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/card_layout_16.png"),
WCardLayout.class);
public static final WidgetOption HORIZONTALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Layout-HBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_h_16.png"),
WHorizontalBoxLayout.class);
public static final WidgetOption VERTICALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_VerticalBoxLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"),
WVerticalBoxLayout.class);
public static final WidgetOption FITLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"),
BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"),
WFitLayout.class);
public static final WidgetOption PARAMETERCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Para-Body"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter.png"),
WParameterLayout.class);
public static final WidgetOption ELEMENTCASE = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Form-Report"), BaseUtils.readIcon("/com/fr/web/images/form/resources/report_16.png"),
ElementCaseEditor.class);
} |
||||
package com.fr.design.gui.core;
import javax.swing.Icon;
import com.fr.base.BaseUtils;
import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WCardLayout;
import com.fr.form.ui.container.WFitLayout;
import com.fr.form.ui.container.WHorizontalBoxLayout;
import com.fr.form.ui.container.WParameterLayout;
import com.fr.form.ui.container.WVerticalBoxLayout;
import com.fr.general.Inter;
/**
* Author : Shockway
* Date: 13-6-17
* Time: 上午10:40
*/
public class FormWidgetOption extends WidgetOption {
/**
* 返回名字
* @return 名字
*/
@Override
public String optionName() {
return null;
}
/**
* 返回图标
* @return 图标
*/
@Override
public Icon optionIcon() {
return null;
}
/**
* 组件类
* @return 类
*/
@Override
public Class<? extends Widget> widgetClass() {
return null;
}
/**
* 返回组件
* @return 控件
*/
@Override
public Widget createWidget() {
return null;
}
/*
* 表单容器
*/
public static WidgetOption[] getFormContainerInstance() {
return new WidgetOption[] { ABSOLUTELAYOUTCONTAINER, BORDERLAYOUTCONTAINER, HORIZONTALBOXLAYOUTCONTAINER, VERTICALBOXLAYOUTCONTAINER,
CARDLAYOUTCONTAINER, FITLAYOUTCONTAINER };
}
/**
* 表单工具栏上的布局
* @return 控件
*/
public static WidgetOption[] getFormLayoutInstance() {
return new WidgetOption[] {CARDLAYOUTCONTAINER, ABSOLUTELAYOUTCONTAINER};
}
public static final WidgetOption ABSOLUTELAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_AbsoluteLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_absolute.png"),
WAbsoluteLayout.class);
public static final WidgetOption BORDERLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_BorderLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_border.png"),
WBorderLayout.class);
public static final WidgetOption CARDLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_CardLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/card_layout_16.png"),
WCardLayout.class);
public static final WidgetOption HORIZONTALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Layout-HBox"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_h_16.png"),
WHorizontalBoxLayout.class);
public static final WidgetOption VERTICALBOXLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_VerticalBoxLayout"), BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"),
WVerticalBoxLayout.class);
public static final WidgetOption FITLAYOUTCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"),
BaseUtils.readIcon("/com/fr/web/images/form/resources/boxlayout_v_16.png"),
WFitLayout.class);
public static final WidgetOption PARAMETERCONTAINER = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Para-Body"), BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter.png"),
WParameterLayout.class);
public static final WidgetOption ELEMENTCASE = WidgetOptionFactory.createByWidgetClass(Inter
.getLocText("FR-Designer_Form-Report"), BaseUtils.readIcon("/com/fr/web/images/form/resources/report_16.png"),
ElementCaseEditor.class);
} |
@ -0,0 +1,15 @@
|
||||
# must be unique in a given SonarQube instance |
||||
sonar.projectKey=finereport.design |
||||
# this is the name displayed in the SonarQube UI |
||||
sonar.projectName=finereport.design |
||||
sonar.projectVersion=1.0 |
||||
sonar.branch=master |
||||
|
||||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. |
||||
# Since SonarQube 4.2, this property is optional if sonar.modules is set. |
||||
# If not set, SonarQube starts looking for source code from the directory containing |
||||
# the sonar-project.properties file. |
||||
sonar.sources=. |
||||
|
||||
# Encoding of the source code. Default is default system encoding |
||||
#sonar.sourceEncoding=UTF-8 |
Loading…
Reference in new issue