juhaoyu
7 years ago
55 changed files with 1554 additions and 894 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); |
||||
} |
||||
} |
@ -1 +1,56 @@
|
||||
package com.fr.design.widget.ui.designer;
import com.fr.base.GraphHelper;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.CustomWriteAbleRepeatEditor;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
/**
* Author : Shockway
* Date: 13-9-18
* Time: 下午2:17
*/
public abstract class CustomWritableRepeatEditorPane<T extends CustomWriteAbleRepeatEditor> extends WritableRepeatEditorPane<T> {
private UICheckBox customDataCheckBox;
private static final int CUSTOM_DATA_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30;
private static final int CUSTOM_DATA_CHECK_BOX_HEIGHT = 30;
public CustomWritableRepeatEditorPane(XCreator xCreator) {
super(xCreator);
}
// @Override
// protected JPanel setThirdContentPane() {
// JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
// contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
// JPanel otherContentPane = this.setForthContentPane();
// if (otherContentPane != null) {
// contentPane.add(otherContentPane,BorderLayout.CENTER);
// }
// return contentPane;
// }
public JPanel setValidatePane(){
this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false);
this.customDataCheckBox.setPreferredSize(
new Dimension(CUSTOM_DATA_CHECK_BOX_WIDTH, CUSTOM_DATA_CHECK_BOX_HEIGHT));
JPanel otherContentPane = super.setValidatePane();
otherContentPane.add(GUICoreUtils.createFlowPane(new JComponent[]{customDataCheckBox}, FlowLayout.LEFT, 5));
return otherContentPane;
}
protected abstract JPanel setForthContentPane();
protected void populateSubWritableRepeatEditorBean(T e) {
this.customDataCheckBox.setSelected(e.isCustomData());
populateSubCustomWritableRepeatEditorBean(e);
}
protected abstract void populateSubCustomWritableRepeatEditorBean(T e);
protected T updateSubWritableRepeatEditorBean() {
T e = updateSubCustomWritableRepeatEditorBean();
e.setCustomData(this.customDataCheckBox.isSelected());
return e;
}
protected abstract T updateSubCustomWritableRepeatEditorBean();
} |
||||
package com.fr.design.widget.ui.designer; |
||||
|
||||
import com.fr.base.GraphHelper; |
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.utils.gui.GUICoreUtils; |
||||
import com.fr.form.ui.CustomWriteAbleRepeatEditor; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Author : Shockway |
||||
* Date: 13-9-18 |
||||
* Time: 下午2:17 |
||||
*/ |
||||
public abstract class CustomWritableRepeatEditorPane<T extends CustomWriteAbleRepeatEditor> extends WritableRepeatEditorPane<T> { |
||||
|
||||
private UICheckBox customDataCheckBox; |
||||
private static final int CUSTOM_DATA_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30; |
||||
private static final int CUSTOM_DATA_CHECK_BOX_HEIGHT = 30; |
||||
|
||||
public CustomWritableRepeatEditorPane(XCreator xCreator) { |
||||
super(xCreator); |
||||
} |
||||
|
||||
|
||||
public JPanel setValidatePane(){ |
||||
this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); |
||||
this.customDataCheckBox.setPreferredSize( |
||||
new Dimension(CUSTOM_DATA_CHECK_BOX_WIDTH, CUSTOM_DATA_CHECK_BOX_HEIGHT)); |
||||
JPanel otherContentPane = super.setValidatePane(); |
||||
otherContentPane.add(GUICoreUtils.createFlowPane(new JComponent[]{customDataCheckBox}, FlowLayout.LEFT, 5)); |
||||
return otherContentPane; |
||||
} |
||||
|
||||
|
||||
|
||||
protected void populateSubWritableRepeatEditorBean(T e) { |
||||
this.customDataCheckBox.setSelected(e.isCustomData()); |
||||
populateSubCustomWritableRepeatEditorBean(e); |
||||
} |
||||
|
||||
protected abstract void populateSubCustomWritableRepeatEditorBean(T e); |
||||
|
||||
protected T updateSubWritableRepeatEditorBean() { |
||||
T e = updateSubCustomWritableRepeatEditorBean(); |
||||
e.setCustomData(this.customDataCheckBox.isSelected()); |
||||
return e; |
||||
} |
||||
|
||||
protected abstract T updateSubCustomWritableRepeatEditorBean(); |
||||
|
||||
} |
@ -0,0 +1,47 @@
|
||||
package com.fr.design.widget.ui.designer; |
||||
|
||||
import com.fr.data.Dictionary; |
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.mainframe.widget.accessibles.AccessibleDictionaryEditor; |
||||
import com.fr.form.ui.DictContainedCustomWriteAbleEditor; |
||||
import com.fr.general.Inter; |
||||
|
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/6. |
||||
*/ |
||||
public abstract class DictEditorDefinePane<T extends DictContainedCustomWriteAbleEditor> extends CustomWritableRepeatEditorPane<T> { |
||||
private AccessibleDictionaryEditor dictionaryEditor; |
||||
|
||||
|
||||
public DictEditorDefinePane(XCreator xCreator) { |
||||
super(xCreator); |
||||
} |
||||
|
||||
|
||||
protected Component[] createDictPane(){ |
||||
dictionaryEditor = new AccessibleDictionaryEditor(); |
||||
return new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictionaryEditor}; |
||||
} |
||||
|
||||
@Override |
||||
protected void populateSubCustomWritableRepeatEditorBean(T e) { |
||||
populateSubDictionaryEditorBean(e); |
||||
dictionaryEditor.setValue(e.getDictionary()); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
protected T updateSubCustomWritableRepeatEditorBean() { |
||||
T e = updateSubDictionaryEditorBean(); |
||||
e.setDictionary((Dictionary) dictionaryEditor.getValue()); |
||||
return e; |
||||
} |
||||
|
||||
protected abstract void populateSubDictionaryEditorBean(T e); |
||||
|
||||
protected abstract T updateSubDictionaryEditorBean(); |
||||
|
||||
} |
@ -0,0 +1,56 @@
|
||||
package com.fr.design.widget.ui.designer; |
||||
|
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.style.FRFontPane; |
||||
import com.fr.design.widget.ui.designer.component.BackgroundCompPane; |
||||
import com.fr.design.widget.ui.designer.component.MouseActionBackground; |
||||
import com.fr.form.ui.FreeButton; |
||||
import com.fr.general.FRFont; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/6. |
||||
*/ |
||||
public class FreeButtonDefinePane extends ButtonDefinePane<FreeButton> { |
||||
private BackgroundCompPane backgroundCompPane; |
||||
private FRFontPane frFontPane; |
||||
|
||||
public FreeButtonDefinePane(XCreator xcreator) { |
||||
super(xcreator); |
||||
} |
||||
|
||||
public Component[] createBackgroundComp() { |
||||
backgroundCompPane = new BackgroundCompPane(); |
||||
return new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background") + ":"), backgroundCompPane}; |
||||
} |
||||
|
||||
public Component[] createFontPane() { |
||||
UILabel fontLabel = new UILabel(Inter.getLocText("FR-Designer_Font")); |
||||
fontLabel.setVerticalAlignment(SwingConstants.TOP); |
||||
frFontPane = new FRFontPane(); |
||||
return new Component[]{fontLabel, frFontPane}; |
||||
} |
||||
|
||||
public void populateSubButtonPane(FreeButton e) { |
||||
MouseActionBackground mouseActionBackground = new MouseActionBackground(e.getInitialBackground(), e.getOverBackground(), e.getClickBackground()); |
||||
backgroundCompPane.populate(mouseActionBackground); |
||||
FRFont frFont = e.getFont(); |
||||
if (frFont != null) { |
||||
frFontPane.populateBean(e.getFont()); |
||||
} |
||||
} |
||||
|
||||
public FreeButton updateSubButtonPane() { |
||||
FreeButton freeButton = (FreeButton) creator.toData(); |
||||
MouseActionBackground mouseActionBackground = backgroundCompPane.update(); |
||||
freeButton.setInitialBackground(mouseActionBackground.getInitialBackground()); |
||||
freeButton.setOverBackground(mouseActionBackground.getOverBackground()); |
||||
freeButton.setClickBackground(mouseActionBackground.getClickBackground()); |
||||
frFontPane.update(freeButton.getFont()); |
||||
return freeButton; |
||||
} |
||||
} |
@ -1,60 +0,0 @@
|
||||
package com.fr.design.widget.ui.designer; |
||||
|
||||
import com.fr.design.data.DataCreatorUI; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.present.dict.DictionaryPane; |
||||
import com.fr.form.ui.ListEditor; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
public class ListEditorDefinePane extends WriteUnableRepeatEditorPane<ListEditor> { |
||||
private UICheckBox needHeadCheckBox; |
||||
private DictionaryPane dictPane; |
||||
|
||||
public ListEditorDefinePane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
@Override |
||||
protected void initComponents() { |
||||
super.initComponents(); |
||||
dictPane = new DictionaryPane(); |
||||
} |
||||
|
||||
@Override |
||||
protected JPanel setThirdContentPane() { |
||||
JPanel contenter = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
JPanel centerPane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane(); |
||||
centerPane.add(needHeadCheckBox = new UICheckBox(Inter.getLocText("List-Need_Head"))); |
||||
contenter.add(centerPane); |
||||
return contenter; |
||||
} |
||||
|
||||
@Override |
||||
public String title4PopupWindow() { |
||||
return "List"; |
||||
} |
||||
|
||||
@Override |
||||
protected void populateSubWriteUnableRepeatBean(ListEditor e) { |
||||
needHeadCheckBox.setSelected(e.isNeedHead()); |
||||
this.dictPane.populateBean(e.getDictionary()); |
||||
} |
||||
|
||||
@Override |
||||
protected ListEditor updateSubWriteUnableRepeatBean() { |
||||
ListEditor ob = new ListEditor(); |
||||
|
||||
ob.setNeedHead(needHeadCheckBox.isSelected()); |
||||
ob.setDictionary(this.dictPane.updateBean()); |
||||
|
||||
return ob; |
||||
} |
||||
|
||||
@Override |
||||
public DataCreatorUI dataUI() { |
||||
return dictPane; |
||||
} |
||||
} |
@ -0,0 +1,43 @@
|
||||
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,58 @@
|
||||
package com.fr.design.widget.ui.designer.layout; |
||||
|
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.design.mainframe.widget.accessibles.AccessibleElementCaseToolBarEditor; |
||||
import com.fr.design.widget.ui.designer.component.PaddingBoundPane; |
||||
import com.fr.form.ui.ElementCaseEditor; |
||||
import com.fr.form.web.FormToolBarManager; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/7. |
||||
*/ |
||||
public class ElementEditorDefinePane extends WTitleLayoutDefinePane<ElementCaseEditor> { |
||||
private PaddingBoundPane paddingBoundPane; |
||||
private AccessibleElementCaseToolBarEditor elementCaseToolBarEditor; |
||||
|
||||
public ElementEditorDefinePane(XCreator xCreator){ |
||||
super(xCreator); |
||||
|
||||
} |
||||
|
||||
protected JPanel createCenterPane(){ |
||||
paddingBoundPane = new PaddingBoundPane(); |
||||
elementCaseToolBarEditor = new AccessibleElementCaseToolBarEditor(); |
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
double[] rowSize = {p, p}; |
||||
double[] columnSize = {p, f}; |
||||
int[][] rowCount = {{1, 1}, {1, 1}}; |
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{paddingBoundPane, null}, |
||||
new Component[]{new UILabel("报表块工具栏"), elementCaseToolBarEditor} |
||||
}; |
||||
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 20, 7); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
||||
return panel; |
||||
} |
||||
|
||||
protected ElementCaseEditor updateSubBean(){ |
||||
ElementCaseEditor elementCaseEditor = (ElementCaseEditor)creator.toData(); |
||||
paddingBoundPane.update(elementCaseEditor); |
||||
elementCaseEditor.setToolBars((FormToolBarManager[])elementCaseToolBarEditor.getValue()); |
||||
return elementCaseEditor; |
||||
} |
||||
|
||||
protected void populateSubBean(ElementCaseEditor ob){ |
||||
paddingBoundPane.populate(ob); |
||||
elementCaseToolBarEditor.setValue(ob.getToolBars()); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,85 @@
|
||||
package com.fr.design.widget.ui.designer.layout; |
||||
|
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.foldablepane.UIExpandablePane; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.ispinner.UISpinner; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.design.mainframe.widget.accessibles.AccessibleCardTagWLayoutBorderStyleEditor; |
||||
import com.fr.design.widget.ui.designer.AbstractDataModify; |
||||
import com.fr.form.ui.LayoutBorderStyle; |
||||
import com.fr.form.ui.container.WCardLayout; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
/** |
||||
* Created by ibm on 2017/8/7. |
||||
*/ |
||||
public class WCardLayoutDefinePane extends AbstractDataModify<WCardLayout> { |
||||
private AccessibleCardTagWLayoutBorderStyleEditor accessibleCardTagWLayoutBorderStyleEditor; |
||||
private UICheckBox setCarousel; |
||||
private UISpinner carouselInterval; |
||||
private JPanel IntervalPane; |
||||
|
||||
public WCardLayoutDefinePane(XCreator xCreator) { |
||||
super(xCreator); |
||||
initComponent(); |
||||
} |
||||
|
||||
public void initComponent() { |
||||
carouselInterval = new UISpinner(0, 20, 1, 0); |
||||
accessibleCardTagWLayoutBorderStyleEditor = new AccessibleCardTagWLayoutBorderStyleEditor(); |
||||
accessibleCardTagWLayoutBorderStyleEditor.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
||||
JPanel accessibleCardlayout = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
accessibleCardlayout.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); |
||||
accessibleCardlayout.add(accessibleCardTagWLayoutBorderStyleEditor, BorderLayout.CENTER); |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
UIExpandablePane advanceExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, accessibleCardlayout); |
||||
final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
jPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
||||
setCarousel = new UICheckBox(Inter.getLocText("FR-Designer_setCarousel")); |
||||
|
||||
IntervalPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_carouselInterval")), carouselInterval}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); |
||||
IntervalPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
||||
jPanel.add(setCarousel, BorderLayout.NORTH); |
||||
jPanel.add(IntervalPane, BorderLayout.CENTER); |
||||
setCarousel.addActionListener(new ActionListener() { |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
IntervalPane.setVisible(setCarousel.isSelected()); |
||||
} |
||||
}); |
||||
UIExpandablePane setCarouselPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Tab_carousel"), 280, 20, jPanel); |
||||
this.add(advanceExpandablePane, BorderLayout.NORTH); |
||||
this.add(setCarouselPane, BorderLayout.CENTER); |
||||
} |
||||
|
||||
@Override |
||||
public String title4PopupWindow() { |
||||
return "tabFitLayout"; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(WCardLayout ob) { |
||||
accessibleCardTagWLayoutBorderStyleEditor.setValue(ob.getBorderStyle()); |
||||
setCarousel.setSelected(ob.isCarousel()); |
||||
IntervalPane.setVisible(ob.isCarousel()); |
||||
carouselInterval.setValue(ob.getCarouselInterval()); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public WCardLayout updateBean() { |
||||
WCardLayout layout = (WCardLayout) creator.toData(); |
||||
layout.setBorderStyle((LayoutBorderStyle) accessibleCardTagWLayoutBorderStyleEditor.getValue()); |
||||
layout.setCarousel(setCarousel.isSelected()); |
||||
layout.setCarouselInterval((int)carouselInterval.getValue()); |
||||
return layout; |
||||
} |
||||
} |
Loading…
Reference in new issue