Browse Source
* commit '13960a358ac178975e78a104bc52fd1b88289837': 代码调整 代码调整 REPORT-3293 9.0设计器控件设置重画 代码修改 REPORT-3293 9.0设计器控件设置重画master
superman
7 years ago
80 changed files with 1110 additions and 1333 deletions
@ -1,9 +1,9 @@
|
||||
package com.fr.design.mainframe.widget.accessibles; |
||||
|
||||
import java.awt.BorderLayout; |
||||
import java.awt.*; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
import javax.swing.JComponent; |
||||
import javax.swing.*; |
||||
|
||||
import com.fr.design.mainframe.widget.editors.ITextComponent; |
||||
import com.fr.design.mainframe.widget.renderer.GenericCellRenderer; |
@ -1,17 +1,22 @@
|
||||
package com.fr.design.mainframe.widget.renderer; |
||||
|
||||
import java.awt.Graphics; |
||||
import java.awt.Graphics2D; |
||||
import java.awt.Image; |
||||
import java.awt.*; |
||||
|
||||
import com.fr.base.FRContext; |
||||
import com.fr.base.Icon; |
||||
import com.fr.base.IconManager; |
||||
import com.fr.form.ui.WidgetManager; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
public class IconCellRenderer extends GenericCellRenderer { |
||||
private Image img; |
||||
|
||||
public IconCellRenderer(){ |
||||
// this.setBorder(BorderFactory.createLineBorder());
|
||||
} |
||||
|
||||
|
||||
@Override |
||||
public void setValue(Object v) { |
||||
try { |
@ -0,0 +1,48 @@
|
||||
package com.fr.design.widget.component; |
||||
|
||||
import com.fr.form.ui.FreeButton; |
||||
import com.fr.general.Background; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/8. |
||||
*/ |
||||
public class ButtonBackgroundPane extends BackgroundCompPane<FreeButton> { |
||||
|
||||
public ButtonBackgroundPane(){ |
||||
|
||||
} |
||||
|
||||
public void update(FreeButton freeButton){ |
||||
int selectIndex = backgroundHead.getSelectedIndex(); |
||||
if(selectIndex == 0){ |
||||
freeButton.setCustomStyle(false); |
||||
freeButton.setInitialBackground(null); |
||||
freeButton.setOverBackground(null); |
||||
freeButton.setClickBackground(null); |
||||
}else{ |
||||
freeButton.setCustomStyle(true); |
||||
freeButton.setInitialBackground((Background) initalBackgroundEditor.getValue()); |
||||
freeButton.setOverBackground((Background) overBackgroundEditor.getValue()); |
||||
freeButton.setClickBackground((Background)clickBackgroundEditor.getValue()); |
||||
} |
||||
} |
||||
|
||||
public void populate(FreeButton freeButton){ |
||||
if(!freeButton.isCustomStyle()){ |
||||
backgroundHead.setSelectedIndex(0); |
||||
initalBackgroundEditor.setValue(null); |
||||
overBackgroundEditor.setValue(null); |
||||
clickBackgroundEditor.setValue(null); |
||||
}else{ |
||||
backgroundHead.setSelectedIndex(1); |
||||
initalBackgroundEditor.setValue(freeButton.getInitialBackground()); |
||||
overBackgroundEditor.setValue(freeButton.getOverBackground()); |
||||
clickBackgroundEditor.setValue(freeButton.getClickBackground()); |
||||
} |
||||
} |
||||
|
||||
protected String title4PopupWindow() { |
||||
return "buttonBackground"; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,81 @@
|
||||
package com.fr.design.widget.component; |
||||
|
||||
import com.fr.design.constants.LayoutConstants; |
||||
import com.fr.design.editor.editor.*; |
||||
import com.fr.design.gui.ibutton.UIHeadGroup; |
||||
import com.fr.general.ComparatorUtils; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/8. |
||||
*/ |
||||
public class DateValuePane extends JPanel { |
||||
private UIHeadGroup widgetValueHead; |
||||
private Editor[] editor; |
||||
|
||||
|
||||
public DateValuePane() { |
||||
editor = new Editor[]{ |
||||
new NoneEditor(null, Inter.getLocText("None")), |
||||
new DateEditor(true, Inter.getLocText("Date")), |
||||
new FormulaEditor(Inter.getLocText("Parameter-Formula")) |
||||
}; |
||||
this.setLayout(new BorderLayout(0, LayoutConstants.VGAP_SMALL)); |
||||
final CardLayout cardLayout = new CardLayout(); |
||||
final JPanel customPane = new JPanel(cardLayout); |
||||
final String[] tabTitles = new String[editor.length]; |
||||
for (int i = 0; i < editor.length; i++) { |
||||
customPane.add(editor[i], editor[i].getName()); |
||||
tabTitles[i] = editor[i].getName(); |
||||
} |
||||
widgetValueHead = new UIHeadGroup(tabTitles) { |
||||
@Override |
||||
public void tabChanged(int index) { |
||||
if (ComparatorUtils.equals(tabTitles[index], Inter.getLocText("None"))) { |
||||
customPane.setVisible(false); |
||||
} else { |
||||
customPane.setVisible(true); |
||||
} |
||||
cardLayout.show(customPane, tabTitles[index]); |
||||
} |
||||
}; |
||||
this.add(widgetValueHead, BorderLayout.NORTH); |
||||
this.add(customPane, BorderLayout.CENTER); |
||||
|
||||
} |
||||
|
||||
|
||||
public Object update() { |
||||
int index = widgetValueHead.getSelectedIndex(); |
||||
Editor e = editor[index]; |
||||
Object value = e.getValue(); |
||||
return value; |
||||
} |
||||
|
||||
public void populate(Object ob) { |
||||
for (int i = 0; i < editor.length; i++) { |
||||
if (editor[i].accept(ob)) { |
||||
setCardValue(i, ob); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
|
||||
private void setCardValue(int i, Object object) { |
||||
widgetValueHead.setSelectedIndex(i); |
||||
editor[i].setValue(object); |
||||
// kunsnat: bug7861 所有的Editor值都要跟随改变, 因为populate的editor 从""
|
||||
// 一定是最后的Editor哦.
|
||||
for (int j = 0; j < editor.length; j++) { |
||||
if (i == j) { |
||||
continue; |
||||
} |
||||
this.editor[j].setValue(null); |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
@ -1,64 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.btn; |
||||
|
||||
import com.fr.base.FRContext; |
||||
import com.fr.design.module.DesignModuleFactory; |
||||
import com.fr.design.widget.btn.ButtonDetailPane; |
||||
import com.fr.form.ui.Button; |
||||
import com.fr.form.ui.FreeButton; |
||||
import com.fr.form.ui.Widget; |
||||
|
||||
import com.fr.stable.bridge.BridgeMark; |
||||
import com.fr.stable.bridge.StableFactory; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* Created by IntelliJ IDEA. |
||||
* Author : Richer |
||||
* Version: 6.5.6 |
||||
* Date : 11-11-15 |
||||
* Time : 下午6:29 |
||||
*/ |
||||
public class ButtonDetailPaneFactory { |
||||
private static Map<String, Class> detailMap = new HashMap<String, Class>(); |
||||
|
||||
static { |
||||
detailMap.put(Button.class.getName(), DefaultButtonDetailPane.class); |
||||
detailMap.put(FreeButton.class.getName(), FreeButtonDetailPane.class); |
||||
if (StableFactory.getMarkedClass(BridgeMark.SUBMIT_BUTTON, Widget.class) != null) { |
||||
detailMap.put(StableFactory.getMarkedClass(BridgeMark.SUBMIT_BUTTON, Widget.class).getName(), DesignModuleFactory.getButtonDetailPaneClass()); |
||||
} |
||||
} |
||||
|
||||
public static ButtonDetailPane<Button> createButtonDetailPane(Button button) { |
||||
Class cls = detailMap.get(button.getClass().getName()); |
||||
ButtonDetailPane<Button> detailPane = null; |
||||
if (cls != null) { |
||||
try { |
||||
detailPane = (ButtonDetailPane) cls.newInstance(); |
||||
detailPane.populate(button); |
||||
} catch (Exception e) { |
||||
FRContext.getLogger().error(e.getMessage(), e); |
||||
} |
||||
} |
||||
return detailPane; |
||||
} |
||||
|
||||
public static ButtonDetailPane<Button> createButtonDetailPane(Class cls, Button button) { |
||||
if (cls == null) { |
||||
return createButtonDetailPane(button); |
||||
} |
||||
Class aa = detailMap.get(cls.getName()); |
||||
ButtonDetailPane<Button> detailPane = null; |
||||
if (aa != null) { |
||||
try { |
||||
detailPane = (ButtonDetailPane) aa.newInstance(); |
||||
detailPane.populate(button == null ? detailPane.createButton() : button); |
||||
} catch (Exception e) { |
||||
FRContext.getLogger().error(e.getMessage(), e); |
||||
} |
||||
} |
||||
return detailPane; |
||||
} |
||||
} |
@ -1,143 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.btn; |
||||
|
||||
import com.fr.base.background.ColorBackground; |
||||
import com.fr.base.background.ImageBackground; |
||||
import com.fr.design.dialog.BasicDialog; |
||||
import com.fr.design.dialog.BasicPane; |
||||
import com.fr.design.dialog.DialogActionAdapter; |
||||
import com.fr.design.gui.ibutton.UIButton; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.style.background.BackgroundButtonPane; |
||||
import com.fr.form.ui.FreeButton; |
||||
import com.fr.general.Background; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import javax.swing.border.TitledBorder; |
||||
import java.awt.*; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
public class ButtonSytleDefinedPane extends BasicPane { |
||||
|
||||
// private UIComboBox buttonStyleComboBox;
|
||||
// private JPanel card;
|
||||
// private CardLayout cardLayout;
|
||||
private BackgroundPane initBackgroundPane; |
||||
private BackgroundPane overBackgroundPane; |
||||
private BackgroundPane clickBackgroundPane; |
||||
private Background initBackground; |
||||
private Background overBackground; |
||||
private Background clickBackground; |
||||
|
||||
public ButtonSytleDefinedPane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
protected void initComponents() { |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
|
||||
JPanel buttonStylePane = new JPanel(); |
||||
buttonStylePane.setLayout(new BorderLayout()); |
||||
initBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Initial") + ":", Inter.getLocText("FR-Designer_Initial_Background_Tips")); |
||||
overBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Over") + ":", Inter.getLocText("FR-Designer_Mouse_Move_Tips")); |
||||
clickBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Click") + ":", Inter.getLocText("FR-Designer_Mouse_Click_Tips")); |
||||
|
||||
JPanel table = FRGUIPaneFactory.createYBoxEmptyBorderPane(); |
||||
table.setBorder(new TitledBorder(Inter.getLocText(new String[]{"Custom", "Form-Button", "Style"}))); |
||||
table.add(initBackgroundPane); |
||||
table.add(overBackgroundPane); |
||||
table.add(clickBackgroundPane); |
||||
buttonStylePane.add(table, BorderLayout.WEST); |
||||
|
||||
this.add(buttonStylePane, BorderLayout.CENTER); |
||||
|
||||
} |
||||
|
||||
public void populate(FreeButton button) { |
||||
if (button == null) { |
||||
return; |
||||
} |
||||
initBackgroundPane.populate(button.getInitialBackground()); |
||||
overBackgroundPane.populate(button.getOverBackground()); |
||||
clickBackgroundPane.populate(button.getClickBackground()); |
||||
} |
||||
|
||||
public FreeButton update(FreeButton button) { |
||||
button.setCustomStyle(true); |
||||
button.setInitialBackground(initBackgroundPane.update()); |
||||
button.setOverBackground(overBackgroundPane.update()); |
||||
button.setClickBackground(clickBackgroundPane.update()); |
||||
|
||||
return button; |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return null; |
||||
} |
||||
|
||||
class BackgroundPane extends JPanel { |
||||
private UIButton editButton; |
||||
private BackgroundButtonPane choosePane; |
||||
private Background background; |
||||
private UILabel ImagePreviewPane; |
||||
|
||||
BackgroundPane(String text, String ToolTips) { |
||||
this.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); |
||||
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 150)); |
||||
|
||||
UILabel label = new UILabel(text); |
||||
label.setToolTipText(ToolTips); |
||||
label.setPreferredSize(new Dimension(100, 20)); |
||||
this.add(label); |
||||
|
||||
ImagePreviewPane = new UILabel(); |
||||
ImagePreviewPane.setPreferredSize(new Dimension(100, 20)); |
||||
this.add(ImagePreviewPane); |
||||
|
||||
editButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); |
||||
editButton.addActionListener(new ActionListener() { |
||||
|
||||
public void actionPerformed(ActionEvent e) { |
||||
choosePane = new BackgroundButtonPane(); |
||||
BasicDialog dlg = choosePane.showWindow(SwingUtilities |
||||
.getWindowAncestor(ButtonSytleDefinedPane.this)); |
||||
dlg.addDialogActionListener(new DialogActionAdapter() { |
||||
@Override |
||||
public void doOk() { |
||||
populate(choosePane.update()); |
||||
} |
||||
}); |
||||
if(BackgroundPane.this.background == null){ |
||||
BackgroundPane.this.background = new ColorBackground(); |
||||
} |
||||
choosePane.populate((Background) BackgroundPane.this.background); |
||||
dlg.setVisible(true); |
||||
} |
||||
}); |
||||
this.add(editButton); |
||||
} |
||||
|
||||
public void populate(Background background) { |
||||
this.background = background; |
||||
|
||||
if (background instanceof ImageBackground && ((ImageBackground) background).getImage() != null) { |
||||
ImagePreviewPane.setIcon(new ImageIcon(((ImageBackground) background).getImage())); |
||||
} else if(background instanceof ColorBackground && ((ColorBackground) background).getColor() != null){ |
||||
ImagePreviewPane.setIcon(null); |
||||
ImagePreviewPane.setOpaque(true); |
||||
ImagePreviewPane.setBackground(((ColorBackground) background).getColor()); |
||||
}else{ |
||||
ImagePreviewPane.setIcon(null); |
||||
ImagePreviewPane.setOpaque(false); |
||||
ImagePreviewPane.setBackground(null); |
||||
} |
||||
} |
||||
|
||||
public Background update() { |
||||
return background; |
||||
} |
||||
} |
||||
} |
@ -1,30 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.btn; |
||||
|
||||
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane; |
||||
import com.fr.form.ui.Button; |
||||
import com.fr.form.ui.FreeButton; |
||||
|
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by IntelliJ IDEA. Author : Richer Version: 6.5.6 Date : 11-11-15 Time |
||||
* : 下午6:24 |
||||
*/ |
||||
public class DefaultButtonDetailPane extends ButtonWithHotkeysDetailPane<Button> { |
||||
|
||||
@Override |
||||
protected Component createCenterPane() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public FreeButton createButton() { |
||||
return new FreeButton(); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public Class classType() { |
||||
return Button.class; |
||||
} |
||||
} |
@ -1,56 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.btn; |
||||
|
||||
import com.fr.design.dialog.BasicPane; |
||||
import com.fr.design.gui.icombobox.UIComboBox; |
||||
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.TableLayoutHelper; |
||||
import com.fr.design.widget.IconDefinePane; |
||||
import com.fr.form.ui.Button; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
public class DefaultButtonStylePane extends BasicPane { |
||||
|
||||
private UITextField buttonNameTextField; |
||||
private IconDefinePane iconPane; |
||||
private UIComboBox buttonStyleComboBox; |
||||
|
||||
public DefaultButtonStylePane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
protected void initComponents() { |
||||
this.setLayout(new BorderLayout()); |
||||
|
||||
JPanel labelPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
||||
iconPane = new IconDefinePane(); |
||||
labelPane.add(iconPane); |
||||
Component[][] n_components = { |
||||
{ new UILabel(Inter.getLocText("Text") + ":"), buttonNameTextField = new UITextField(20) }, |
||||
{ new UILabel(Inter.getLocText("Icon") + ":"), labelPane } }; |
||||
JPanel panel = TableLayoutHelper.createTableLayoutPane(n_components, new double[]{-2, -2}, new double[]{-2, -2}); |
||||
|
||||
this.add(panel,BorderLayout.CENTER); |
||||
} |
||||
|
||||
public void populate(Button button) { |
||||
buttonNameTextField.setText(button.getText()); |
||||
iconPane.populate(button.getIconName()); |
||||
} |
||||
|
||||
public Button update(Button button) { |
||||
button.setText(buttonNameTextField.getText()); |
||||
button.setIconName(iconPane.update()); |
||||
return button; |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "default"; |
||||
} |
||||
|
||||
} |
@ -1,40 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.btn; |
||||
|
||||
import com.fr.design.widget.btn.ButtonWithHotkeysDetailPane; |
||||
import com.fr.form.ui.Button; |
||||
import com.fr.form.ui.FreeButton; |
||||
|
||||
import java.awt.*; |
||||
|
||||
public class FreeButtonDetailPane extends ButtonWithHotkeysDetailPane<FreeButton> { |
||||
private ButtonSytleDefinedPane stylePane; |
||||
|
||||
@Override |
||||
protected Component createCenterPane() { |
||||
return stylePane = new ButtonSytleDefinedPane(); |
||||
} |
||||
|
||||
@Override |
||||
public FreeButton createButton() { |
||||
return new FreeButton(); |
||||
} |
||||
|
||||
@Override |
||||
public void populate(Button button) { |
||||
super.populate(button); |
||||
if(button instanceof FreeButton) { |
||||
stylePane.populate((FreeButton) button); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public FreeButton update() { |
||||
FreeButton button = super.update(); |
||||
return stylePane.update(button); |
||||
} |
||||
|
||||
@Override |
||||
public Class classType() { |
||||
return FreeButton.class; |
||||
} |
||||
} |
@ -1,43 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.component; |
||||
|
||||
import com.fr.general.Background; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/7. |
||||
*/ |
||||
public class MouseActionBackground { |
||||
|
||||
private Background initialBackground; |
||||
private Background overBackground; |
||||
private Background clickBackground; |
||||
|
||||
public MouseActionBackground(Background initialBackground, Background overBackground, Background clickBackground){ |
||||
this.initialBackground = initialBackground; |
||||
this.overBackground = overBackground; |
||||
this.clickBackground = clickBackground; |
||||
} |
||||
|
||||
public Background getInitialBackground() { |
||||
return initialBackground; |
||||
} |
||||
|
||||
public void setInitialBackground(Background initialBackground) { |
||||
this.initialBackground = initialBackground; |
||||
} |
||||
|
||||
public Background getOverBackground() { |
||||
return overBackground; |
||||
} |
||||
|
||||
public void setOverBackground(Background overBackground) { |
||||
this.overBackground = overBackground; |
||||
} |
||||
|
||||
public Background getClickBackground() { |
||||
return clickBackground; |
||||
} |
||||
|
||||
public void setClickBackground(Background clickBackground) { |
||||
this.clickBackground = clickBackground; |
||||
} |
||||
} |
@ -0,0 +1,50 @@
|
||||
package com.fr.design.widget.ui.designer.component; |
||||
|
||||
import com.fr.design.widget.component.BackgroundCompPane; |
||||
import com.fr.form.ui.container.cardlayout.WTabFitLayout; |
||||
import com.fr.general.Background; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/8. |
||||
*/ |
||||
public class TabFitLayoutBackgroundPane extends BackgroundCompPane<WTabFitLayout> { |
||||
|
||||
public TabFitLayoutBackgroundPane(){ |
||||
|
||||
} |
||||
|
||||
public void update(WTabFitLayout wTabFitLayout){ |
||||
int selectIndex = backgroundHead.getSelectedIndex(); |
||||
if(selectIndex == 0){ |
||||
wTabFitLayout.setCustomStyle(false); |
||||
wTabFitLayout.setInitialBackground(null); |
||||
wTabFitLayout.setOverBackground(null); |
||||
wTabFitLayout.setClickBackground(null); |
||||
}else{ |
||||
wTabFitLayout.setCustomStyle(true); |
||||
wTabFitLayout.setInitialBackground((Background) initalBackgroundEditor.getValue()); |
||||
wTabFitLayout.setOverBackground((Background) overBackgroundEditor.getValue()); |
||||
wTabFitLayout.setClickBackground((Background)clickBackgroundEditor.getValue()); |
||||
} |
||||
} |
||||
|
||||
public void populate(WTabFitLayout wTabFitLayout){ |
||||
if(!wTabFitLayout.isCustomStyle()){ |
||||
backgroundHead.setSelectedIndex(0); |
||||
initalBackgroundEditor.setValue(null); |
||||
overBackgroundEditor.setValue(null); |
||||
clickBackgroundEditor.setValue(null); |
||||
}else{ |
||||
backgroundHead.setSelectedIndex(1); |
||||
initalBackgroundEditor.setValue(wTabFitLayout.getInitialBackground()); |
||||
overBackgroundEditor.setValue(wTabFitLayout.getOverBackground()); |
||||
clickBackgroundEditor.setValue(wTabFitLayout.getClickBackground()); |
||||
} |
||||
} |
||||
|
||||
protected String title4PopupWindow() { |
||||
return "tabFitBackground"; |
||||
} |
||||
|
||||
|
||||
} |
@ -1,40 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.custom; |
||||
|
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/1. |
||||
*/ |
||||
public class WidgetValueField implements WidgetValuePane{ |
||||
private UITextField dataSource; |
||||
private UITextField field; |
||||
|
||||
public WidgetValueField(){ |
||||
dataSource = new UITextField(); |
||||
field = new UITextField(); |
||||
} |
||||
|
||||
public JComponent createWidgetValuePane(){ |
||||
JPanel jPanel = new JPanel(); |
||||
jPanel.setLayout(new BorderLayout(1,7)); |
||||
jPanel.add(dataSource, BorderLayout.NORTH); |
||||
jPanel.add(field, BorderLayout.CENTER); |
||||
return jPanel; |
||||
} |
||||
|
||||
public String markTitle(){ |
||||
return Inter.getLocText("FR-Designer_Widget_Field"); |
||||
} |
||||
|
||||
public void update(){ |
||||
//todo
|
||||
} |
||||
|
||||
public void populate(){ |
||||
//todo
|
||||
} |
||||
} |
@ -1,33 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.custom; |
||||
|
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/1. |
||||
*/ |
||||
public class WidgetValueFormula implements WidgetValuePane{ |
||||
private UITextField uiTextField; |
||||
|
||||
public WidgetValueFormula(){ |
||||
uiTextField = new UITextField(); |
||||
} |
||||
|
||||
public JComponent createWidgetValuePane(){ |
||||
return uiTextField; |
||||
} |
||||
|
||||
public String markTitle(){ |
||||
return Inter.getLocText("FR-Designer_Widget_Formula"); |
||||
} |
||||
|
||||
public void update(){ |
||||
|
||||
} |
||||
|
||||
public void populate(){ |
||||
|
||||
} |
||||
} |
@ -1,17 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.custom; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/1. |
||||
*/ |
||||
public interface WidgetValuePane{ |
||||
|
||||
JComponent createWidgetValuePane(); |
||||
|
||||
String markTitle(); |
||||
|
||||
void update(); |
||||
|
||||
void populate(); |
||||
} |
@ -1,33 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer.custom; |
||||
|
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/1. |
||||
*/ |
||||
public class WidgetValueString implements WidgetValuePane{ |
||||
private UITextField uiTextField; |
||||
|
||||
public WidgetValueString(){ |
||||
uiTextField = new UITextField(); |
||||
} |
||||
|
||||
public JComponent createWidgetValuePane(){ |
||||
return uiTextField; |
||||
} |
||||
|
||||
public String markTitle(){ |
||||
return Inter.getLocText("FR-Designer_Widget_String"); |
||||
} |
||||
|
||||
public void update(){ |
||||
|
||||
} |
||||
|
||||
public void populate(){ |
||||
|
||||
} |
||||
} |
@ -0,0 +1,7 @@
|
||||
//package com.fr.design.widget.ui.designer.layout;
|
||||
//
|
||||
///**
|
||||
// * Created by ibm on 2017/8/7.
|
||||
// */
|
||||
//public class ChartEditorDefinePane extends {
|
||||
//}
|
Loading…
Reference in new issue