Browse Source

Merge pull request #540 in BA/design from ~ZHENG/design:master to master

* commit '5a97811f9e3222bc9702e7539e08e7a600104d16':
  pmd locale
  事件坐标轴 常规项要显示成自动
master
superman 8 years ago
parent
commit
d7f7df3d99
  1. 29
      designer_base/src/com/fr/design/gui/style/FormatPane.java

29
designer_base/src/com/fr/design/gui/style/FormatPane.java

@ -4,10 +4,10 @@ import com.fr.base.CoreDecimalFormat;
import com.fr.base.GraphHelper;
import com.fr.base.Style;
import com.fr.base.TextFormat;
import com.fr.design.constants.UIConstants;
import com.fr.data.core.FormatField;
import com.fr.data.core.FormatField.FormatContents;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -81,16 +81,7 @@ public class FormatPane extends AbstractBasicStylePane {
};
typeComboBox = new UIComboBox(types);
UIComboBoxRenderer render = new UIComboBoxRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof Integer) {
label.setText(" " + FormatField.getInstance().getName((Integer) value));
}
return label;
}
};
UIComboBoxRenderer render = createComBoxRender();
typeComboBox.setRenderer(render);
typeComboBox.addItemListener(itemListener);
contentPane.add(sampleLabel, BorderLayout.NORTH);
@ -114,11 +105,23 @@ public class FormatPane extends AbstractBasicStylePane {
}
protected UIComboBoxRenderer createComBoxRender(){
return new UIComboBoxRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof Integer) {
label.setText(" " + FormatField.getInstance().getName((Integer) value));
}
return label;
}
};
}
private void iniSampleLable() {
Border innterborder = new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 4);
Font tmpFont = null;
Border border = BorderFactory.createTitledBorder(innterborder, Inter.getLocText("StyleFormat-Sample"), TitledBorder.LEFT, 0, tmpFont, UIConstants.LINE_COLOR);
Border border = BorderFactory.createTitledBorder(innterborder, Inter.getLocText("FR-Base_StyleFormat_Sample"), TitledBorder.LEFT, 0, tmpFont, UIConstants.LINE_COLOR);
sampleLabel = new UILabel(FormatField.getInstance().getFormatValue()) {
@Override
@ -156,7 +159,7 @@ public class FormatPane extends AbstractBasicStylePane {
* @return 标题
*/
public String title4PopupWindow() {
return Inter.getLocText("Format");
return Inter.getLocText("FR-Base_Format");
}
/**

Loading…
Cancel
Save