Browse Source
* commit '55a8361b01b41febfbcee8d7b8b1c0b7dded9a21': REPORT-3163 合作开发9.0设计器=>聚合报表=》代码规范 REPORT-3163 合作开发9.0设计器=>聚合报表=》点击报表块内的单元格时,替换控件设置tab页 REPORT-3163 合作开发9.0设计器=>聚合报表=》去掉无用import REPORT-3163 合作开发9.0设计器=>聚合报表=》国际化;边距调整 REPORT-3163 合作开发9.0设计器=>聚合报表=》控件名称面板 REPORT-3163 合作开发9.0设计器=>聚合报表=》坐标尺寸master
superman
8 years ago
13 changed files with 203 additions and 103 deletions
@ -0,0 +1,50 @@
|
||||
package com.fr.design.mainframe.widget; |
||||
|
||||
import com.fr.design.dialog.BasicPane; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by plough on 2017/8/7. |
||||
*/ |
||||
public class BasicPropertyPane extends BasicPane { |
||||
protected UITextField widgetName; |
||||
|
||||
public BasicPropertyPane(){ |
||||
initContentPane(); |
||||
} |
||||
|
||||
protected void initContentPane() { |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
widgetName = new UITextField(); |
||||
|
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
double[] rowSize = {p}; |
||||
double[] columnSize = {p, f}; |
||||
int[][] rowCount = {{1, 1}}; |
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Name")), widgetName}, |
||||
}; |
||||
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 20, 7); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 15)); |
||||
this.add(panel, BorderLayout.NORTH); |
||||
} |
||||
|
||||
public UITextField getWidgetNameField() { |
||||
return widgetName; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public String title4PopupWindow() { |
||||
return "basicProperty"; |
||||
} |
||||
} |
@ -0,0 +1,52 @@
|
||||
package com.fr.design.widget; |
||||
|
||||
import com.fr.design.foldablepane.UIExpandablePane; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.ispinner.UISpinner; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by plough on 2017/8/7. |
||||
*/ |
||||
public class WidgetBoundsPaneFactory { |
||||
|
||||
public static UIExpandablePane createBoundsPane(UISpinner width, UISpinner height) { |
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Size")), width, height}, |
||||
new Component[]{null, new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), SwingConstants.CENTER), new UILabel(Inter.getLocText("FR-Designer-Tree_Height"), SwingConstants.CENTER)}, |
||||
}; |
||||
double[] rowSize = {p, p}; |
||||
double[] columnSize = {p, f, f}; |
||||
int[][] rowCount = {{1, 1, 1}, {1, 1, 1}}; |
||||
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 8, 5); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 15)); |
||||
|
||||
return new UIExpandablePane(Inter.getLocText("FR-Designer_Coords_And_Size"), 280, 24, panel); |
||||
} |
||||
|
||||
public static UIExpandablePane createAbsoluteBoundsPane(UISpinner x, UISpinner y, UISpinner width, UISpinner height) { |
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
|
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Position")), x, y}, |
||||
new Component[]{null, new UILabel(Inter.getLocText("FR-Designer_X_Coordinate"), SwingConstants.CENTER), new UILabel(Inter.getLocText("FR-Designer_Y_Coordinate"), SwingConstants.CENTER)}, |
||||
new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Size")), width, height}, |
||||
new Component[]{null, new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), SwingConstants.CENTER), new UILabel(Inter.getLocText("FR-Designer-Tree_Height"), SwingConstants.CENTER)}, |
||||
}; |
||||
double[] rowSize = {p, p, p, p}; |
||||
double[] columnSize = {p, f, f}; |
||||
int[][] rowCount = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}}; |
||||
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 8, 5); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 15)); |
||||
|
||||
return new UIExpandablePane(Inter.getLocText("FR-Designer_Coords_And_Size"), 230, 24, panel); |
||||
} |
||||
} |
Loading…
Reference in new issue