diff --git a/designer_base/src/com/fr/design/border/UITitledBorder.java b/designer_base/src/com/fr/design/border/UITitledBorder.java index 6f8fcfea9d..48eebbd951 100644 --- a/designer_base/src/com/fr/design/border/UITitledBorder.java +++ b/designer_base/src/com/fr/design/border/UITitledBorder.java @@ -1,5 +1,7 @@ package com.fr.design.border; +import com.fr.design.constants.UIConstants; + import java.awt.Color; import javax.swing.BorderFactory; @@ -19,7 +21,7 @@ public class UITitledBorder extends TitledBorder { } private void init(String title){ - UIRoundedBorder roundedborder = new UIRoundedBorder(new Color(204, 204, 204), 1, 10); + UIRoundedBorder roundedborder = new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, 10); this.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0), roundedborder)); this.setTitle(title); diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index e283fce822..916e8e71bc 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -100,6 +100,8 @@ public interface UIConstants { public static final Color RULER_SCALE_COLOR = new Color(0x4e504f); public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd); public static final Color SPLIT_LINE = new Color(201, 198, 184); + public static final Color TITLED_BORDER_COLOR = new Color(0xededee); + public static final Color POP_DIALOG_BORDER = new Color(218, 218, 221); public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png"); diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index 34d7d08222..dd94f0d96d 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -1,5 +1,6 @@ package com.fr.design.gui.controlpane; +import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itoolbar.UIToolBarUI; @@ -276,7 +277,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH setUndecorated(true); pane.setBorder(BorderFactory.createEmptyBorder(20, 10, 10, 10)); this.editPane = pane; - this.getContentPane().add(editPane, BorderLayout.CENTER); + JPanel editPaneWrapper = new JPanel(new BorderLayout()); + editPaneWrapper.add(editPane, BorderLayout.CENTER); + editPaneWrapper.setBorder(BorderFactory.createLineBorder(UIConstants.POP_DIALOG_BORDER, 1)); + this.getContentPane().add(editPaneWrapper, BorderLayout.CENTER); setSize(WIDTH, HEIGHT); // pack(); this.setVisible(false); diff --git a/designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index c75f231d39..316879a423 100644 --- a/designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -31,37 +31,38 @@ public class UITableEditorPane extends BasicPane { private String leftLabelName; private JPanel buttonPane; - public UITableEditorPane(UITableModelAdapter model) { - this.tableModel = model; - this.initComponent(model.createAction()); - } - - public UITableEditorPane(UITableModelAdapter model, String s) { - leftLabelName = s; - this.tableModel = model; - this.initComponent(model.createAction()); - } - - private void initComponent(UITableEditAction[] action) { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel pane = new JPanel(new BorderLayout(4, 4)); - this.add(pane, BorderLayout.CENTER); - - UILabel l = new UILabel(leftLabelName); - editTable = tableModel.createTable(); - - UIScrollPane scrollPane = new UIScrollPane(editTable); - scrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); - pane.add(scrollPane, BorderLayout.CENTER); - initbuttonPane(action); - JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - controlPane.add(buttonPane, BorderLayout.EAST); - controlPane.add(l, BorderLayout.WEST); - pane.add(controlPane, BorderLayout.NORTH); - - } - - public UITableModelAdapter getTableModel() { + public UITableEditorPane(UITableModelAdapter model) { + this.tableModel = model; + this.initComponent(model.createAction()); + } + + public UITableEditorPane(UITableModelAdapter model, String s) { + leftLabelName = s; + this.tableModel = model; + this.initComponent(model.createAction()); + } + + private void initComponent(UITableEditAction[] action) { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + JPanel pane = new JPanel(new BorderLayout(4, 4)); + this.add(pane, BorderLayout.CENTER); + + UILabel l = new UILabel(leftLabelName); + editTable = tableModel.createTable(); + editTable.getTableHeader().setBackground(UIConstants.DEFAULT_BG_RULER); + + UIScrollPane scrollPane = new UIScrollPane(editTable); + scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC)); + pane.add(scrollPane, BorderLayout.CENTER); + initbuttonPane(action); + JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + controlPane.add(buttonPane, BorderLayout.EAST); + controlPane.add(l, BorderLayout.WEST); + pane.add(controlPane, BorderLayout.NORTH); + + } + + public UITableModelAdapter getTableModel(){ return tableModel; } diff --git a/designer_base/src/com/fr/design/gui/itextfield/UITextFieldUI.java b/designer_base/src/com/fr/design/gui/itextfield/UITextFieldUI.java index 5142c030ec..5f0eb3e476 100644 --- a/designer_base/src/com/fr/design/gui/itextfield/UITextFieldUI.java +++ b/designer_base/src/com/fr/design/gui/itextfield/UITextFieldUI.java @@ -51,9 +51,6 @@ public class UITextFieldUI extends BasicTextFieldUI { g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON); g2d.clip(roundShape); g2d.setColor(backgroundColor); - if(!textField.isEnabled()){ - g2d.setColor(UIConstants.NORMAL_BACKGROUND); - } g2d.fillRoundRect(1, 1, width - 2, height - 2, 0, 0); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF); } diff --git a/designer_base/src/com/fr/design/javascript/EmailPane.java b/designer_base/src/com/fr/design/javascript/EmailPane.java index 02719d995b..92ac38f52a 100644 --- a/designer_base/src/com/fr/design/javascript/EmailPane.java +++ b/designer_base/src/com/fr/design/javascript/EmailPane.java @@ -2,6 +2,7 @@ package com.fr.design.javascript; import com.fr.base.ConfigManager; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.constants.UIConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -83,8 +84,8 @@ public class EmailPane extends FurtherBasicBeanPane { tipsPane1.setText(valid ? StringUtils.BLANK : Inter.getLocText("FR-Designer_EmailPane-warnings")); centerPane.setEnabled(valid); mainTextEditor.setEnabled(valid); - mainTextEditor.setBackground(valid ? Color.WHITE : new Color(244, 243, 233)); - mainTextEditor.setBorder(BorderFactory.createLineBorder(valid ? new Color(128, 152, 186) : new Color(201, 198,184))); + mainTextEditor.setBackground(valid ? Color.WHITE : UIConstants.DEFAULT_BG_RULER); + mainTextEditor.setBorder(BorderFactory.createLineBorder(valid ? new Color(128, 152, 186) : UIConstants.TITLED_BORDER_COLOR)); maitoEditor.setEnabled(valid); ccEditor.setEnabled(valid); bccEditor.setEnabled(valid); diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java index bcd1767d33..f362170bea 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java @@ -73,16 +73,17 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane { }; importedJsPane = new UITableEditorPane(model); importedJsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), Inter.getLocText("ReportServerP-Import_JavaScript"))); - importedJsPane.setPreferredSize(new Dimension(400, 150)); + importedJsPane.setPreferredSize(new Dimension(265, 150)); jsPane = new JSContentPane(args); jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), Inter.getLocText("FR-Designer_JavaScript"))); - parameterPane.setPreferredSize(new Dimension(200, 150)); + parameterPane.setPreferredSize(new Dimension(265, 150)); JPanel topPane = GUICoreUtils.createBorderLayoutPane( importedJsPane, BorderLayout.CENTER, parameterPane, BorderLayout.EAST ); topPane.setPreferredSize(new Dimension(300, 150)); + topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 12, 0)); this.setLayout(new BorderLayout()); this.add(topPane,BorderLayout.NORTH) ; diff --git a/designer_base/src/com/fr/design/scrollruler/ModLineBorder.java b/designer_base/src/com/fr/design/scrollruler/ModLineBorder.java index 27cff154ca..7d472572e0 100644 --- a/designer_base/src/com/fr/design/scrollruler/ModLineBorder.java +++ b/designer_base/src/com/fr/design/scrollruler/ModLineBorder.java @@ -7,6 +7,7 @@ import java.awt.Insets; import javax.swing.border.AbstractBorder; +import com.fr.design.constants.UIConstants; import com.fr.design.utils.gui.GUICoreUtils; /** @@ -31,7 +32,7 @@ public class ModLineBorder extends AbstractBorder { * @param modifiers modifiers */ public ModLineBorder(int modifiers) { - this(modifiers, GUICoreUtils.getTitleLineBorderColor(), 1); + this(modifiers, UIConstants.TITLED_BORDER_COLOR, 1); } /** diff --git a/designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java b/designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java index 4c67686ac5..434f60d9c7 100644 --- a/designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java +++ b/designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java @@ -19,7 +19,7 @@ public class GUIPaintUtils { if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR); } else { - g2d.setColor(UIConstants.LINE_COLOR); + g2d.setColor(UIConstants.TITLED_BORDER_COLOR); } if (isRound) { g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java index ce14c0e481..a3f8ecca31 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java @@ -4,6 +4,7 @@ import com.fr.base.Utils; import com.fr.chart.web.ChartHyperRelateFloatLink; import com.fr.design.DesignModelAdapter; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.constants.UIConstants; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.gui.frpane.ReportletParameterViewPane; @@ -18,6 +19,7 @@ import com.fr.stable.ParameterProvider; import javax.swing.*; import javax.swing.border.Border; +import javax.swing.border.LineBorder; import javax.swing.border.TitledBorder; import java.awt.*; import java.util.List; @@ -57,7 +59,7 @@ public class ChartHyperRelateFloatLinkPane extends BasicBeanPane