@ -1,36 +1,33 @@
|
||||
package com.fr.design.actions.columnrow; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.data.DesignTableDataManager; |
||||
import com.fr.design.actions.cell.AbstractCellElementAction; |
||||
import com.fr.design.dscolumn.DSColumnConditionsPane; |
||||
import com.fr.design.data.DesignTableDataManager; |
||||
import com.fr.design.dialog.BasicPane; |
||||
import com.fr.general.Inter; |
||||
import com.fr.design.dscolumn.DSColumnConditionsPane; |
||||
import com.fr.design.mainframe.ElementCasePane; |
||||
import com.fr.general.Inter; |
||||
import com.fr.report.cell.TemplateCellElement; |
||||
|
||||
public class DSColumnConditionAction extends AbstractCellElementAction { |
||||
|
||||
private boolean returnValue = false; |
||||
private TemplateCellElement editCellElement; |
||||
|
||||
public DSColumnConditionAction(ElementCasePane t) { |
||||
super(t); |
||||
|
||||
super(t); |
||||
|
||||
this.setName(Inter.getLocText("Filter")); |
||||
this.setMnemonic('E'); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/expand/cellAttr.gif")); |
||||
} |
||||
|
||||
@Override |
||||
protected BasicPane populateBasicPane(TemplateCellElement cellElement) { |
||||
protected BasicPane populateBasicPane(TemplateCellElement cellElement) { |
||||
DSColumnConditionsPane dSColumnConditionsPane = new DSColumnConditionsPane(); |
||||
dSColumnConditionsPane.populate(DesignTableDataManager.getEditingTableDataSource(), cellElement); |
||||
return dSColumnConditionsPane; |
||||
} |
||||
|
||||
@Override |
||||
protected void updateBasicPane(BasicPane bp, TemplateCellElement cellElement) { |
||||
protected void updateBasicPane(BasicPane bp, TemplateCellElement cellElement) { |
||||
((DSColumnConditionsPane) bp).update(cellElement); |
||||
} |
||||
} |
@ -1,38 +0,0 @@
|
||||
package com.fr.design.dscolumn; |
||||
|
||||
import com.fr.design.mainframe.cell.CellEditorPane; |
||||
import com.fr.report.cell.TemplateCellElement; |
||||
|
||||
|
||||
/** |
||||
* 单元格元素 数据列 基本设置内容面板 |
||||
* |
||||
* @author yaoh.wu |
||||
* @version 2017年7月25日 |
||||
* @since 9.0 |
||||
*/ |
||||
public class DSColumnAdvancedEditorPane extends CellEditorPane { |
||||
|
||||
|
||||
@Override |
||||
public String getIconPath() { |
||||
return "Advanced"; |
||||
} |
||||
|
||||
@Override |
||||
public String title4PopupWindow() { |
||||
return "Advanced"; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public void update() { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void populate(TemplateCellElement cellElement) { |
||||
|
||||
} |
||||
|
||||
} |
@ -1,84 +0,0 @@
|
||||
package com.fr.design.dscolumn; |
||||
|
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.design.mainframe.cell.CellEditorPane; |
||||
import com.fr.report.cell.TemplateCellElement; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* 单元格元素 数据列 高级设置内容面板 |
||||
* |
||||
* @author yaoh.wu |
||||
* @version 2017年7月25日 |
||||
* @since 9.0 |
||||
*/ |
||||
public class DSColumnBasicEditorPane extends CellEditorPane { |
||||
|
||||
//数据集和数据列
|
||||
private SelectedDataColumnPane dataPane; |
||||
//数据分组设置
|
||||
private ResultSetGroupDockingPane groupPane; |
||||
//当前编辑的单元格
|
||||
private TemplateCellElement cellElement; |
||||
//条件过滤按钮面板
|
||||
private JPanel conditionPane; |
||||
|
||||
public DSColumnBasicEditorPane(TemplateCellElement cellElement, SelectedDataColumnPane dataPane, ResultSetGroupDockingPane groupPane, JPanel conditionPane) { |
||||
this.setLayout(new BorderLayout()); |
||||
this.cellElement = cellElement; |
||||
this.dataPane = dataPane; |
||||
this.groupPane = groupPane; |
||||
this.conditionPane = conditionPane; |
||||
this.add(this.createContentPane(), BorderLayout.CENTER); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public String getIconPath() { |
||||
return "Basic"; |
||||
} |
||||
|
||||
@Override |
||||
public String title4PopupWindow() { |
||||
return "Basic"; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public void update() { |
||||
dataPane.update(this.cellElement); |
||||
groupPane.update(); |
||||
} |
||||
|
||||
@Override |
||||
public void populate(TemplateCellElement cellElement) { |
||||
this.cellElement = cellElement; |
||||
dataPane.populate(null, cellElement); |
||||
groupPane.populate(cellElement); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 创建有内容的面板显示信息 |
||||
* |
||||
* @return content JPanel |
||||
*/ |
||||
private JPanel createContentPane() { |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] columnSize = {f}; |
||||
double[] rowSize = {p, p, p}; |
||||
Component[][] components = new Component[][]{ |
||||
//数据集列选择
|
||||
new Component[]{this.dataPane}, |
||||
//数据分组设置
|
||||
new Component[]{this.groupPane}, |
||||
//条件过滤
|
||||
new Component[]{this.conditionPane} |
||||
}; |
||||
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
||||
} |
||||
} |
@ -1,45 +1,45 @@
|
||||
package com.fr.design.dscolumn; |
||||
|
||||
import java.awt.Dimension; |
||||
import java.awt.event.ItemEvent; |
||||
import java.awt.event.ItemListener; |
||||
import java.util.Iterator; |
||||
|
||||
import com.fr.data.TableDataSource; |
||||
import com.fr.design.data.datapane.TableDataComboBox; |
||||
import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; |
||||
import com.fr.main.impl.WorkBook; |
||||
import com.fr.report.cell.TemplateCellElement; |
||||
|
||||
import java.awt.*; |
||||
import java.awt.event.ItemEvent; |
||||
import java.awt.event.ItemListener; |
||||
import java.util.Iterator; |
||||
|
||||
public class SelectedConfirmedDataColumnPane extends SelectedDataColumnPane { |
||||
|
||||
public SelectedConfirmedDataColumnPane () { |
||||
super(false); |
||||
} |
||||
|
||||
protected void initTableNameComboBox() { |
||||
tableNameComboBox = new TableDataComboBox(new WorkBook()); |
||||
tableNameComboBox.addItemListener(new ItemListener() { |
||||
@Override |
||||
public void itemStateChanged(ItemEvent e) { |
||||
columnNameComboBox.setLoaded(false); |
||||
} |
||||
}); |
||||
tableNameComboBox.setPreferredSize(new Dimension(100, 20)); |
||||
} |
||||
|
||||
public void populate(TableDataSource source, TemplateCellElement cell) { |
||||
tableNameComboBox.refresh(source); |
||||
tableNameComboBox.setEditable(false); |
||||
tableNameComboBox.setEnabled(false); |
||||
super.populate(source, cell); |
||||
try { |
||||
Iterator it = source.getTableDataNameIterator(); |
||||
String name = (String)it.next(); |
||||
TemplateTableDataWrapper wrapper = new TemplateTableDataWrapper(source.getTableData(name), name); |
||||
tableNameComboBox.setSelectedItem(wrapper); |
||||
tableNameComboBox.getModel().setSelectedItem(wrapper); |
||||
} catch (Exception e) { |
||||
} |
||||
} |
||||
public SelectedConfirmedDataColumnPane() { |
||||
super(false); |
||||
} |
||||
|
||||
protected void initTableNameComboBox() { |
||||
tableNameComboBox = new TableDataComboBox(new WorkBook()); |
||||
tableNameComboBox.addItemListener(new ItemListener() { |
||||
@Override |
||||
public void itemStateChanged(ItemEvent e) { |
||||
columnNameComboBox.setLoaded(false); |
||||
} |
||||
}); |
||||
tableNameComboBox.setPreferredSize(new Dimension(100, 20)); |
||||
} |
||||
|
||||
public void populate(TableDataSource source, TemplateCellElement cell) { |
||||
tableNameComboBox.refresh(source); |
||||
tableNameComboBox.setEditable(false); |
||||
tableNameComboBox.setEnabled(false); |
||||
super.populate(source, cell); |
||||
try { |
||||
Iterator it = source.getTableDataNameIterator(); |
||||
String name = (String) it.next(); |
||||
TemplateTableDataWrapper wrapper = new TemplateTableDataWrapper(source.getTableData(name), name); |
||||
tableNameComboBox.setSelectedItem(wrapper); |
||||
tableNameComboBox.getModel().setSelectedItem(wrapper); |
||||
} catch (Exception e) { |
||||
} |
||||
} |
||||
} |
@ -1,376 +1,376 @@
|
||||
package com.fr.design.present; |
||||
|
||||
import com.fr.design.beans.FurtherBasicBeanPane; |
||||
import com.fr.design.border.UIRoundedBorder; |
||||
import com.fr.design.constants.UIConstants; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.icombobox.UIComboBox; |
||||
import com.fr.design.gui.icombobox.UIComboBoxRenderer; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.ispinner.UIBasicSpinner; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.design.utils.gui.GUICoreUtils; |
||||
import com.fr.general.Inter; |
||||
import com.fr.report.cell.cellattr.BarcodeAttr; |
||||
import com.fr.report.cell.cellattr.BarcodePresent; |
||||
import com.fr.report.cell.painter.barcode.BarcodeImpl; |
||||
import com.fr.report.cell.painter.barcode.core.BarCodeUtils; |
||||
import com.fr.stable.pinyin.ChineseHelper; |
||||
|
||||
import javax.swing.*; |
||||
import javax.swing.border.TitledBorder; |
||||
import javax.swing.event.ChangeEvent; |
||||
import javax.swing.event.ChangeListener; |
||||
import java.awt.*; |
||||
import java.awt.event.ItemEvent; |
||||
import java.awt.event.ItemListener; |
||||
import java.awt.font.FontRenderContext; |
||||
import java.awt.font.LineBreakMeasurer; |
||||
import java.awt.font.TextAttribute; |
||||
import java.awt.font.TextLayout; |
||||
import java.awt.geom.AffineTransform; |
||||
import java.text.AttributedCharacterIterator; |
||||
import java.text.AttributedString; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author zhou |
||||
* @since 2012-6-4下午6:49:59 |
||||
*/ |
||||
public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> { |
||||
private final int NUM16 = 16; |
||||
private BarCodePreviewPane barCodePreviewPane; |
||||
private UIComboBox typeComboBox; |
||||
private UIBasicSpinner barWidthSpinner; |
||||
private UIBasicSpinner barHeightSpinner; |
||||
private UIBasicSpinner RCodesizespinner; |
||||
private UICheckBox drawingTextCheckBox; |
||||
private UIComboBox RCodeVersionComboBox; |
||||
private UIComboBox RCodeErrorCorrectComboBox; |
||||
private UILabel typeSetLabel; |
||||
|
||||
private String testText = "12345"; |
||||
|
||||
public BarCodePane() { |
||||
this.initComponents(); |
||||
addlistener(); |
||||
} |
||||
|
||||
public static void main(String[] args) { |
||||
JFrame jf = new JFrame("test"); |
||||
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
||||
JPanel content = (JPanel) jf.getContentPane(); |
||||
content.setLayout(new BorderLayout()); |
||||
content.add(new BarCodePane(), BorderLayout.CENTER); |
||||
GUICoreUtils.centerWindow(jf); |
||||
jf.setSize(270, 400); |
||||
jf.setVisible(true); |
||||
} |
||||
|
||||
private void initComponents() { |
||||
barCodePreviewPane = new BarCodePreviewPane(); |
||||
this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(10.0, 1, 100, 1.0)); |
||||
this.barHeightSpinner = new UIBasicSpinner(new SpinnerNumberModel(30, 1, 100, 1)); |
||||
this.barWidthSpinner.setPreferredSize(new Dimension(60, 20)); |
||||
this.barHeightSpinner.setPreferredSize(new Dimension(60, 20)); |
||||
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), Inter.getLocText("StyleFormat-Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); |
||||
borderPane.setBorder(titledBorder); |
||||
borderPane.add(barCodePreviewPane, BorderLayout.CENTER); |
||||
setTypeComboBox(); |
||||
setSome(); |
||||
RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1)); |
||||
RCodeVersionComboBox = new UIComboBox(); |
||||
RCodeErrorCorrectComboBox = new UIComboBox(); |
||||
typeSetLabel = new UILabel(Inter.getLocText("Type_Set") + ":", UILabel.RIGHT); |
||||
initVersionComboBox(); |
||||
initErrorCorrectComboBox(); |
||||
|
||||
drawingTextCheckBox = new UICheckBox(Inter.getLocText("BarCodeD-Drawing_Text")); |
||||
drawingTextCheckBox.setSelected(true); |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] columnSize = {p, f}; |
||||
double[] rowSize = {p, p, p, p, p, p, p, p}; |
||||
barCodePreviewPane.setPreferredSize(new Dimension(0, 125)); |
||||
final JPanel centerPane = new JPanel(new CardLayout()); |
||||
|
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{typeSetLabel, typeComboBox}, |
||||
new Component[]{borderPane, null}, |
||||
new Component[]{centerPane, null} |
||||
}; |
||||
JPanel barCode = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
||||
centerPane.add(getNormalPane(), "normal"); |
||||
centerPane.add(getSpecialPane(), "special"); |
||||
typeComboBox.addItemListener(new ItemListener() { |
||||
public void itemStateChanged(ItemEvent e) { |
||||
CardLayout cardLayout = (CardLayout) centerPane.getLayout(); |
||||
cardLayout.show(centerPane, typeComboBox.getSelectedIndex() == NUM16 ? "special" : "normal"); |
||||
setTestText(BarCodeUtils.getTestTextByBarCode(typeComboBox.getSelectedIndex())); |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
this.setLayout(new BorderLayout()); |
||||
this.add(barCode, BorderLayout.CENTER); |
||||
} |
||||
|
||||
private void setTypeComboBox() { |
||||
typeComboBox = new UIComboBox(BarCodeUtils.getAllSupportedBarCodeTypeArray()); |
||||
typeComboBox.setRenderer(new UIComboBoxRenderer() { |
||||
@Override |
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
||||
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
||||
|
||||
if (value instanceof Integer) { |
||||
this.setText(" " + BarCodeUtils.getBarCodeTypeName(((Integer) value).intValue())); |
||||
} |
||||
return this; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
private void setSome() { |
||||
JFormattedTextField heightTextField = ((JSpinner.DefaultEditor) barHeightSpinner.getEditor()).getTextField(); |
||||
heightTextField.setColumns(2); |
||||
|
||||
JFormattedTextField widthTextField = ((JSpinner.DefaultEditor) barWidthSpinner.getEditor()).getTextField(); |
||||
widthTextField.setColumns(2); |
||||
} |
||||
|
||||
private JPanel getNormalPane() { |
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
double[] rowSize = {p, p, p, p, p, p, p, p}; |
||||
double[] columnSize1 = {p, f, f}; |
||||
JPanel barWidthContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); |
||||
barWidthContainer.add(barWidthSpinner); |
||||
JPanel barHeightContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); |
||||
barHeightContainer.add(barHeightSpinner); |
||||
UILabel uiLabel = new UILabel(Inter.getLocText("Tree-Width") + ":", UILabel.RIGHT); |
||||
uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); |
||||
Component[][] components_normal = new Component[][]{ |
||||
new Component[]{new UILabel("条形码大小", UILabel.LEFT), barWidthContainer, barHeightContainer}, |
||||
new Component[]{null, new UILabel(Inter.getLocText("Tree-Width"), UILabel.CENTER), new UILabel(Inter.getLocText("Height"), UILabel.CENTER)}, |
||||
new Component[]{drawingTextCheckBox, null, null} |
||||
}; |
||||
|
||||
|
||||
JPanel normalPane = TableLayoutHelper.createTableLayoutPane(components_normal, rowSize, columnSize1); |
||||
return normalPane; |
||||
} |
||||
|
||||
|
||||
private JPanel getSpecialPane() { |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] columnSize1 = {p, p}; |
||||
double[] rowSize = {p, p, p, p, p, p, p, p}; |
||||
UILabel uiLabel = new UILabel(Inter.getLocText("RCodeVersion") + ":", UILabel.RIGHT); |
||||
uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); |
||||
Component[][] components_special = new Component[][]{ |
||||
new Component[]{uiLabel, RCodeVersionComboBox}, |
||||
new Component[]{new UILabel(Inter.getLocText("RCodeErrorCorrect") + ":", UILabel.RIGHT), RCodeErrorCorrectComboBox}, |
||||
new Component[]{new UILabel(Inter.getLocText("RCodeDrawPix") + ":", UILabel.RIGHT), RCodesizespinner} |
||||
}; |
||||
|
||||
JPanel specialPane = TableLayoutHelper.createTableLayoutPane(components_special, rowSize, columnSize1); |
||||
return specialPane; |
||||
} |
||||
|
||||
private void addlistener() { |
||||
RCodesizespinner.addChangeListener(new ChangeListener() { |
||||
public void stateChanged(ChangeEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
RCodeVersionComboBox.addItemListener(new ItemListener() { |
||||
public void itemStateChanged(ItemEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
RCodeErrorCorrectComboBox.addItemListener(new ItemListener() { |
||||
public void itemStateChanged(ItemEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
this.barWidthSpinner.addChangeListener(new ChangeListener() { |
||||
public void stateChanged(ChangeEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
this.barHeightSpinner.addChangeListener(new ChangeListener() { |
||||
public void stateChanged(ChangeEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
drawingTextCheckBox.addChangeListener(new ChangeListener() { |
||||
public void stateChanged(ChangeEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
repaintPreviewBarCode(); |
||||
} |
||||
|
||||
@Override |
||||
/** |
||||
* |
||||
*/ |
||||
public String title4PopupWindow() { |
||||
return Inter.getLocText("Highlight-Barcode"); |
||||
} |
||||
|
||||
private void initVersionComboBox() { |
||||
String[] array = {Inter.getLocText(new String[]{"Auto", "Choose"}), "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"}; |
||||
initcombobox(this.RCodeVersionComboBox, array, 0); |
||||
} |
||||
|
||||
private void initErrorCorrectComboBox() { |
||||
String[] array = {"L" + Inter.getLocText("Level") + "7%", "M" + Inter.getLocText("Level") + "15%", "Q" + Inter.getLocText("Level") + "25%", "H" + Inter.getLocText("Level") + "30%"}; |
||||
initcombobox(this.RCodeErrorCorrectComboBox, array, 1); |
||||
} |
||||
|
||||
private void initcombobox(UIComboBox combobox, String[] array, int index) { |
||||
combobox.removeAllItems(); |
||||
for (int i = 0; i < array.length; i++) { |
||||
combobox.addItem(array[i]); |
||||
} |
||||
combobox.setSelectedIndex(index); |
||||
} |
||||
|
||||
private void repaintPreviewBarCode() { |
||||
try { |
||||
// carl:不支持中文转条形码
|
||||
if (ChineseHelper.containChinese(getTestText()) && this.typeComboBox.getSelectedIndex() != NUM16) { |
||||
throw new Exception("Illegal Character."); |
||||
} |
||||
this.barCodePreviewPane.setObject(BarCodeUtils.getBarcodeImpl(this.updateBean().getBarcode(), getTestText())); |
||||
} catch (Exception exp) { |
||||
this.barCodePreviewPane.setObject(Inter.getLocText("Error") + ": " + exp.getMessage()); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public void reset() { |
||||
populateBean(new BarcodePresent()); |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(BarcodePresent ob) { |
||||
BarcodeAttr barcodeAttr = ob.getBarcode(); |
||||
if (barcodeAttr == null) { |
||||
barcodeAttr = new BarcodeAttr(); |
||||
} |
||||
this.setTestText(BarCodeUtils.getTestTextByBarCode(barcodeAttr.getType())); |
||||
this.typeComboBox.setSelectedIndex(barcodeAttr.getType()); |
||||
this.barWidthSpinner.setValue(new Double(barcodeAttr.getBarWidth())); |
||||
this.barHeightSpinner.setValue(new Integer(barcodeAttr.getBarHeight())); |
||||
this.drawingTextCheckBox.setSelected(barcodeAttr.isDrawingText()); |
||||
this.RCodesizespinner.setValue(new Integer(barcodeAttr.getRcodeDrawPix())); |
||||
this.repaintPreviewBarCode(); |
||||
} |
||||
|
||||
@Override |
||||
public BarcodePresent updateBean() { |
||||
BarcodeAttr barcodeAttr = new BarcodeAttr(); |
||||
if ((typeComboBox.getSelectedIndex() == NUM16)) { |
||||
barcodeAttr.setRCodeVersion(this.RCodeVersionComboBox.getSelectedIndex()); |
||||
barcodeAttr.setRCodeErrorCorrect(this.RCodeErrorCorrectComboBox.getSelectedIndex()); |
||||
barcodeAttr.setRcodeDrawPix(((Integer) this.RCodesizespinner.getValue()).intValue()); |
||||
} |
||||
barcodeAttr.setType(this.typeComboBox.getSelectedIndex()); |
||||
barcodeAttr.setBarWidth(((Double) this.barWidthSpinner.getValue()).doubleValue() / 10); |
||||
barcodeAttr.setBarHeight(((Integer) this.barHeightSpinner.getValue()).intValue()); |
||||
barcodeAttr.setDrawingText(this.drawingTextCheckBox.isSelected()); |
||||
return new BarcodePresent(barcodeAttr); |
||||
} |
||||
|
||||
public void setTestText(String testText) { |
||||
this.testText = testText; |
||||
} |
||||
|
||||
public String getTestText() { |
||||
return testText; |
||||
} |
||||
|
||||
private static class BarCodePreviewPane extends JPanel { |
||||
private Object obj; |
||||
|
||||
public BarCodePreviewPane() { |
||||
// setBackground(Color.WHITE);
|
||||
} |
||||
|
||||
/** |
||||
* BarcodeImpl or Error String. |
||||
*/ |
||||
public void setObject(Object obj) { |
||||
this.obj = obj; |
||||
GUICoreUtils.repaint(this); |
||||
} |
||||
|
||||
@Override |
||||
public void paintComponent(Graphics g) { |
||||
super.paintComponent(g); |
||||
if (obj == null) { |
||||
return; |
||||
} |
||||
if (obj instanceof BarcodeImpl) { |
||||
BarcodeImpl barcodeImpl = (BarcodeImpl) obj; |
||||
Dimension size = this.getSize(); |
||||
barcodeImpl.draw((Graphics2D) g, (int) (size.getWidth() - barcodeImpl.getWidth()) / 2, (int) (size.getHeight() - barcodeImpl.getHeight()) / 2); |
||||
} else { |
||||
// 在中央画出字符.
|
||||
Graphics2D graphics2D = (Graphics2D) g; |
||||
graphics2D.setPaint(Color.RED); |
||||
Map map = new HashMap(); |
||||
map.put(TextAttribute.SIZE, new Float(14.0)); |
||||
AttributedString vanGogh = new AttributedString(obj.toString(), map); |
||||
AttributedCharacterIterator paragraph = vanGogh.getIterator(); |
||||
int paragraphStart = paragraph.getBeginIndex(); |
||||
int paragraphEnd = paragraph.getEndIndex(); |
||||
// Create a new LineBreakMeasurer from the paragraph.
|
||||
AffineTransform tx = null; |
||||
LineBreakMeasurer lineMeasurer = new LineBreakMeasurer(paragraph, new FontRenderContext(tx, false, false)); |
||||
// Set formatting width to width of Component.
|
||||
Dimension size = getSize(); |
||||
float formatWidth = size.width; |
||||
float drawPosY = 0; |
||||
lineMeasurer.setPosition(paragraphStart); |
||||
// Get lines from lineMeasurer until the entire
|
||||
// paragraph has been displayed.
|
||||
while (lineMeasurer.getPosition() < paragraphEnd) { |
||||
// Retrieve next layout.
|
||||
TextLayout layout = lineMeasurer.nextLayout(formatWidth); |
||||
// Move y-coordinate by the ascent of the layout.
|
||||
drawPosY += layout.getAscent(); |
||||
// Compute pen x position. If the paragraph is
|
||||
// right-to-left, we want to align the TextLayouts
|
||||
// to the right edge of the panel.
|
||||
float drawPosX; |
||||
if (layout.isLeftToRight()) { |
||||
drawPosX = 0; |
||||
} else { |
||||
drawPosX = formatWidth - layout.getAdvance(); |
||||
} |
||||
// Draw the TextLayout at (drawPosX, drawPosY).
|
||||
layout.draw(graphics2D, drawPosX, drawPosY); |
||||
// Move y-coordinate in preparation for next layout.
|
||||
drawPosY += layout.getDescent() + layout.getLeading(); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
/** |
||||
* |
||||
*/ |
||||
public boolean accept(Object ob) { |
||||
return ob instanceof BarcodePresent; |
||||
} |
||||
package com.fr.design.present; |
||||
|
||||
import com.fr.design.beans.FurtherBasicBeanPane; |
||||
import com.fr.design.border.UIRoundedBorder; |
||||
import com.fr.design.constants.UIConstants; |
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.icombobox.UIComboBox; |
||||
import com.fr.design.gui.icombobox.UIComboBoxRenderer; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.ispinner.UIBasicSpinner; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.design.utils.gui.GUICoreUtils; |
||||
import com.fr.general.Inter; |
||||
import com.fr.report.cell.cellattr.BarcodeAttr; |
||||
import com.fr.report.cell.cellattr.BarcodePresent; |
||||
import com.fr.report.cell.painter.barcode.BarcodeImpl; |
||||
import com.fr.report.cell.painter.barcode.core.BarCodeUtils; |
||||
import com.fr.stable.pinyin.ChineseHelper; |
||||
|
||||
import javax.swing.*; |
||||
import javax.swing.border.TitledBorder; |
||||
import javax.swing.event.ChangeEvent; |
||||
import javax.swing.event.ChangeListener; |
||||
import java.awt.*; |
||||
import java.awt.event.ItemEvent; |
||||
import java.awt.event.ItemListener; |
||||
import java.awt.font.FontRenderContext; |
||||
import java.awt.font.LineBreakMeasurer; |
||||
import java.awt.font.TextAttribute; |
||||
import java.awt.font.TextLayout; |
||||
import java.awt.geom.AffineTransform; |
||||
import java.text.AttributedCharacterIterator; |
||||
import java.text.AttributedString; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author zhou |
||||
* @since 2012-6-4下午6:49:59 |
||||
*/ |
||||
public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> { |
||||
private final int NUM16 = 16; |
||||
private BarCodePreviewPane barCodePreviewPane; |
||||
private UIComboBox typeComboBox; |
||||
private UIBasicSpinner barWidthSpinner; |
||||
private UIBasicSpinner barHeightSpinner; |
||||
private UIBasicSpinner RCodesizespinner; |
||||
private UICheckBox drawingTextCheckBox; |
||||
private UIComboBox RCodeVersionComboBox; |
||||
private UIComboBox RCodeErrorCorrectComboBox; |
||||
private UILabel typeSetLabel; |
||||
|
||||
private String testText = "12345"; |
||||
|
||||
public BarCodePane() { |
||||
this.initComponents(); |
||||
addlistener(); |
||||
} |
||||
|
||||
public static void main(String[] args) { |
||||
JFrame jf = new JFrame("test"); |
||||
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
||||
JPanel content = (JPanel) jf.getContentPane(); |
||||
content.setLayout(new BorderLayout()); |
||||
content.add(new BarCodePane(), BorderLayout.CENTER); |
||||
GUICoreUtils.centerWindow(jf); |
||||
jf.setSize(270, 400); |
||||
jf.setVisible(true); |
||||
} |
||||
|
||||
private void initComponents() { |
||||
barCodePreviewPane = new BarCodePreviewPane(); |
||||
this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(10.0, 1, 100, 1.0)); |
||||
this.barHeightSpinner = new UIBasicSpinner(new SpinnerNumberModel(30, 1, 100, 1)); |
||||
this.barWidthSpinner.setPreferredSize(new Dimension(60, 20)); |
||||
this.barHeightSpinner.setPreferredSize(new Dimension(60, 20)); |
||||
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), Inter.getLocText("StyleFormat-Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); |
||||
borderPane.setBorder(titledBorder); |
||||
borderPane.add(barCodePreviewPane, BorderLayout.CENTER); |
||||
setTypeComboBox(); |
||||
setSome(); |
||||
RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1)); |
||||
RCodeVersionComboBox = new UIComboBox(); |
||||
RCodeErrorCorrectComboBox = new UIComboBox(); |
||||
typeSetLabel = new UILabel(Inter.getLocText("Type_Set"), UILabel.RIGHT); |
||||
initVersionComboBox(); |
||||
initErrorCorrectComboBox(); |
||||
|
||||
drawingTextCheckBox = new UICheckBox(Inter.getLocText("BarCodeD-Drawing_Text")); |
||||
drawingTextCheckBox.setSelected(true); |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] columnSize = {p, f}; |
||||
double[] rowSize = {p, p, p, p, p, p, p, p}; |
||||
barCodePreviewPane.setPreferredSize(new Dimension(0, 125)); |
||||
final JPanel centerPane = new JPanel(new CardLayout()); |
||||
|
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{typeSetLabel, typeComboBox}, |
||||
new Component[]{borderPane, null}, |
||||
new Component[]{centerPane, null} |
||||
}; |
||||
JPanel barCode = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
||||
centerPane.add(getNormalPane(), "normal"); |
||||
centerPane.add(getSpecialPane(), "special"); |
||||
typeComboBox.addItemListener(new ItemListener() { |
||||
public void itemStateChanged(ItemEvent e) { |
||||
CardLayout cardLayout = (CardLayout) centerPane.getLayout(); |
||||
cardLayout.show(centerPane, typeComboBox.getSelectedIndex() == NUM16 ? "special" : "normal"); |
||||
setTestText(BarCodeUtils.getTestTextByBarCode(typeComboBox.getSelectedIndex())); |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
this.setLayout(new BorderLayout()); |
||||
this.add(barCode, BorderLayout.CENTER); |
||||
} |
||||
|
||||
private void setTypeComboBox() { |
||||
typeComboBox = new UIComboBox(BarCodeUtils.getAllSupportedBarCodeTypeArray()); |
||||
typeComboBox.setRenderer(new UIComboBoxRenderer() { |
||||
@Override |
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
||||
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
||||
|
||||
if (value instanceof Integer) { |
||||
this.setText(" " + BarCodeUtils.getBarCodeTypeName(((Integer) value).intValue())); |
||||
} |
||||
return this; |
||||
} |
||||
}); |
||||
} |
||||
|
||||
private void setSome() { |
||||
JFormattedTextField heightTextField = ((JSpinner.DefaultEditor) barHeightSpinner.getEditor()).getTextField(); |
||||
heightTextField.setColumns(2); |
||||
|
||||
JFormattedTextField widthTextField = ((JSpinner.DefaultEditor) barWidthSpinner.getEditor()).getTextField(); |
||||
widthTextField.setColumns(2); |
||||
} |
||||
|
||||
private JPanel getNormalPane() { |
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
double[] rowSize = {p, p, p, p, p, p, p, p}; |
||||
double[] columnSize1 = {p, f, f}; |
||||
JPanel barWidthContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); |
||||
barWidthContainer.add(barWidthSpinner); |
||||
JPanel barHeightContainer = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 0)); |
||||
barHeightContainer.add(barHeightSpinner); |
||||
UILabel uiLabel = new UILabel(Inter.getLocText("Tree-Width") + ":", UILabel.RIGHT); |
||||
uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); |
||||
Component[][] components_normal = new Component[][]{ |
||||
new Component[]{new UILabel("条形码大小", UILabel.LEFT), barWidthContainer, barHeightContainer}, |
||||
new Component[]{null, new UILabel(Inter.getLocText("Tree-Width"), UILabel.CENTER), new UILabel(Inter.getLocText("Height"), UILabel.CENTER)}, |
||||
new Component[]{drawingTextCheckBox, null, null} |
||||
}; |
||||
|
||||
|
||||
JPanel normalPane = TableLayoutHelper.createTableLayoutPane(components_normal, rowSize, columnSize1); |
||||
return normalPane; |
||||
} |
||||
|
||||
|
||||
private JPanel getSpecialPane() { |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] columnSize1 = {p, p}; |
||||
double[] rowSize = {p, p, p, p, p, p, p, p}; |
||||
UILabel uiLabel = new UILabel(Inter.getLocText("RCodeVersion") + ":", UILabel.RIGHT); |
||||
uiLabel.setPreferredSize(typeSetLabel.getPreferredSize()); |
||||
Component[][] components_special = new Component[][]{ |
||||
new Component[]{uiLabel, RCodeVersionComboBox}, |
||||
new Component[]{new UILabel(Inter.getLocText("RCodeErrorCorrect") + ":", UILabel.RIGHT), RCodeErrorCorrectComboBox}, |
||||
new Component[]{new UILabel(Inter.getLocText("RCodeDrawPix") + ":", UILabel.RIGHT), RCodesizespinner} |
||||
}; |
||||
|
||||
JPanel specialPane = TableLayoutHelper.createTableLayoutPane(components_special, rowSize, columnSize1); |
||||
return specialPane; |
||||
} |
||||
|
||||
private void addlistener() { |
||||
RCodesizespinner.addChangeListener(new ChangeListener() { |
||||
public void stateChanged(ChangeEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
RCodeVersionComboBox.addItemListener(new ItemListener() { |
||||
public void itemStateChanged(ItemEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
RCodeErrorCorrectComboBox.addItemListener(new ItemListener() { |
||||
public void itemStateChanged(ItemEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
this.barWidthSpinner.addChangeListener(new ChangeListener() { |
||||
public void stateChanged(ChangeEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
this.barHeightSpinner.addChangeListener(new ChangeListener() { |
||||
public void stateChanged(ChangeEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
drawingTextCheckBox.addChangeListener(new ChangeListener() { |
||||
public void stateChanged(ChangeEvent e) { |
||||
repaintPreviewBarCode(); |
||||
} |
||||
}); |
||||
repaintPreviewBarCode(); |
||||
} |
||||
|
||||
@Override |
||||
/** |
||||
* |
||||
*/ |
||||
public String title4PopupWindow() { |
||||
return Inter.getLocText("Highlight-Barcode"); |
||||
} |
||||
|
||||
private void initVersionComboBox() { |
||||
String[] array = {Inter.getLocText(new String[]{"Auto", "Choose"}), "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"}; |
||||
initcombobox(this.RCodeVersionComboBox, array, 0); |
||||
} |
||||
|
||||
private void initErrorCorrectComboBox() { |
||||
String[] array = {"L" + Inter.getLocText("Level") + "7%", "M" + Inter.getLocText("Level") + "15%", "Q" + Inter.getLocText("Level") + "25%", "H" + Inter.getLocText("Level") + "30%"}; |
||||
initcombobox(this.RCodeErrorCorrectComboBox, array, 1); |
||||
} |
||||
|
||||
private void initcombobox(UIComboBox combobox, String[] array, int index) { |
||||
combobox.removeAllItems(); |
||||
for (int i = 0; i < array.length; i++) { |
||||
combobox.addItem(array[i]); |
||||
} |
||||
combobox.setSelectedIndex(index); |
||||
} |
||||
|
||||
private void repaintPreviewBarCode() { |
||||
try { |
||||
// carl:不支持中文转条形码
|
||||
if (ChineseHelper.containChinese(getTestText()) && this.typeComboBox.getSelectedIndex() != NUM16) { |
||||
throw new Exception("Illegal Character."); |
||||
} |
||||
this.barCodePreviewPane.setObject(BarCodeUtils.getBarcodeImpl(this.updateBean().getBarcode(), getTestText())); |
||||
} catch (Exception exp) { |
||||
this.barCodePreviewPane.setObject(Inter.getLocText("Error") + ": " + exp.getMessage()); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public void reset() { |
||||
populateBean(new BarcodePresent()); |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(BarcodePresent ob) { |
||||
BarcodeAttr barcodeAttr = ob.getBarcode(); |
||||
if (barcodeAttr == null) { |
||||
barcodeAttr = new BarcodeAttr(); |
||||
} |
||||
this.setTestText(BarCodeUtils.getTestTextByBarCode(barcodeAttr.getType())); |
||||
this.typeComboBox.setSelectedIndex(barcodeAttr.getType()); |
||||
this.barWidthSpinner.setValue(new Double(barcodeAttr.getBarWidth())); |
||||
this.barHeightSpinner.setValue(new Integer(barcodeAttr.getBarHeight())); |
||||
this.drawingTextCheckBox.setSelected(barcodeAttr.isDrawingText()); |
||||
this.RCodesizespinner.setValue(new Integer(barcodeAttr.getRcodeDrawPix())); |
||||
this.repaintPreviewBarCode(); |
||||
} |
||||
|
||||
@Override |
||||
public BarcodePresent updateBean() { |
||||
BarcodeAttr barcodeAttr = new BarcodeAttr(); |
||||
if ((typeComboBox.getSelectedIndex() == NUM16)) { |
||||
barcodeAttr.setRCodeVersion(this.RCodeVersionComboBox.getSelectedIndex()); |
||||
barcodeAttr.setRCodeErrorCorrect(this.RCodeErrorCorrectComboBox.getSelectedIndex()); |
||||
barcodeAttr.setRcodeDrawPix(((Integer) this.RCodesizespinner.getValue()).intValue()); |
||||
} |
||||
barcodeAttr.setType(this.typeComboBox.getSelectedIndex()); |
||||
barcodeAttr.setBarWidth(((Double) this.barWidthSpinner.getValue()).doubleValue() / 10); |
||||
barcodeAttr.setBarHeight(((Integer) this.barHeightSpinner.getValue()).intValue()); |
||||
barcodeAttr.setDrawingText(this.drawingTextCheckBox.isSelected()); |
||||
return new BarcodePresent(barcodeAttr); |
||||
} |
||||
|
||||
public void setTestText(String testText) { |
||||
this.testText = testText; |
||||
} |
||||
|
||||
public String getTestText() { |
||||
return testText; |
||||
} |
||||
|
||||
private static class BarCodePreviewPane extends JPanel { |
||||
private Object obj; |
||||
|
||||
public BarCodePreviewPane() { |
||||
// setBackground(Color.WHITE);
|
||||
} |
||||
|
||||
/** |
||||
* BarcodeImpl or Error String. |
||||
*/ |
||||
public void setObject(Object obj) { |
||||
this.obj = obj; |
||||
GUICoreUtils.repaint(this); |
||||
} |
||||
|
||||
@Override |
||||
public void paintComponent(Graphics g) { |
||||
super.paintComponent(g); |
||||
if (obj == null) { |
||||
return; |
||||
} |
||||
if (obj instanceof BarcodeImpl) { |
||||
BarcodeImpl barcodeImpl = (BarcodeImpl) obj; |
||||
Dimension size = this.getSize(); |
||||
barcodeImpl.draw((Graphics2D) g, (int) (size.getWidth() - barcodeImpl.getWidth()) / 2, (int) (size.getHeight() - barcodeImpl.getHeight()) / 2); |
||||
} else { |
||||
// 在中央画出字符.
|
||||
Graphics2D graphics2D = (Graphics2D) g; |
||||
graphics2D.setPaint(Color.RED); |
||||
Map map = new HashMap(); |
||||
map.put(TextAttribute.SIZE, new Float(14.0)); |
||||
AttributedString vanGogh = new AttributedString(obj.toString(), map); |
||||
AttributedCharacterIterator paragraph = vanGogh.getIterator(); |
||||
int paragraphStart = paragraph.getBeginIndex(); |
||||
int paragraphEnd = paragraph.getEndIndex(); |
||||
// Create a new LineBreakMeasurer from the paragraph.
|
||||
AffineTransform tx = null; |
||||
LineBreakMeasurer lineMeasurer = new LineBreakMeasurer(paragraph, new FontRenderContext(tx, false, false)); |
||||
// Set formatting width to width of Component.
|
||||
Dimension size = getSize(); |
||||
float formatWidth = size.width; |
||||
float drawPosY = 0; |
||||
lineMeasurer.setPosition(paragraphStart); |
||||
// Get lines from lineMeasurer until the entire
|
||||
// paragraph has been displayed.
|
||||
while (lineMeasurer.getPosition() < paragraphEnd) { |
||||
// Retrieve next layout.
|
||||
TextLayout layout = lineMeasurer.nextLayout(formatWidth); |
||||
// Move y-coordinate by the ascent of the layout.
|
||||
drawPosY += layout.getAscent(); |
||||
// Compute pen x position. If the paragraph is
|
||||
// right-to-left, we want to align the TextLayouts
|
||||
// to the right edge of the panel.
|
||||
float drawPosX; |
||||
if (layout.isLeftToRight()) { |
||||
drawPosX = 0; |
||||
} else { |
||||
drawPosX = formatWidth - layout.getAdvance(); |
||||
} |
||||
// Draw the TextLayout at (drawPosX, drawPosY).
|
||||
layout.draw(graphics2D, drawPosX, drawPosY); |
||||
// Move y-coordinate in preparation for next layout.
|
||||
drawPosY += layout.getDescent() + layout.getLeading(); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
/** |
||||
* |
||||
*/ |
||||
public boolean accept(Object ob) { |
||||
return ob instanceof BarcodePresent; |
||||
} |
||||
} |
@ -1,231 +1,231 @@
|
||||
package com.fr.design.present; |
||||
|
||||
import com.fr.design.beans.FurtherBasicBeanPane; |
||||
import com.fr.design.border.UIRoundedBorder; |
||||
import com.fr.design.constants.UIConstants; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.ispinner.UIBasicSpinner; |
||||
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.design.utils.gui.GUICoreUtils; |
||||
import com.fr.general.Inter; |
||||
import com.fr.report.cell.cellattr.CurrencyLineAttr; |
||||
import com.fr.report.cell.cellattr.CurrencyLinePresent; |
||||
import com.fr.report.cell.painter.barcode.BarcodeException; |
||||
import com.fr.report.core.CurrencyLineImpl; |
||||
|
||||
import javax.swing.*; |
||||
import javax.swing.border.TitledBorder; |
||||
import javax.swing.event.ChangeEvent; |
||||
import javax.swing.event.ChangeListener; |
||||
import javax.swing.event.DocumentEvent; |
||||
import javax.swing.event.DocumentListener; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* @author zhou |
||||
* @since 2012-6-4下午7:34:52 |
||||
*/ |
||||
public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent> { |
||||
private static final int VS_NUM = 4; |
||||
private static final int VG_NUM = 6; |
||||
private UIBasicSpinner intPartSpinner; |
||||
private UIBasicSpinner deciPartSpinner; |
||||
private UITextField textField; |
||||
private CurrencyLinePreviewPane CurrencyLinePreviewPane; |
||||
private int intPart = 9; |
||||
private int deciPart = 3; |
||||
|
||||
private static final int POSITION = 8; |
||||
ChangeListener listener2 = new ChangeListener() { |
||||
|
||||
@Override |
||||
public void stateChanged(ChangeEvent e) { |
||||
CurrencyLinePreviewPane.setObject(textField.getText(), update()); |
||||
} |
||||
|
||||
}; |
||||
|
||||
DocumentListener listener = new DocumentListener() { |
||||
@Override |
||||
public void insertUpdate(DocumentEvent e) { |
||||
CurrencyLinePreviewPane.setObject(textField.getText(), update()); |
||||
} |
||||
|
||||
@Override |
||||
public void removeUpdate(DocumentEvent e) { |
||||
CurrencyLinePreviewPane.setObject(textField.getText(), update()); |
||||
} |
||||
|
||||
@Override |
||||
public void changedUpdate(DocumentEvent e) { |
||||
CurrencyLinePreviewPane.setObject(textField.getText(), update()); |
||||
} |
||||
}; |
||||
|
||||
public CurrencyLinePane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
protected void initComponents() { |
||||
// 整数位选择
|
||||
intPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(9, 1, 20, 1)); |
||||
intPartSpinner.setPreferredSize(new Dimension(135, 20)); |
||||
|
||||
// 小数位选择
|
||||
deciPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 10, 1)); |
||||
deciPartSpinner.setPreferredSize(new Dimension(135, 20)); |
||||
// 预览区域
|
||||
textField = new UITextField(10); |
||||
|
||||
CurrencyLinePreviewPane = new CurrencyLinePreviewPane(); |
||||
CurrencyLinePreviewPane.setPreferredSize(new Dimension(0, 145)); |
||||
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), Inter.getLocText("StyleFormat-Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); |
||||
borderPane.setBorder(titledBorder); |
||||
borderPane.add(CurrencyLinePreviewPane, BorderLayout.CENTER); |
||||
|
||||
textField.requestFocus(); |
||||
|
||||
double vs = VS_NUM; |
||||
double vg = VG_NUM; |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] columnSize = {p, f}; |
||||
double[] rowSize = {p, p, p, p}; |
||||
|
||||
|
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{new UILabel(Inter.getLocText("Data"), UILabel.LEFT), textField}, |
||||
new Component[]{borderPane, null}, |
||||
new Component[]{new UILabel(Inter.getLocText("IntPart"), UILabel.LEFT), groupPane(intPartSpinner)}, |
||||
new Component[]{new UILabel(Inter.getLocText("DeciPart"), UILabel.LEFT), groupPane(deciPartSpinner)} |
||||
|
||||
}; |
||||
|
||||
JPanel linePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
||||
this.setLayout(new BorderLayout()); |
||||
this.add(linePane, BorderLayout.CENTER); |
||||
|
||||
|
||||
textField.getDocument().addDocumentListener(listener); |
||||
intPartSpinner.addChangeListener(listener2); |
||||
deciPartSpinner.addChangeListener(listener2); |
||||
textField.setText("123456.78"); |
||||
} |
||||
|
||||
@Override |
||||
/** |
||||
* 窗口名 |
||||
* @return 同上 |
||||
*/ |
||||
public String title4PopupWindow() { |
||||
return Inter.getLocText("Currency_Line"); |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public CurrencyLineAttr update() { |
||||
CurrencyLineAttr currencylineAttr = new CurrencyLineAttr(); |
||||
currencylineAttr.setintPart(((Integer) this.intPartSpinner.getValue()).intValue()); |
||||
currencylineAttr.setdeciPart(((Integer) this.deciPartSpinner.getValue()).intValue()); |
||||
return currencylineAttr; |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public void setintPart(int intpart) { |
||||
this.intPart = intpart; |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public void setdeciPart(int decipart) { |
||||
this.deciPart = decipart; |
||||
} |
||||
|
||||
private class CurrencyLinePreviewPane extends JPanel { |
||||
private String text; |
||||
CurrencyLineAttr currencyLineAttr; |
||||
|
||||
public CurrencyLinePreviewPane() { |
||||
// setBackground(Color.WHITE);
|
||||
} |
||||
|
||||
public void setObject(String text, CurrencyLineAttr currencyLineAttr) { |
||||
this.text = text; |
||||
this.currencyLineAttr = currencyLineAttr; |
||||
GUICoreUtils.repaint(this); |
||||
} |
||||
|
||||
@Override |
||||
public void paintComponent(Graphics g) { |
||||
super.paintComponent(g); |
||||
if (text == null) { |
||||
return; |
||||
} |
||||
Dimension size = this.getSize(); |
||||
try { |
||||
CurrencyLineImpl currencyLineImpl = new CurrencyLineImpl(text, currencyLineAttr); |
||||
currencyLineImpl.draw((Graphics2D) g, (int) (size.getWidth()), (int) (size.getHeight())); |
||||
} catch (BarcodeException e) { |
||||
Color oldColor = g.getColor(); |
||||
g.setColor(Color.red); |
||||
g.drawString(e.getMessage(), (int) (size.getWidth() / POSITION), (int) (size.getHeight() / POSITION)); |
||||
g.setColor(oldColor); |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
protected static JPanel groupPane(JComponent comp) { |
||||
JPanel jp = new JPanel(); |
||||
jp.setBorder(null); |
||||
jp.setLayout(new FlowLayout(FlowLayout.LEFT)); |
||||
jp.add(comp); |
||||
return jp; |
||||
} |
||||
|
||||
@Override |
||||
/** |
||||
* 是否为该类型 |
||||
* @param ob 对象 |
||||
* @return 同上 |
||||
* |
||||
*/ |
||||
public boolean accept(Object ob) { |
||||
return ob instanceof CurrencyLinePresent; |
||||
} |
||||
|
||||
/** |
||||
* 重置 |
||||
*/ |
||||
public void reset() { |
||||
this.intPartSpinner.setValue(9); |
||||
this.deciPartSpinner.setValue(3); |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(CurrencyLinePresent ob) { |
||||
CurrencyLineAttr currencyLine = ob.getCurrencyLineAttr(); |
||||
if (currencyLine == null) { |
||||
currencyLine = new CurrencyLineAttr(); |
||||
} |
||||
this.intPartSpinner.setValue(new Integer(currencyLine.getintPart())); |
||||
this.deciPartSpinner.setValue(new Integer(currencyLine.getdeciPart())); |
||||
} |
||||
|
||||
@Override |
||||
public CurrencyLinePresent updateBean() { |
||||
CurrencyLineAttr currencylineAttr = new CurrencyLineAttr(); |
||||
currencylineAttr.setintPart(((Integer) this.intPartSpinner.getValue()).intValue()); |
||||
currencylineAttr.setdeciPart(((Integer) this.deciPartSpinner.getValue()).intValue()); |
||||
return new CurrencyLinePresent(currencylineAttr); |
||||
} |
||||
|
||||
package com.fr.design.present; |
||||
|
||||
import com.fr.design.beans.FurtherBasicBeanPane; |
||||
import com.fr.design.border.UIRoundedBorder; |
||||
import com.fr.design.constants.UIConstants; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.ispinner.UIBasicSpinner; |
||||
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.design.utils.gui.GUICoreUtils; |
||||
import com.fr.general.Inter; |
||||
import com.fr.report.cell.cellattr.CurrencyLineAttr; |
||||
import com.fr.report.cell.cellattr.CurrencyLinePresent; |
||||
import com.fr.report.cell.painter.barcode.BarcodeException; |
||||
import com.fr.report.core.CurrencyLineImpl; |
||||
|
||||
import javax.swing.*; |
||||
import javax.swing.border.TitledBorder; |
||||
import javax.swing.event.ChangeEvent; |
||||
import javax.swing.event.ChangeListener; |
||||
import javax.swing.event.DocumentEvent; |
||||
import javax.swing.event.DocumentListener; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* @author zhou |
||||
* @since 2012-6-4下午7:34:52 |
||||
*/ |
||||
public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent> { |
||||
private static final int VS_NUM = 4; |
||||
private static final int VG_NUM = 6; |
||||
private UIBasicSpinner intPartSpinner; |
||||
private UIBasicSpinner deciPartSpinner; |
||||
private UITextField textField; |
||||
private CurrencyLinePreviewPane CurrencyLinePreviewPane; |
||||
private int intPart = 9; |
||||
private int deciPart = 3; |
||||
|
||||
private static final int POSITION = 8; |
||||
ChangeListener listener2 = new ChangeListener() { |
||||
|
||||
@Override |
||||
public void stateChanged(ChangeEvent e) { |
||||
CurrencyLinePreviewPane.setObject(textField.getText(), update()); |
||||
} |
||||
|
||||
}; |
||||
|
||||
DocumentListener listener = new DocumentListener() { |
||||
@Override |
||||
public void insertUpdate(DocumentEvent e) { |
||||
CurrencyLinePreviewPane.setObject(textField.getText(), update()); |
||||
} |
||||
|
||||
@Override |
||||
public void removeUpdate(DocumentEvent e) { |
||||
CurrencyLinePreviewPane.setObject(textField.getText(), update()); |
||||
} |
||||
|
||||
@Override |
||||
public void changedUpdate(DocumentEvent e) { |
||||
CurrencyLinePreviewPane.setObject(textField.getText(), update()); |
||||
} |
||||
}; |
||||
|
||||
public CurrencyLinePane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
protected void initComponents() { |
||||
// 整数位选择
|
||||
intPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(9, 1, 20, 1)); |
||||
intPartSpinner.setPreferredSize(new Dimension(158, 20)); |
||||
|
||||
// 小数位选择
|
||||
deciPartSpinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 10, 1)); |
||||
deciPartSpinner.setPreferredSize(new Dimension(158, 20)); |
||||
// 预览区域
|
||||
textField = new UITextField(10); |
||||
|
||||
CurrencyLinePreviewPane = new CurrencyLinePreviewPane(); |
||||
CurrencyLinePreviewPane.setPreferredSize(new Dimension(0, 145)); |
||||
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), Inter.getLocText("StyleFormat-Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR); |
||||
borderPane.setBorder(titledBorder); |
||||
borderPane.add(CurrencyLinePreviewPane, BorderLayout.CENTER); |
||||
|
||||
textField.requestFocus(); |
||||
|
||||
double vs = VS_NUM; |
||||
double vg = VG_NUM; |
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double[] columnSize = {p, f}; |
||||
double[] rowSize = {p, p, p, p}; |
||||
|
||||
|
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{new UILabel(Inter.getLocText("Data"), UILabel.LEFT), textField}, |
||||
new Component[]{borderPane, null}, |
||||
new Component[]{new UILabel(Inter.getLocText("IntPart"), UILabel.LEFT), groupPane(intPartSpinner)}, |
||||
new Component[]{new UILabel(Inter.getLocText("DeciPart"), UILabel.LEFT), groupPane(deciPartSpinner)} |
||||
|
||||
}; |
||||
|
||||
JPanel linePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
||||
this.setLayout(new BorderLayout()); |
||||
this.add(linePane, BorderLayout.CENTER); |
||||
|
||||
|
||||
textField.getDocument().addDocumentListener(listener); |
||||
intPartSpinner.addChangeListener(listener2); |
||||
deciPartSpinner.addChangeListener(listener2); |
||||
textField.setText("123456.78"); |
||||
} |
||||
|
||||
@Override |
||||
/** |
||||
* 窗口名 |
||||
* @return 同上 |
||||
*/ |
||||
public String title4PopupWindow() { |
||||
return Inter.getLocText("Currency_Line"); |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public CurrencyLineAttr update() { |
||||
CurrencyLineAttr currencylineAttr = new CurrencyLineAttr(); |
||||
currencylineAttr.setintPart(((Integer) this.intPartSpinner.getValue()).intValue()); |
||||
currencylineAttr.setdeciPart(((Integer) this.deciPartSpinner.getValue()).intValue()); |
||||
return currencylineAttr; |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public void setintPart(int intpart) { |
||||
this.intPart = intpart; |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public void setdeciPart(int decipart) { |
||||
this.deciPart = decipart; |
||||
} |
||||
|
||||
private class CurrencyLinePreviewPane extends JPanel { |
||||
private String text; |
||||
CurrencyLineAttr currencyLineAttr; |
||||
|
||||
public CurrencyLinePreviewPane() { |
||||
// setBackground(Color.WHITE);
|
||||
} |
||||
|
||||
public void setObject(String text, CurrencyLineAttr currencyLineAttr) { |
||||
this.text = text; |
||||
this.currencyLineAttr = currencyLineAttr; |
||||
GUICoreUtils.repaint(this); |
||||
} |
||||
|
||||
@Override |
||||
public void paintComponent(Graphics g) { |
||||
super.paintComponent(g); |
||||
if (text == null) { |
||||
return; |
||||
} |
||||
Dimension size = this.getSize(); |
||||
try { |
||||
CurrencyLineImpl currencyLineImpl = new CurrencyLineImpl(text, currencyLineAttr); |
||||
currencyLineImpl.draw((Graphics2D) g, (int) (size.getWidth()), (int) (size.getHeight())); |
||||
} catch (BarcodeException e) { |
||||
Color oldColor = g.getColor(); |
||||
g.setColor(Color.red); |
||||
g.drawString(e.getMessage(), (int) (size.getWidth() / POSITION), (int) (size.getHeight() / POSITION)); |
||||
g.setColor(oldColor); |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
protected static JPanel groupPane(JComponent comp) { |
||||
JPanel jp = new JPanel(); |
||||
jp.setBorder(null); |
||||
jp.setLayout(new FlowLayout(FlowLayout.LEFT)); |
||||
jp.add(comp); |
||||
return jp; |
||||
} |
||||
|
||||
@Override |
||||
/** |
||||
* 是否为该类型 |
||||
* @param ob 对象 |
||||
* @return 同上 |
||||
* |
||||
*/ |
||||
public boolean accept(Object ob) { |
||||
return ob instanceof CurrencyLinePresent; |
||||
} |
||||
|
||||
/** |
||||
* 重置 |
||||
*/ |
||||
public void reset() { |
||||
this.intPartSpinner.setValue(9); |
||||
this.deciPartSpinner.setValue(3); |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(CurrencyLinePresent ob) { |
||||
CurrencyLineAttr currencyLine = ob.getCurrencyLineAttr(); |
||||
if (currencyLine == null) { |
||||
currencyLine = new CurrencyLineAttr(); |
||||
} |
||||
this.intPartSpinner.setValue(new Integer(currencyLine.getintPart())); |
||||
this.deciPartSpinner.setValue(new Integer(currencyLine.getdeciPart())); |
||||
} |
||||
|
||||
@Override |
||||
public CurrencyLinePresent updateBean() { |
||||
CurrencyLineAttr currencylineAttr = new CurrencyLineAttr(); |
||||
currencylineAttr.setintPart(((Integer) this.intPartSpinner.getValue()).intValue()); |
||||
currencylineAttr.setdeciPart(((Integer) this.deciPartSpinner.getValue()).intValue()); |
||||
return new CurrencyLinePresent(currencylineAttr); |
||||
} |
||||
|
||||
} |
@ -1,21 +0,0 @@
|
||||
package com.fr.design.widget; |
||||
|
||||
import com.fr.design.data.DataCreatorUI; |
||||
import com.fr.design.gui.frpane.TreeSettingPane; |
||||
import com.fr.design.present.dict.DictionaryPane; |
||||
import com.fr.form.ui.Widget; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
public interface DataModify<T> { |
||||
|
||||
void populateBean(T ob); |
||||
|
||||
T updateBean(); |
||||
|
||||
void checkValid() throws Exception; |
||||
|
||||
DataCreatorUI dataUI(); |
||||
|
||||
JComponent toSwingComponent(); |
||||
} |
@ -1,11 +0,0 @@
|
||||
package com.fr.design.widget; |
||||
|
||||
import com.fr.design.data.DataCreatorUI; |
||||
|
||||
/** |
||||
* Created by richie on 15/11/16. |
||||
*/ |
||||
public interface Operator { |
||||
|
||||
void did(DataCreatorUI ui, String cardName); |
||||
} |
@ -1,59 +1,63 @@
|
||||
package com.fr.design.widget.ui; |
||||
|
||||
|
||||
import java.awt.event.ActionEvent; |
||||
import com.fr.design.gui.ispinner.UIBasicSpinner; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.SpinnerNumberModel; |
||||
|
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.form.ui.ButtonGroup; |
||||
import com.fr.general.Inter; |
||||
|
||||
|
||||
public class ButtonGroupDictPane extends JPanel { |
||||
private UIBasicSpinner columnSpinner; |
||||
private UICheckBox adaptiveCheckbox; |
||||
private UILabel columnLabel; |
||||
|
||||
public ButtonGroupDictPane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public void initComponents() { |
||||
this.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); |
||||
adaptiveCheckbox = new UICheckBox(Inter.getLocText("Adaptive"), true); |
||||
adaptiveCheckbox.addActionListener(new ActionListener() { |
||||
public void actionPerformed(ActionEvent e) { |
||||
columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); |
||||
columnLabel.setVisible(!adaptiveCheckbox.isSelected()); |
||||
} |
||||
}); |
||||
this.add(adaptiveCheckbox); |
||||
|
||||
this.columnLabel = new UILabel(Inter.getLocText("Button-Group-Display-Columns") + ":"); |
||||
this.add(columnLabel); |
||||
columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1)); |
||||
this.add(columnSpinner); |
||||
} |
||||
|
||||
public void populate(ButtonGroup buttonGroup) { |
||||
adaptiveCheckbox.setSelected(buttonGroup.isAdaptive()); |
||||
columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); |
||||
columnLabel.setVisible(!adaptiveCheckbox.isSelected()); |
||||
columnSpinner.setValue(buttonGroup.getColumnsInRow()); |
||||
} |
||||
|
||||
public void update(ButtonGroup buttonGroup) { |
||||
buttonGroup.setAdaptive(adaptiveCheckbox.isSelected()); |
||||
buttonGroup.setColumnsInRow((Integer)(columnSpinner.getValue())); |
||||
} |
||||
|
||||
package com.fr.design.widget.ui; |
||||
|
||||
|
||||
import java.awt.*; |
||||
import java.awt.event.ActionEvent; |
||||
import com.fr.design.gui.ispinner.UIBasicSpinner; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.SpinnerNumberModel; |
||||
|
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.form.ui.ButtonGroup; |
||||
import com.fr.general.Inter; |
||||
|
||||
|
||||
public class ButtonGroupDictPane extends JPanel { |
||||
private UIBasicSpinner columnSpinner; |
||||
private UICheckBox adaptiveCheckbox; |
||||
private UILabel columnLabel; |
||||
|
||||
public ButtonGroupDictPane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public void initComponents() { |
||||
this.setLayout(new FlowLayout(0)); |
||||
JPanel pane = new JPanel(new FlowLayout()); |
||||
adaptiveCheckbox = new UICheckBox(Inter.getLocText("Adaptive"), true); |
||||
adaptiveCheckbox.addActionListener(new ActionListener() { |
||||
public void actionPerformed(ActionEvent e) { |
||||
columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); |
||||
columnLabel.setVisible(!adaptiveCheckbox.isSelected()); |
||||
} |
||||
}); |
||||
|
||||
this.columnLabel = new UILabel(Inter.getLocText("Button-Group-Display-Columns")); |
||||
columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1)); |
||||
pane.add(adaptiveCheckbox); |
||||
pane.add(columnLabel); |
||||
pane.add(columnSpinner); |
||||
|
||||
this.add(pane); |
||||
} |
||||
|
||||
public void populate(ButtonGroup buttonGroup) { |
||||
adaptiveCheckbox.setSelected(buttonGroup.isAdaptive()); |
||||
columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); |
||||
columnLabel.setVisible(!adaptiveCheckbox.isSelected()); |
||||
columnSpinner.setValue(buttonGroup.getColumnsInRow()); |
||||
} |
||||
|
||||
public void update(ButtonGroup buttonGroup) { |
||||
buttonGroup.setAdaptive(adaptiveCheckbox.isSelected()); |
||||
buttonGroup.setColumnsInRow((Integer)(columnSpinner.getValue())); |
||||
} |
||||
|
||||
} |
@ -1,48 +1,62 @@
|
||||
package com.fr.design.widget.ui; |
||||
|
||||
import com.fr.design.constants.LayoutConstants; |
||||
import com.fr.design.foldablepane.UIExpandablePane; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
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.form.ui.CheckBox; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
public class CheckBoxDefinePane extends AbstractDataModify<CheckBox> { |
||||
private UITextField text; |
||||
|
||||
public CheckBoxDefinePane() { |
||||
this.iniComoponents(); |
||||
} |
||||
|
||||
private void iniComoponents() { |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
this.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); |
||||
JPanel textPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
||||
textPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); |
||||
UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, textPane); |
||||
textPane.add(new UILabel(Inter.getLocText("Text") + ":")); |
||||
text = new UITextField(8); |
||||
textPane.add(text); |
||||
this.add(uiExpandablePane); |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "CheckBox"; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(CheckBox check) { |
||||
text.setText(check.getText()); |
||||
} |
||||
|
||||
@Override |
||||
public CheckBox updateBean() { |
||||
CheckBox box = new CheckBox(); |
||||
box.setText(text.getText()); |
||||
return box; |
||||
} |
||||
private UITextField text; |
||||
|
||||
public CheckBoxDefinePane() { |
||||
this.iniComoponents(); |
||||
} |
||||
|
||||
private void iniComoponents() { |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
text = new UITextField(8); |
||||
JPanel panel = new JPanel(new BorderLayout()); |
||||
panel.add(text, BorderLayout.CENTER); |
||||
panel.setBorder(BorderFactory.createEmptyBorder(0, 35, 0, 0)); |
||||
|
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Text")), panel}, |
||||
}; |
||||
double[] rowSize = {p}; |
||||
double[] columnSize = {p, f}; |
||||
int[][] rowCount = {{1, 1}}; |
||||
JPanel pane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); |
||||
|
||||
UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, pane); |
||||
pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 15)); |
||||
|
||||
this.add(uiExpandablePane); |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "CheckBox"; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(CheckBox check) { |
||||
text.setText(check.getText()); |
||||
} |
||||
|
||||
@Override |
||||
public CheckBox updateBean() { |
||||
CheckBox box = new CheckBox(); |
||||
box.setText(text.getText()); |
||||
return box; |
||||
} |
||||
} |
@ -1,92 +1,82 @@
|
||||
package com.fr.design.widget.ui; |
||||
|
||||
import java.awt.*; |
||||
|
||||
import com.fr.design.constants.LayoutConstants; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.icombobox.DictionaryComboBox; |
||||
import com.fr.design.gui.icombobox.DictionaryConstants; |
||||
import com.fr.design.gui.itextfield.UINumberField; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.form.ui.MultiFileEditor; |
||||
import com.fr.general.Inter; |
||||
|
||||
public class MultiFileEditorPane extends FieldEditorDefinePane<MultiFileEditor> { |
||||
private DictionaryComboBox acceptType; |
||||
private UICheckBox singleFileCheckBox; |
||||
private UINumberField fileSizeField; |
||||
|
||||
public MultiFileEditorPane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "file"; |
||||
} |
||||
|
||||
@Override |
||||
protected JPanel setFirstContentPane() { |
||||
acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); |
||||
acceptType.setPreferredSize(new Dimension(200, 18)); |
||||
singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")); |
||||
fileSizeField = new UINumberField(); |
||||
fileSizeField.setPreferredSize(new Dimension(80, 18)); |
||||
|
||||
|
||||
JPanel singleFilePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); |
||||
singleFilePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
||||
singleFilePane.add(singleFileCheckBox); |
||||
|
||||
JPanel allowTypePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); |
||||
allowTypePane.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); |
||||
allowTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
||||
allowTypePane.add(new UILabel(" " + Inter.getLocText("File-Allow_Upload_Files") + ":")); |
||||
allowTypePane.add(acceptType); |
||||
|
||||
JPanel fileSizePane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); |
||||
fileSizePane.add(new UILabel(" " + Inter.getLocText("File-File_Size_Limit") + ":")); |
||||
fileSizePane.add(fileSizeField); |
||||
fileSizePane.add(new UILabel(" KB")); |
||||
|
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{singleFileCheckBox, null }, |
||||
new Component[]{new UILabel(" " + Inter.getLocText("File-Allow_Upload_Files") + ":"), acceptType}, |
||||
new Component[]{new UILabel(" " + Inter.getLocText("File-File_Size_Limit") + ":"), fileSizeField}, |
||||
}; |
||||
double[] rowSize = {p, p,p}; |
||||
double[] columnSize = {p,f}; |
||||
int[][] rowCount = {{1, 1},{1, 1},{1, 1}}; |
||||
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, 5); |
||||
|
||||
|
||||
return panel; |
||||
} |
||||
|
||||
@Override |
||||
protected void populateSubFieldEditorBean(MultiFileEditor e) { |
||||
// 这里存在兼容问题 getAccept可能没在待选项目中
|
||||
acceptType.setSelectedItem(e.getAccept()); |
||||
singleFileCheckBox.setSelected(e.isSingleFile()); |
||||
fileSizeField.setValue(e.getMaxSize()); |
||||
} |
||||
|
||||
@Override |
||||
protected MultiFileEditor updateSubFieldEditorBean() { |
||||
MultiFileEditor ob = new MultiFileEditor(); |
||||
ob.setAccept((String) acceptType.getSelectedItem()); |
||||
ob.setSingleFile(singleFileCheckBox.isSelected()); |
||||
ob.setMaxSize(fileSizeField.getValue()); |
||||
return ob; |
||||
} |
||||
|
||||
package com.fr.design.widget.ui; |
||||
|
||||
import com.fr.design.gui.icheckbox.UICheckBox; |
||||
import com.fr.design.gui.icombobox.DictionaryComboBox; |
||||
import com.fr.design.gui.icombobox.DictionaryConstants; |
||||
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.form.ui.MultiFileEditor; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
public class MultiFileEditorPane extends FieldEditorDefinePane<MultiFileEditor> { |
||||
private DictionaryComboBox acceptType; |
||||
private UICheckBox singleFileCheckBox; |
||||
private UISpinner fileSizeField; |
||||
|
||||
public MultiFileEditorPane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "file"; |
||||
} |
||||
|
||||
@Override |
||||
protected JPanel setFirstContentPane() { |
||||
JPanel contenter = new JPanel(new BorderLayout()); |
||||
|
||||
singleFileCheckBox = new UICheckBox(Inter.getLocText("SINGLE_FILE_UPLOAD")); |
||||
acceptType = new DictionaryComboBox(DictionaryConstants.acceptTypes, DictionaryConstants.fileTypeDisplays); |
||||
// acceptType.setPreferredSize(new Dimension(100, 20));
|
||||
fileSizeField = new UISpinner(0, Integer.MAX_VALUE, 1, -1); |
||||
fileSizeField.setPreferredSize(new Dimension(140, 20)); |
||||
|
||||
JPanel fileSizePane = new JPanel(new BorderLayout()); |
||||
UILabel fileTypeLabel = new UILabel(Inter.getLocText("Utils-File_type")); |
||||
UILabel fileSizeLabel = new UILabel(Inter.getLocText("FR-Designer_Size_Limit")); |
||||
fileSizePane.add(fileSizeField, BorderLayout.CENTER); |
||||
fileSizePane.add(new UILabel(" KB"), BorderLayout.EAST); |
||||
|
||||
double f = TableLayout.FILL; |
||||
double p = TableLayout.PREFERRED; |
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{singleFileCheckBox, null}, |
||||
new Component[]{fileTypeLabel, acceptType}, |
||||
new Component[]{fileSizeLabel, fileSizePane}, |
||||
}; |
||||
double[] rowSize = {p, p, p}; |
||||
double[] columnSize = {p, f}; |
||||
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; |
||||
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 22, 10); |
||||
|
||||
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 00)); |
||||
contenter.add(panel, BorderLayout.CENTER); |
||||
|
||||
return contenter; |
||||
} |
||||
|
||||
@Override |
||||
protected void populateSubFieldEditorBean(MultiFileEditor e) { |
||||
// 这里存在兼容问题 getAccept可能没在待选项目中
|
||||
acceptType.setSelectedItem(e.getAccept()); |
||||
singleFileCheckBox.setSelected(e.isSingleFile()); |
||||
fileSizeField.setValue(e.getMaxSize()); |
||||
} |
||||
|
||||
@Override |
||||
protected MultiFileEditor updateSubFieldEditorBean() { |
||||
MultiFileEditor ob = new MultiFileEditor(); |
||||
ob.setAccept((String) acceptType.getSelectedItem()); |
||||
ob.setSingleFile(singleFileCheckBox.isSelected()); |
||||
ob.setMaxSize(fileSizeField.getValue()); |
||||
return ob; |
||||
} |
||||
|
||||
} |
@ -1,63 +1,63 @@
|
||||
package com.fr.design.widget.ui; |
||||
|
||||
import java.awt.FlowLayout; |
||||
|
||||
import javax.swing.JPanel; |
||||
|
||||
import com.fr.design.data.DataCreatorUI; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.present.dict.DictionaryPane; |
||||
import com.fr.form.ui.RadioGroup; |
||||
|
||||
public class RadioGroupDefinePane extends FieldEditorDefinePane<RadioGroup> { |
||||
private DictionaryPane dictPane; |
||||
|
||||
private ButtonGroupDictPane buttonGroupDictPane; |
||||
|
||||
public RadioGroupDefinePane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
@Override |
||||
protected void initComponents() { |
||||
super.initComponents(); |
||||
|
||||
dictPane = new DictionaryPane(); |
||||
} |
||||
|
||||
@Override |
||||
protected JPanel setFirstContentPane() { |
||||
|
||||
JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
||||
buttonGroupDictPane = new ButtonGroupDictPane(); |
||||
buttonGroupDictPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); |
||||
centerPane.add(buttonGroupDictPane); |
||||
return centerPane; |
||||
} |
||||
|
||||
@Override |
||||
protected RadioGroup updateSubFieldEditorBean() { |
||||
RadioGroup ob = new RadioGroup(); |
||||
|
||||
ob.setDictionary(this.dictPane.updateBean()); |
||||
this.buttonGroupDictPane.update(ob); |
||||
|
||||
return ob; |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "radiogroup"; |
||||
} |
||||
|
||||
@Override |
||||
protected void populateSubFieldEditorBean(RadioGroup ob) { |
||||
this.dictPane.populateBean(ob.getDictionary()); |
||||
this.buttonGroupDictPane.populate(ob); |
||||
} |
||||
|
||||
@Override |
||||
public DataCreatorUI dataUI() { |
||||
return dictPane; |
||||
} |
||||
package com.fr.design.widget.ui; |
||||
|
||||
import java.awt.FlowLayout; |
||||
|
||||
import javax.swing.JPanel; |
||||
|
||||
import com.fr.design.data.DataCreatorUI; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.present.dict.DictionaryPane; |
||||
import com.fr.form.ui.RadioGroup; |
||||
|
||||
public class RadioGroupDefinePane extends FieldEditorDefinePane<RadioGroup> { |
||||
private DictionaryPane dictPane; |
||||
|
||||
private ButtonGroupDictPane buttonGroupDictPane; |
||||
|
||||
public RadioGroupDefinePane() { |
||||
this.initComponents(); |
||||
} |
||||
|
||||
@Override |
||||
protected void initComponents() { |
||||
super.initComponents(); |
||||
|
||||
dictPane = new DictionaryPane(); |
||||
} |
||||
|
||||
@Override |
||||
protected JPanel setFirstContentPane() { |
||||
|
||||
JPanel centerPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); |
||||
buttonGroupDictPane = new ButtonGroupDictPane(); |
||||
buttonGroupDictPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
||||
centerPane.add(buttonGroupDictPane); |
||||
return centerPane; |
||||
} |
||||
|
||||
@Override |
||||
protected RadioGroup updateSubFieldEditorBean() { |
||||
RadioGroup ob = new RadioGroup(); |
||||
|
||||
ob.setDictionary(this.dictPane.updateBean()); |
||||
this.buttonGroupDictPane.update(ob); |
||||
|
||||
return ob; |
||||
} |
||||
|
||||
@Override |
||||
protected String title4PopupWindow() { |
||||
return "radiogroup"; |
||||
} |
||||
|
||||
@Override |
||||
protected void populateSubFieldEditorBean(RadioGroup ob) { |
||||
this.dictPane.populateBean(ob.getDictionary()); |
||||
this.buttonGroupDictPane.populate(ob); |
||||
} |
||||
|
||||
@Override |
||||
public DataCreatorUI dataUI() { |
||||
return dictPane; |
||||
} |
||||
} |
@ -0,0 +1,152 @@
|
||||
package com.fr.quickeditor.cellquick; |
||||
|
||||
import com.fr.base.Formula; |
||||
import com.fr.base.Style; |
||||
import com.fr.base.TextFormat; |
||||
import com.fr.design.gui.itextfield.UITextField; |
||||
import com.fr.grid.selection.CellSelection; |
||||
import com.fr.quickeditor.CellQuickEditor; |
||||
import com.fr.report.ReportHelper; |
||||
import com.fr.report.cell.DefaultTemplateCellElement; |
||||
import com.fr.stable.ColumnRow; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
import javax.swing.*; |
||||
import javax.swing.event.DocumentEvent; |
||||
import javax.swing.event.DocumentListener; |
||||
import java.awt.*; |
||||
import java.awt.event.KeyAdapter; |
||||
import java.awt.event.KeyEvent; |
||||
|
||||
/** |
||||
* 公式快速编辑面板,同文本数字编辑拆分 |
||||
* |
||||
* @author yaoh.wu |
||||
* @version 2017年8月7日10点44分 |
||||
* @since 9.0 |
||||
*/ |
||||
public class CellFormulaQuickEditor extends CellQuickEditor { |
||||
//文本域
|
||||
private UITextField stringTextField; |
||||
//编辑状态
|
||||
private boolean isEditing = false; |
||||
|
||||
//编辑的是公式,要保留公式里的这些属性,不然在公式和字符串转化时,就会丢失这些属性设置。
|
||||
private boolean reserveInResult = false; |
||||
private boolean reserveOnWriteOrAnaly = true; |
||||
|
||||
private DocumentListener documentListener = new DocumentListener() { |
||||
@Override |
||||
public void insertUpdate(DocumentEvent e) { |
||||
changeReportPaneCell(stringTextField.getText().trim()); |
||||
} |
||||
|
||||
@Override |
||||
public void removeUpdate(DocumentEvent e) { |
||||
changeReportPaneCell(stringTextField.getText().trim()); |
||||
} |
||||
|
||||
@Override |
||||
public void changedUpdate(DocumentEvent e) { |
||||
changeReportPaneCell(stringTextField.getText().trim()); |
||||
} |
||||
|
||||
}; |
||||
|
||||
private CellFormulaQuickEditor() { |
||||
super(); |
||||
} |
||||
|
||||
/** |
||||
* 详细信息面板 |
||||
*/ |
||||
@Override |
||||
public JComponent createCenterBody() { |
||||
JPanel content = new JPanel(new BorderLayout()); |
||||
content.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15)); |
||||
stringTextField = new UITextField(); |
||||
stringTextField.addKeyListener(new KeyAdapter() { |
||||
@Override |
||||
public void keyReleased(KeyEvent e) { |
||||
if (tc != null) { |
||||
tc.getGrid().dispatchEvent(e); |
||||
} |
||||
} |
||||
}); |
||||
content.add(stringTextField, BorderLayout.CENTER); |
||||
return content; |
||||
} |
||||
|
||||
|
||||
private void changeReportPaneCell(String tmpText) { |
||||
isEditing = true; |
||||
//refresh一下,如果单元格内有新添加的控件,此时并不知道
|
||||
CellSelection cs1 = (CellSelection) tc.getSelection(); |
||||
ColumnRow columnRow = ColumnRow.valueOf(cs1.getColumn(), cs1.getRow()); |
||||
columnRowTextField.setText(columnRow.toString()); |
||||
cellElement = tc.getEditingElementCase().getTemplateCellElement(cs1.getColumn(), cs1.getRow()); |
||||
|
||||
if (cellElement == null) { |
||||
CellSelection cs = (CellSelection) tc.getSelection(); |
||||
cellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow()); |
||||
tc.getEditingElementCase().addCellElement(cellElement, false); |
||||
} |
||||
if (tmpText != null && (tmpText.length() > 0 && tmpText.charAt(0) == '=')) { |
||||
Formula textFormula = new Formula(tmpText); |
||||
textFormula.setReserveInResult(reserveInResult); |
||||
textFormula.setReserveOnWriteOrAnaly(reserveOnWriteOrAnaly); |
||||
cellElement.setValue(textFormula); |
||||
} else { |
||||
Style style = cellElement.getStyle(); |
||||
if (style != null && style.getFormat() != null && style.getFormat() == TextFormat.getInstance()) { |
||||
cellElement.setValue(tmpText); |
||||
} else { |
||||
cellElement.setValue(ReportHelper.convertGeneralStringAccordingToExcel(tmpText)); |
||||
} |
||||
} |
||||
fireTargetModified(); |
||||
stringTextField.requestFocus(); |
||||
isEditing = false; |
||||
} |
||||
|
||||
/** |
||||
* 刷新详细内容 |
||||
*/ |
||||
@Override |
||||
protected void refreshDetails() { |
||||
String str; |
||||
if (cellElement == null) { |
||||
str = StringUtils.EMPTY; |
||||
} else { |
||||
Object value = cellElement.getValue(); |
||||
if (value == null) { |
||||
str = StringUtils.EMPTY; |
||||
} else if (value instanceof Formula) { |
||||
Formula formula = (Formula) value; |
||||
str = formula.getContent(); |
||||
reserveInResult = formula.isReserveInResult(); |
||||
reserveOnWriteOrAnaly = formula.isReserveOnWriteOrAnaly(); |
||||
} else { |
||||
str = value.toString(); |
||||
} |
||||
} |
||||
showText(str); |
||||
stringTextField.setEditable(tc.isSelectedOneCell()); |
||||
} |
||||
|
||||
/** |
||||
* 显示文本 |
||||
* |
||||
* @param str 文本 |
||||
*/ |
||||
public void showText(String str) { |
||||
// 正在编辑时不处理
|
||||
if (isEditing) { |
||||
return; |
||||
} |
||||
stringTextField.getDocument().removeDocumentListener(documentListener); |
||||
stringTextField.setText(str); |
||||
stringTextField.getDocument().addDocumentListener(documentListener); |
||||
} |
||||
|
||||
} |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 160 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 221 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 736 B |
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 421 B |
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 975 B After Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 541 B |
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 257 B |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 99 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 399 B |
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 511 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 728 B After Width: | Height: | Size: 650 B |
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 433 B |
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 831 B |
Before Width: | Height: | Size: 406 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 198 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 383 B |
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 284 B |