Browse Source

REPORT-2897 9.0设计器修改

1.修改UIExpandablePane自适应宽度,已经根据视觉修改样式
2.单元格属性面板根据视觉新出的图调整
master
MoMeak 7 years ago
parent
commit
324618dee3
  1. 2
      designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java
  2. 7
      designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java
  3. 42
      designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  4. 4
      designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java
  5. 3
      designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java
  6. 1
      designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java
  7. 2
      designer/src/com/fr/design/mainframe/cell/settingpane/style/PredefinedStylePane.java
  8. 4
      designer/src/com/fr/design/present/PresentPane.java
  9. 1
      designer_base/src/com/fr/design/constants/UIConstants.java
  10. 33
      designer_base/src/com/fr/design/foldablepane/HeaderPane.java
  11. 54
      designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java
  12. 4
      designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java
  13. 15
      designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java
  14. 12
      designer_base/src/com/fr/design/gui/itextfield/UITextField.java
  15. 2
      designer_base/src/com/fr/design/gui/style/AlignmentPane.java
  16. 1
      designer_base/src/com/fr/design/gui/style/FormatPane.java

2
designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java

@ -89,7 +89,7 @@ public class CellElementEditPane extends BasicPane {
downTitle = new JPanel();
downTitle.setLayout(new BorderLayout());
downTitle.add(tabsHeaderIconPane, BorderLayout.NORTH);
center.setBorder(BorderFactory.createEmptyBorder(0, -10, 0, -10));
center.setBorder(BorderFactory.createEmptyBorder(0, -5, 0, 5));
downTitle.add(center, BorderLayout.CENTER);
this.add(downTitle, BorderLayout.CENTER);

7
designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.cell.settingpane;
import com.fr.base.BaseUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.expand.ExpandLeftFatherPane;
import com.fr.design.expand.ExpandUpFatherPane;
import com.fr.design.expand.SortExpandAttrPane;
@ -85,8 +86,8 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
layoutPane = new JPanel(new BorderLayout());
basicPane = new JPanel();
seniorPane = new JPanel();
basicPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 290, 24, basicPane());
seniorPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 290, 24, seniorPane());
basicPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 223, 24, basicPane());
seniorPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 223, 24, seniorPane());
layoutPane.add(basicPane, BorderLayout.NORTH);
layoutPane.add(seniorPane, BorderLayout.CENTER);
return layoutPane;
@ -122,6 +123,8 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
UILabel expendSort = new UILabel(Inter.getLocText("FR-Designer_ExpendSort"), SwingConstants.LEFT);
JPanel expendSortPane = new JPanel(new BorderLayout());
expendSortPane.add(expendSort, BorderLayout.NORTH);
horizontalExpandableCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
verticalExpandableCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{horizontalExpandableCheckBox, null},

42
designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.file.HistoryTemplateListPane;
@ -88,18 +89,18 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private JPanel basicPane() {
autoHeightCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Auto_Adjust_Height"));
autoWidthCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Auto_Adjust_Wdith"));
autoHeightCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
autoWidthCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p};
double[] rowSize = {p, p, p};
double[] columnSize = {p};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
Component[][] components = new Component[][]{
new Component[]{null},
new Component[]{autoHeightCheckBox},
new Component[]{null},
new Component[]{autoWidthCheckBox},
new Component[]{null},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_LARGE);
}
@ -146,22 +147,38 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private JPanel seniorUpPane() {
JPanel fileNamePane = createNormal();
previewCellContent.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
printAndExportContent.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
printAndExportBackground.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p, p, p, p, p};
double[] rowSize = {p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{previewCellContent, null},
new Component[]{printAndExportContent, null},
new Component[]{printAndExportBackground, null},
};
JPanel upPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_LARGE);
double[] downRowSize = {p, p, p, p, p, p};
double[] downColumnSize = {p, f};
int[][] downRowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
Component[][] downComponent = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Show_Content"), SwingConstants.LEFT), showContent},
new Component[]{null, fileNamePane},
new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_ToolTip"), SwingConstants.RIGHT), tooltipTextField},
new Component[]{null, null},
new Component[]{null, null},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM);
JPanel downPane = TableLayoutHelper.createGapTableLayoutPane(downComponent, downRowSize, downColumnSize, downRowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM);
JPanel pane = new JPanel(new BorderLayout());
pane.add(upPane, BorderLayout.NORTH);
pane.add(downPane, BorderLayout.CENTER);
return pane;
}
private JPanel pagePane() {
@ -175,6 +192,13 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
canBreakOnPaginateCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_CellPage_Can_Break_On_Paginate"));
repeatCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_CellPage_Repeat_Content_When_Paging"));
pageBeforeRowCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
pageAfterRowCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
pageBeforeColumnCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
pageAfterColumnCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
canBreakOnPaginateCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
repeatCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p};
double[] columnSize = {p};
@ -190,7 +214,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
new Component[]{canBreakOnPaginateCheckBox},
new Component[]{repeatCheckBox},
};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_LARGE);
}

