|
|
@ -1,14 +1,16 @@ |
|
|
|
package com.fr.design.widget.ui; |
|
|
|
package com.fr.design.widget.ui; |
|
|
|
|
|
|
|
|
|
|
|
import com.fine.theme.light.ui.FineRoundBorder; |
|
|
|
import com.fr.base.FRContext; |
|
|
|
import com.formdev.flatlaf.ui.FlatUIUtils; |
|
|
|
|
|
|
|
import com.fr.data.core.FormatField; |
|
|
|
import com.fr.data.core.FormatField; |
|
|
|
import com.fr.design.constants.LayoutConstants; |
|
|
|
import com.fr.design.border.UIRoundedBorder; |
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
|
|
|
import com.fr.design.designer.IntervalConstants; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.widget.component.DateValuePane; |
|
|
|
import com.fr.design.widget.component.DateValuePane; |
|
|
|
import com.fr.design.widget.component.UIComboBoxNoArrow; |
|
|
|
import com.fr.design.widget.component.UIComboBoxNoArrow; |
|
|
|
import com.fr.design.widget.ui.designer.date.DateFormatCheckManager; |
|
|
|
import com.fr.design.widget.ui.designer.date.DateFormatCheckManager; |
|
|
@ -17,30 +19,29 @@ import com.fr.form.ui.DateEditor; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.SwingConstants; |
|
|
|
import javax.swing.SwingConstants; |
|
|
|
import javax.swing.border.EmptyBorder; |
|
|
|
import javax.swing.border.TitledBorder; |
|
|
|
import javax.swing.plaf.BorderUIResource; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.*; |
|
|
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.column; |
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.flex; |
|
|
|
|
|
|
|
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT; |
|
|
|
|
|
|
|
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor> { |
|
|
|
public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor> { |
|
|
|
private UIButtonGroup returnTypeButtonGroup; |
|
|
|
private UIButtonGroup returnTypeComboBox; |
|
|
|
|
|
|
|
|
|
|
|
private DateValuePane startDv; |
|
|
|
private DateValuePane startDv; |
|
|
|
private DateValuePane endDv; |
|
|
|
private DateValuePane endDv; |
|
|
|
|
|
|
|
|
|
|
|
private UIComboBox currentFormatComboBox; |
|
|
|
private UIComboBox currentFormatComboBox; |
|
|
|
private UILabel currentSampleLabel; |
|
|
|
private UILabel currentSamplelabel; |
|
|
|
private UIButtonGroup formatButtonGroup; |
|
|
|
private UIButtonGroup fomatHeadGroup; |
|
|
|
|
|
|
|
private static final int SAMPLE_LABEL_PADDING = 4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DateEditorDefinePane() { |
|
|
|
public DateEditorDefinePane() { |
|
|
|
} |
|
|
|
} |
|
|
@ -52,22 +53,33 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected JPanel setSecondContentPane() { |
|
|
|
protected JPanel setSecondContentPane() { |
|
|
|
returnTypeButtonGroup = new UIButtonGroup<>(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") , |
|
|
|
returnTypeComboBox = new UIButtonGroup<>(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") , com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")}); |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")}); |
|
|
|
|
|
|
|
JPanel formatHead = createFormatHead(); |
|
|
|
JPanel formatHead = createFormatHead(); |
|
|
|
startDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date")); |
|
|
|
startDv = new DateValuePane(); |
|
|
|
endDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date")); |
|
|
|
endDv = new DateValuePane(); |
|
|
|
UILabel returnTypeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type")); |
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
return column(LayoutConstants.VERTICAL_GAP, |
|
|
|
UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format")); |
|
|
|
cell(formatHead), |
|
|
|
formatLabel.setVerticalAlignment(SwingConstants.TOP); |
|
|
|
cell(startDv), |
|
|
|
UILabel startDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date")); |
|
|
|
cell(endDv), |
|
|
|
startDateLabel.setVerticalAlignment(SwingConstants.TOP); |
|
|
|
cell(waterMarkDictPane), |
|
|
|
UILabel endDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date")); |
|
|
|
row( |
|
|
|
endDateLabel.setVerticalAlignment(SwingConstants.TOP); |
|
|
|
cell(returnTypeLabel).weight(LEFT_WEIGHT), cell(returnTypeButtonGroup).weight(1.4), flex(1.6) |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
) |
|
|
|
new Component[]{formatLabel, formatHead}, |
|
|
|
).getComponent(); |
|
|
|
new Component[]{startDateLabel, startDv}, |
|
|
|
|
|
|
|
new Component[]{endDateLabel, endDv}, |
|
|
|
|
|
|
|
new Component[]{waterMarkDictPane, null}, |
|
|
|
|
|
|
|
new Component[]{extraPane, null}, |
|
|
|
|
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type")), returnTypeComboBox } |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
double[] rowSize = {p, p, p, p, p, p, p, p}; |
|
|
|
|
|
|
|
double[] columnSize = {p, f}; |
|
|
|
|
|
|
|
int[][] rowCount = {{1, 3},{1, 1},{1, 1},{1, 1},{1, 1}, {1, 1}}; |
|
|
|
|
|
|
|
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return panel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -76,20 +88,20 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){ |
|
|
|
private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){ |
|
|
|
JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
previewPane.setPreferredSize(formatComboBox.getPreferredSize()); |
|
|
|
|
|
|
|
previewPane.setBorder(new BorderUIResource.CompoundBorderUIResource( |
|
|
|
|
|
|
|
new FineRoundBorder(), |
|
|
|
|
|
|
|
new EmptyBorder(0, 8, 0, 0) |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
previewPane.add(sampleLabel, BorderLayout.WEST); |
|
|
|
|
|
|
|
return column(LayoutConstants.VERTICAL_GAP, true, |
|
|
|
|
|
|
|
cell(formatComboBox), |
|
|
|
|
|
|
|
cell(previewPane).weight(1.0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
).getComponent(); |
|
|
|
JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
|
|
|
TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); |
|
|
|
|
|
|
|
previewPane.setBorder(titledBorder); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel sampleLabelWrapper = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
sampleLabelWrapper.setBorder(BorderFactory.createEmptyBorder(0, SAMPLE_LABEL_PADDING, SAMPLE_LABEL_PADDING, SAMPLE_LABEL_PADDING)); |
|
|
|
|
|
|
|
sampleLabelWrapper.add(sampleLabel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
previewPane.add(sampleLabelWrapper, BorderLayout.CENTER); |
|
|
|
|
|
|
|
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
|
|
|
jPanel.add(previewPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
jPanel.add(formatComboBox, BorderLayout.CENTER); |
|
|
|
|
|
|
|
return jPanel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private UILabel createSamplePane(){ |
|
|
|
private UILabel createSamplePane(){ |
|
|
@ -101,51 +113,58 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER); |
|
|
|
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER); |
|
|
|
sampleLabel.setFont(this.getFont()); |
|
|
|
sampleLabel.setFont(FRContext.getDefaultValues().getFRFont()); |
|
|
|
sampleLabel.setForeground(FlatUIUtils.getUIColor("Label.tipColor", Color.GRAY)); |
|
|
|
|
|
|
|
return sampleLabel; |
|
|
|
return sampleLabel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createFormatHead(){ |
|
|
|
private JPanel createFormatHead(){ |
|
|
|
UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format")); |
|
|
|
|
|
|
|
String[] dateArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.DATE); |
|
|
|
String[] dateArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.DATE); |
|
|
|
String[] timeArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.TIME); |
|
|
|
String[] timeArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.TIME); |
|
|
|
final UIComboBox dateFormatComboBox = new UIComboBoxNoArrow(dateArray); |
|
|
|
final UIComboBox dateFormatComboBox = new UIComboBoxNoArrow(dateArray); |
|
|
|
final UIComboBox timeFormatComboBox = new UIComboBoxNoArrow(timeArray); |
|
|
|
final UIComboBox timeFormatComboBox = new UIComboBoxNoArrow(timeArray); |
|
|
|
dateFormatComboBox.addActionListener(e -> refreshPreviewLabel()); |
|
|
|
dateFormatComboBox.addActionListener(new ActionListener(){ |
|
|
|
timeFormatComboBox.addActionListener(e -> refreshPreviewLabel()); |
|
|
|
public void actionPerformed(ActionEvent e){ |
|
|
|
|
|
|
|
refreshPreviewLabel(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
timeFormatComboBox.addActionListener(new ActionListener(){ |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e){ |
|
|
|
|
|
|
|
refreshPreviewLabel(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
final UILabel dateSampleLabel = createSamplePane(); |
|
|
|
final UILabel dateSampleLabel = createSamplePane(); |
|
|
|
final UILabel timeSampleLabel = createSamplePane(); |
|
|
|
final UILabel timeSampleLabel = createSamplePane(); |
|
|
|
|
|
|
|
JPanel fomatHeadPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
final CardLayout cardLayout = new CardLayout(); |
|
|
|
final CardLayout cardLayout = new CardLayout(); |
|
|
|
final JPanel customPane = new JPanel(cardLayout); |
|
|
|
final JPanel customPane = new JPanel(cardLayout); |
|
|
|
JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel); |
|
|
|
JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel); |
|
|
|
JPanel timeFormatPane = createFormatPane(timeFormatComboBox, timeSampleLabel); |
|
|
|
JPanel timeFormatPane = createFormatPane(timeFormatComboBox, timeSampleLabel); |
|
|
|
customPane.add(dateFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date")); |
|
|
|
customPane.add(dateFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date")); |
|
|
|
customPane.add(timeFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")); |
|
|
|
customPane.add(timeFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")); |
|
|
|
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), |
|
|
|
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}; |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}; |
|
|
|
fomatHeadGroup = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}); |
|
|
|
formatButtonGroup = new UIButtonGroup<>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), |
|
|
|
fomatHeadGroup.addChangeListener(new ChangeListener() { |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}); |
|
|
|
@Override |
|
|
|
formatButtonGroup.addChangeListener(e -> { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
int newSelectedIndex = formatButtonGroup.getSelectedIndex(); |
|
|
|
int newSelectedIndex = fomatHeadGroup.getSelectedIndex(); |
|
|
|
cardLayout.show(customPane, tabTitles[newSelectedIndex]); |
|
|
|
cardLayout.show(customPane, tabTitles[newSelectedIndex]); |
|
|
|
if(newSelectedIndex == 0){ |
|
|
|
if(newSelectedIndex == 0){ |
|
|
|
currentFormatComboBox = dateFormatComboBox; |
|
|
|
currentFormatComboBox = dateFormatComboBox; |
|
|
|
currentSampleLabel = dateSampleLabel; |
|
|
|
currentSamplelabel = dateSampleLabel; |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
currentFormatComboBox = timeFormatComboBox; |
|
|
|
currentFormatComboBox = timeFormatComboBox; |
|
|
|
currentSampleLabel = timeSampleLabel; |
|
|
|
currentSamplelabel = timeSampleLabel; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
refreshPreviewLabel(); |
|
|
|
} |
|
|
|
} |
|
|
|
refreshPreviewLabel(); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
return column(LayoutConstants.VERTICAL_GAP, |
|
|
|
fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH); |
|
|
|
row( |
|
|
|
fomatHeadPane.add(customPane, BorderLayout.CENTER); |
|
|
|
cell(formatLabel).weight(LEFT_WEIGHT), cell(formatButtonGroup).weight(1.4), flex(1.6) |
|
|
|
return fomatHeadPane; |
|
|
|
), |
|
|
|
|
|
|
|
row(flex(LEFT_WEIGHT), cell(customPane).weight(RIGHT_WEIGHT)) |
|
|
|
|
|
|
|
).getComponent(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void refreshPreviewLabel() { |
|
|
|
private void refreshPreviewLabel() { |
|
|
|
String text = (String) currentFormatComboBox.getSelectedItem(); |
|
|
|
String text = (String) currentFormatComboBox.getSelectedItem(); |
|
|
|
if (text != null && text.length() > 0) { |
|
|
|
if (text != null && text.length() > 0) { |
|
|
@ -153,15 +172,14 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(text); |
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(text); |
|
|
|
String sample = simpleDateFormat.format(new Date()); |
|
|
|
String sample = simpleDateFormat.format(new Date()); |
|
|
|
DateFormatCheckResult result = DateFormatCheckManager.check(sample, text); |
|
|
|
DateFormatCheckResult result = DateFormatCheckManager.check(sample, text); |
|
|
|
currentSampleLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample") + ":" + result.getSample()); |
|
|
|
currentSamplelabel.setText(result.getSample()); |
|
|
|
currentSampleLabel.setForeground(result.getColor()); |
|
|
|
currentSamplelabel.setForeground(result.getColor()); |
|
|
|
} catch (Exception exp) { |
|
|
|
} catch (Exception exp) { |
|
|
|
currentSampleLabel.removeAll(); |
|
|
|
currentSamplelabel.setForeground(Color.red); |
|
|
|
currentSampleLabel.setForeground(Color.red); |
|
|
|
currentSamplelabel.setText(exp.getMessage()); |
|
|
|
currentSampleLabel.setText(exp.getMessage()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
currentSampleLabel.setText(new Date().toString()); |
|
|
|
currentSamplelabel.setText(new Date().toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -181,11 +199,11 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void populateSubDirectWriteEditorBean(DateEditor e) { |
|
|
|
protected void populateSubDirectWriteEditorBean(DateEditor e) { |
|
|
|
String formatText = e.getFormatText(); |
|
|
|
String formatText = e.getFormatText(); |
|
|
|
formatButtonGroup.setSelectedIndex(getDateType(e)); |
|
|
|
fomatHeadGroup.setSelectedIndex(getDateType(e)); |
|
|
|
formatButtonGroup.populateBean(); |
|
|
|
fomatHeadGroup.populateBean(); |
|
|
|
currentFormatComboBox.setSelectedItem(formatText); |
|
|
|
currentFormatComboBox.setSelectedItem(formatText); |
|
|
|
|
|
|
|
|
|
|
|
returnTypeButtonGroup.setSelectedIndex(e.isReturnDate() ? 0 : 1); |
|
|
|
returnTypeComboBox.setSelectedIndex(e.isReturnDate() ? 0 : 1); |
|
|
|
startDv.populate(e.getStartDate()); |
|
|
|
startDv.populate(e.getStartDate()); |
|
|
|
endDv.populate(e.getEndDate()); |
|
|
|
endDv.populate(e.getEndDate()); |
|
|
|
} |
|
|
|
} |
|
|
@ -194,7 +212,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
protected DateEditor updateSubDirectWriteEditorBean() { |
|
|
|
protected DateEditor updateSubDirectWriteEditorBean() { |
|
|
|
DateEditor ob = new DateEditor(); |
|
|
|
DateEditor ob = new DateEditor(); |
|
|
|
ob.setFormatText(this.getSimpleDateFormat().toPattern()); |
|
|
|
ob.setFormatText(this.getSimpleDateFormat().toPattern()); |
|
|
|
ob.setReturnDate(returnTypeButtonGroup.getSelectedIndex() == 0); |
|
|
|
ob.setReturnDate(returnTypeComboBox.getSelectedIndex() == 0); |
|
|
|
ob.setStartDate(startDv.update()); |
|
|
|
ob.setStartDate(startDv.update()); |
|
|
|
ob.setEndDate(endDv.update()); |
|
|
|
ob.setEndDate(endDv.update()); |
|
|
|
|
|
|
|
|
|
|
|