|
|
@ -36,7 +36,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
private UIComboBox currentFormatComboBox; |
|
|
|
private UIComboBox currentFormatComboBox; |
|
|
|
private UILabel currentSamplelabel; |
|
|
|
private UILabel currentSamplelabel; |
|
|
|
private UIButtonGroup fomatHeadGroup; |
|
|
|
private UIButtonGroup fomatHeadGroup; |
|
|
|
|
|
|
|
private static final int SAMPLE_LABEL_PADDING = 4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DateEditorDefinePane() { |
|
|
|
public DateEditorDefinePane() { |
|
|
@ -76,7 +76,13 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){ |
|
|
|
private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){ |
|
|
|
JPanel previewPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Base_StyleFormat_Sample")); |
|
|
|
JPanel previewPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Base_StyleFormat_Sample")); |
|
|
|
previewPane.add(sampleLabel); |
|
|
|
previewPane.setLayout(new BorderLayout()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
jPanel.add(previewPane, BorderLayout.NORTH); |
|
|
|
jPanel.add(previewPane, BorderLayout.NORTH); |
|
|
|
jPanel.add(formatComboBox, BorderLayout.CENTER); |
|
|
|
jPanel.add(formatComboBox, BorderLayout.CENTER); |
|
|
@ -84,7 +90,13 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private UILabel createSamplePane(){ |
|
|
|
private UILabel createSamplePane(){ |
|
|
|
UILabel sampleLabel = new UILabel(""); |
|
|
|
UILabel sampleLabel = new UILabel("") { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void setText(String text) { |
|
|
|
|
|
|
|
// 加上<html>可以自动换行
|
|
|
|
|
|
|
|
super.setText("<html>" + text + "</html>"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER); |
|
|
|
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER); |
|
|
|
sampleLabel.setFont(FRContext.getDefaultValues().getFRFont()); |
|
|
|
sampleLabel.setFont(FRContext.getDefaultValues().getFRFont()); |
|
|
|
return sampleLabel; |
|
|
|
return sampleLabel; |
|
|
|