4
designer/src/com/fr/design/mainframe/cell/settingpane/CellPresentPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fr.base.present.Present;
import com.fr.design.constants.UIConstants;
import com.fr.design.present.PresentPane;
import com.fr.general.Inter;
import com.fr.report.cell.DefaultTemplateCellElement;
@ -21,12 +22,14 @@ public class CellPresentPane extends AbstractCellAttrPane {
/**
* 初始化面板
*
* @return 面板
*/
public JPanel createContentPane() {
presentPane = new PresentPane();
JPanel content = new JPanel(new BorderLayout());
content.add(presentPane, BorderLayout.CENTER);
presentPane.setBorder(UIConstants.CELL_ATTR_PRESENTBORDER);
presentPane.addTabChangeListener(new ItemListener() {
@Override
@ -104,6 +107,7 @@ public class CellPresentPane extends AbstractCellAttrPane {
/**
* 对话框标题
*
* @return 标题
*/
public String title4PopupWindow() {

3
designer/src/com/fr/design/mainframe/cell/settingpane/CellStylePane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fr.base.Style;
import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.cell.settingpane.style.StylePane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
@ -25,6 +26,7 @@ public class CellStylePane extends AbstractCellAttrPane {
JPanel content = new JPanel(new BorderLayout());
stylePane = new StylePane();
content.add(stylePane, BorderLayout.CENTER);
stylePane.setBorder(UIConstants.CELL_ATTR_PRESENTBORDER);
stylePane.addPredefinedChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
attributeChanged();
@ -37,7 +39,6 @@ public class CellStylePane extends AbstractCellAttrPane {
adjustValues();// 里面的Tab切换后要及时调整滚动条,因为一些界面可能不需要滚动条
}
});
// content.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
return content;
}

1
designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java

@ -40,6 +40,7 @@ public class CustomStylePane extends MultiTabPane<Style> {
public CustomStylePane() {
super();
tabPane.setOneLineTab(true);
tabPane.setDrawLine(false);
tabPane.setLayout(new FiveButtonLayout(1));
}

2
designer/src/com/fr/design/mainframe/cell/settingpane/style/PredefinedStylePane.java

@ -65,7 +65,7 @@ public class PredefinedStylePane extends FurtherBasicBeanPane<NameStyle> impleme
styleList.setCellRenderer(render);
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(styleList, BorderLayout.CENTER);
this.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
this.setBorder(BorderFactory.createEmptyBorder(0 ,10, 0, 10));
styleList.addMouseListener(new MouseAdapter() {
@Override

4
designer/src/com/fr/design/present/PresentPane.java

@ -70,25 +70,21 @@ public class PresentPane extends UIComboBoxPane<Present> {
displays.add(none.title4PopupWindow());
dictPresentPane = new DictPresentPane();
dictPresentPane.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
paneList.add(dictPresentPane);
keys.add(DictPresent.class.getName());
displays.add(dictPresentPane.title4PopupWindow());
FurtherBasicBeanPane<BarcodePresent> bar = new BarCodePane();
bar.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
paneList.add(bar);
keys.add(BarcodePresent.class.getName());
displays.add(bar.title4PopupWindow());
FurtherBasicBeanPane<FormulaPresent> formula = new FormulaPresentPane();
formula.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
paneList.add(formula);
keys.add(FormulaPresent.class.getName());
displays.add(formula.title4PopupWindow());
FurtherBasicBeanPane<CurrencyLinePresent> currency = new CurrencyLinePane();
currency.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
paneList.add(currency);
keys.add(CurrencyLinePresent.class.getName());
displays.add(currency.title4PopupWindow());

1
designer_base/src/com/fr/design/constants/UIConstants.java

@ -21,6 +21,7 @@ public interface UIConstants {
public static final Icon BLACK_ICON = BaseUtils.readIcon("/com/fr/base/images/cell/blank.gif");
public static final Border CELL_ATTR_ZEROBORDER = BorderFactory.createEmptyBorder(0, 0, 0, 0);
public static final Border CELL_ATTR_EMPTYBORDER = BorderFactory.createEmptyBorder(0, 10, 0, 0);
public static final Border CELL_ATTR_PRESENTBORDER = BorderFactory.createEmptyBorder(0, 5, 0, 0);
public static final Border CELL_ATTR_NORMALBORDER = BorderFactory.createEmptyBorder(0, 10, 0, 15);

33
designer_base/src/com/fr/design/foldablepane/HeaderPane.java

@ -11,16 +11,16 @@ import java.awt.image.BufferedImage;
*/
public class HeaderPane extends JPanel {
private static final long serialVersionUID = 1L;
private static final int TITLE_X = 9;
private static final int LEFT_X = 221;
private static final int TITLE_X = 5;
private static final int LEFT_X = 16;
private static final int LEFT_Y = 6;
private int headWidth = 280;
private int headHeight = 25;
private int headWidth;
private int headHeight;
private Color bgColor;
private boolean isShow;
private String title;
private Image image;
private int fontSize = 13;
private int fontSize = 12;
public void setShow(boolean isShow) {
this.isShow = isShow;
@ -56,18 +56,20 @@ public class HeaderPane extends JPanel {
BufferedImage panelImage = new BufferedImage(getWidth(), headHeight, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = panelImage.createGraphics();
g2d.setColor(UIConstants.COMPONENT_BACKGROUND_COLOR);
headWidth = this.getWidth();
g2d.fillRect(0, 0, headWidth, headHeight);
// g2d.drawImage(UIConstants.DRAG_BAR, 0, 0, headWidth, headHeight, null);
g2d.setFont(new Font("SimSun", 0, fontSize));
g2d.setPaint(bgColor);
// g2d.drawString(this.title, fontSize/2, headHeight-fontSize/3);
g2d.drawString(this.title, TITLE_X, headHeight - fontSize / 2 - 1);
int leftWdith = headWidth - LEFT_X;
if (this.isShow) {
image = UIConstants.DRAG_DOWN_SELECTED_SMALL;
g2d.drawImage(image, LEFT_X, LEFT_Y, null);
g2d.drawImage(image, leftWdith, LEFT_Y, null);
} else {
image = UIConstants.DRAG_LEFT_NORMAL_SMALL;
g2d.drawImage(image, LEFT_X, LEFT_Y , null);
g2d.drawImage(image, leftWdith, LEFT_Y, null);
}
@ -90,21 +92,20 @@ public class HeaderPane extends JPanel {
}
public HeaderPane(Color bgColor, String title, int headWidth, int headHeight) {
public HeaderPane(Color bgColor, String title, int headHeight) {
this(bgColor);
this.title = title;
this.headHeight = headHeight;
this.headWidth = headWidth;
}
public static void main(String[] args) {
JFrame mainFrame = new JFrame("UI Demo - Gloomyfish");
mainFrame.getContentPane().setLayout(new BorderLayout());
mainFrame.getContentPane().add(new HeaderPane(Color.black, "基本", 280, 24), BorderLayout.CENTER);
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFrame.pack();
mainFrame.setSize(250, 400);
mainFrame.setVisible(true);
// JFrame mainFrame = new JFrame("UI Demo - Gloomyfish");
// mainFrame.getContentPane().setLayout(new BorderLayout());
// mainFrame.getContentPane().add(new HeaderPane(Color.black, "基本", 24), BorderLayout.CENTER);
// mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// mainFrame.pack();
// mainFrame.setSize(300, 400);
// mainFrame.setVisible(true);
}
}

54
designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java

@ -1,13 +1,10 @@
package com.fr.design.foldablepane;
import com.fr.design.constants.UIConstants;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.*;
/**
* Created by MoMeak on 2017/7/5.
@ -22,8 +19,7 @@ public class UIExpandablePane extends JPanel {
private int headHeight;
public UIExpandablePane(String title,int headWidth,int headHeight,JPanel contentPanel)
{
public UIExpandablePane(String title, int headWidth, int headHeight, JPanel contentPanel) {
super();
this.title = title;
this.headWidth = headWidth;
@ -32,29 +28,32 @@ public class UIExpandablePane extends JPanel {
initComponents();
}
public UIExpandablePane(String title, int headHeight, JPanel contentPanel) {
super();
this.title = title;
this.headHeight = headHeight;
this.contentPanel = contentPanel;
initComponents();
}
private void initComponents() {
this.setLayout(new BorderLayout());
headerPanel = new HeaderPane(color, title,headWidth,headHeight);
headerPanel = new HeaderPane(color, title, headHeight);
headerPanel.addMouseListener(new PanelAction());
contentPanel.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
contentPanel.setBorder(BorderFactory.createEmptyBorder(0 ,5, 0, 0));
this.add(headerPanel, BorderLayout.NORTH);
this.add(contentPanel, BorderLayout.CENTER);
setOpaque(false);
}
class PanelAction extends MouseAdapter
{
public void mousePressed(MouseEvent e)
{
class PanelAction extends MouseAdapter {
public void mousePressed(MouseEvent e) {
HeaderPane hp = (HeaderPane) e.getSource();
if(contentPanel.isShowing())
{
if (contentPanel.isShowing()) {
contentPanel.setVisible(false);
hp.setShow(false);
}
else
{
} else {
contentPanel.setVisible(true);
hp.setShow(true);
}
@ -64,34 +63,19 @@ public class UIExpandablePane extends JPanel {
}
public static void main(String[] args)
{
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());
//
// JPanel myPanel = new JPanel();
// myPanel.setLayout(new BorderLayout());
// JPanel Panel = new JPanel();
// Panel.setBackground(Color.blue);
// myPanel.add(new UIExpandablePane("基本",280,25,Panel),BorderLayout.CENTER);
//// myPanel.setLayout(new GridBagLayout());
//// myPanel.add(new JExpandablePanel());
//// GridBagConstraints gbc = new GridBagConstraints();
//// JPanel[] panels = new JPanel[4]; //
//// gbc.insets = new Insets(1,3,0,3);
//// gbc.weightx = 1.0;
//// gbc.fill = GridBagConstraints.HORIZONTAL;
//// gbc.gridwidth = GridBagConstraints.REMAINDER;
//// for(int j = 0; j < panels.length; j++)
//// {
//// panels[j] = new JExpandablePanel();
//// myPanel.add(panels[j], gbc);
//// }
// myPanel.add(new UIExpandablePane("基本", 223, 24, Panel), BorderLayout.CENTER);
// content.add(myPanel, BorderLayout.CENTER);
// GUICoreUtils.centerWindow(jf);
// jf.setSize(280, 400);
// jf.setSize(439, 400);
// jf.setVisible(true);
}

4
designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java

@ -2,7 +2,6 @@ package com.fr.design.gui.frpane;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icombobox.UIComboBox;
import javax.swing.*;
@ -12,7 +11,6 @@ import java.awt.event.ItemListener;
import java.util.List;
/**
*
* @author zhou
* @since 2012-5-31下午12:25:21
*/
@ -98,7 +96,6 @@ public abstract class UIComboBoxPane<T> extends BasicBeanPane<T> {
JPanel northPane = new JPanel(new BorderLayout());
northPane.add(jcb, BorderLayout.CENTER);
this.add(northPane, BorderLayout.NORTH);
northPane.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
this.add(cardPane, BorderLayout.CENTER);
}
@ -128,7 +125,6 @@ public abstract class UIComboBoxPane<T> extends BasicBeanPane<T> {
}
@Override
public T updateBean() {
return cards.get(jcb.getSelectedIndex()).updateBean();

15
designer_base/src/com/fr/design/gui/ibutton/UITabGroup.java

@ -10,6 +10,7 @@ import com.fr.design.constants.UIConstants;
public class UITabGroup extends UIButtonGroup<Integer> {
private boolean isOneLineTab = false;
private boolean isDrawLine = true;
private static final int BUTTON_NUMBER = 5;
private static final int SEVEN_NUMBER = 7;
private static final int ORIGINAL_WIDTH = 10;
@ -50,7 +51,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
Graphics2D g2d = (Graphics2D) g;
g2d.setColor(UIConstants.LINE_COLOR);
if (!isTwoLine()) {
int width = isDrawLine() ? ORIGINAL_WIDTH : 0;
int width = isDrawLine ? ORIGINAL_WIDTH : 0;
for (int i = 0; i < labelButtonList.size() - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight();
@ -58,7 +59,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
}
width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1;
if (isDrawLine()) {
if (isDrawLine) {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(ORIGINAL_WIDTH, 0, width - ORIGINAL_WIDTH, getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
@ -82,7 +83,7 @@ public class UITabGroup extends UIButtonGroup<Integer> {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
if (isDrawLine()) {
if (isDrawLine) {
g2d.drawLine(0, getHeight() / 2, getWidth(), getHeight() / 2);
}
}
@ -127,12 +128,16 @@ public class UITabGroup extends UIButtonGroup<Integer> {
}
protected boolean isDrawLine() {
return true;
return isDrawLine;
}
public void setDrawLine(boolean isDrawLine) {
this.isDrawLine = isDrawLine;
}
@Override
protected Border getGroupBorder() {
if (!isDrawLine()) {
if (!isDrawLine) {
return BorderFactory.createEmptyBorder(1, 1, 1, 1);
}
return BorderFactory.createEmptyBorder(1, GAP, 1, GAP);

12
designer_base/src/com/fr/design/gui/itextfield/UITextField.java

@ -61,13 +61,19 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
protected void initListener() {
if (shouldResponseChangeListener()) {
addFocusListener(new FocusListener() {
getDocument().addDocumentListener(new DocumentListener() {
@Override
public void focusGained(FocusEvent e) {
public void insertUpdate(DocumentEvent e) {
attributeChange();
}
@Override
public void removeUpdate(DocumentEvent e) {
attributeChange();
}
@Override
public void focusLost(FocusEvent e) {
public void changedUpdate(DocumentEvent e) {
attributeChange();
}
});

2
designer_base/src/com/fr/design/gui/style/AlignmentPane.java

@ -39,7 +39,7 @@ import java.util.Arrays;
*/
public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameObserver {
private static final int ANGEL = 90;
private static final Dimension SPINNER_DIMENSION = new Dimension(60, 20);
private static final Dimension SPINNER_DIMENSION = new Dimension(70, 20);
private static final String[] TEXT = {Inter.getLocText("FR-Designer_StyleAlignment_Wrap_Text"), Inter.getLocText("FR-Designer_StyleAlignment_Single_Line"),
Inter.getLocText("FR-Designer_StyleAlignment_Single_Line(Adjust_Font)"), Inter.getLocText("FR-Designer_StyleAlignment_Multi_Line(Adjust_Font)")};

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

@ -68,7 +68,6 @@ public class FormatPane extends AbstractBasicStylePane {
*/
public FormatPane() {
this.initComponents(TYPES);
this.setBorder(UIConstants.CELL_ATTR_NORMALBORDER);
}
protected void initComponents(Integer[] types) {

Loading…
Cancel
Save