kerry 7 years ago
parent
commit
ec506f17d3
  1. 4
      designer_base/src/com/fr/design/border/UITitledBorder.java
  2. 6
      designer_base/src/com/fr/design/constants/UIConstants.java
  3. 6
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  4. 63
      designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  5. 3
      designer_base/src/com/fr/design/gui/itextfield/UITextFieldUI.java
  6. 5
      designer_base/src/com/fr/design/javascript/EmailPane.java
  7. 5
      designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java
  8. 3
      designer_base/src/com/fr/design/scrollruler/ModLineBorder.java
  9. 2
      designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java
  10. 4
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java

4
designer_base/src/com/fr/design/border/UITitledBorder.java

@ -1,5 +1,7 @@
package com.fr.design.border; package com.fr.design.border;
import com.fr.design.constants.UIConstants;
import java.awt.Color; import java.awt.Color;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -19,7 +21,7 @@ public class UITitledBorder extends TitledBorder {
} }
private void init(String title){ 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.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0), roundedborder));
this.setTitle(title); this.setTitle(title);

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

@ -88,8 +88,8 @@ public interface UIConstants {
public static final Color AUTHORITY_SHEET_UNSELECTED = new Color(146, 192, 225); public static final Color AUTHORITY_SHEET_UNSELECTED = new Color(146, 192, 225);
public static final Color ATTRIBUTE_PRESS = new Color(0x419BF9); public static final Color ATTRIBUTE_PRESS = new Color(0x419BF9);
public static final Color NORMAL_BLUE = new Color(0x419BF9); public static final Color NORMAL_BLUE = new Color(0x419BF9);
public static final Color ATTRIBUTE_NORMAL = new Color(0xDADADD); public static final Color ATTRIBUTE_NORMAL = Color.WHITE;
public static final Color ATTRIBUTE_HOVER = new Color(0xC9C9CD); public static final Color ATTRIBUTE_HOVER = new Color(0xF5F5F7);
public static final Color CHECKBOX_HOVER_SELECTED = new Color(0x3394f0); public static final Color CHECKBOX_HOVER_SELECTED = new Color(0x3394f0);
public static final Color TEXT_FILED_BORDER_SELECTED = new Color(0x3384f0); public static final Color TEXT_FILED_BORDER_SELECTED = new Color(0x3384f0);
public static final Color SHEET_NORMAL = new Color(0xc8c8ca); public static final Color SHEET_NORMAL = new Color(0xc8c8ca);
@ -100,6 +100,8 @@ public interface UIConstants {
public static final Color RULER_SCALE_COLOR = new Color(0x4e504f); public static final Color RULER_SCALE_COLOR = new Color(0x4e504f);
public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd); 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 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"); public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png");

6
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.controlpane; package com.fr.design.gui.controlpane;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolBarUI; import com.fr.design.gui.itoolbar.UIToolBarUI;
@ -276,7 +277,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
setUndecorated(true); setUndecorated(true);
pane.setBorder(BorderFactory.createEmptyBorder(20, 10, 10, 10)); pane.setBorder(BorderFactory.createEmptyBorder(20, 10, 10, 10));
this.editPane = pane; 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); setSize(WIDTH, HEIGHT);
// pack(); // pack();
this.setVisible(false); this.setVisible(false);

63
designer_base/src/com/fr/design/gui/itableeditorpane/UITableEditorPane.java

@ -31,37 +31,38 @@ public class UITableEditorPane<T> extends BasicPane {
private String leftLabelName; private String leftLabelName;
private JPanel buttonPane; private JPanel buttonPane;
public UITableEditorPane(UITableModelAdapter<T> model) { public UITableEditorPane(UITableModelAdapter<T> model) {
this.tableModel = model; this.tableModel = model;
this.initComponent(model.createAction()); this.initComponent(model.createAction());
} }
public UITableEditorPane(UITableModelAdapter<T> model, String s) { public UITableEditorPane(UITableModelAdapter<T> model, String s) {
leftLabelName = s; leftLabelName = s;
this.tableModel = model; this.tableModel = model;
this.initComponent(model.createAction()); this.initComponent(model.createAction());
} }
private void initComponent(UITableEditAction[] action) { private void initComponent(UITableEditAction[] action) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = new JPanel(new BorderLayout(4, 4)); JPanel pane = new JPanel(new BorderLayout(4, 4));
this.add(pane, BorderLayout.CENTER); this.add(pane, BorderLayout.CENTER);
UILabel l = new UILabel(leftLabelName); UILabel l = new UILabel(leftLabelName);
editTable = tableModel.createTable(); editTable = tableModel.createTable();
editTable.getTableHeader().setBackground(UIConstants.DEFAULT_BG_RULER);
UIScrollPane scrollPane = new UIScrollPane(editTable);
scrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); UIScrollPane scrollPane = new UIScrollPane(editTable);
pane.add(scrollPane, BorderLayout.CENTER); scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC));
initbuttonPane(action); pane.add(scrollPane, BorderLayout.CENTER);
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); initbuttonPane(action);
controlPane.add(buttonPane, BorderLayout.EAST); JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
controlPane.add(l, BorderLayout.WEST); controlPane.add(buttonPane, BorderLayout.EAST);
pane.add(controlPane, BorderLayout.NORTH); controlPane.add(l, BorderLayout.WEST);
pane.add(controlPane, BorderLayout.NORTH);
}
}
public UITableModelAdapter<T> getTableModel() {
public UITableModelAdapter<T> getTableModel(){
return tableModel; return tableModel;
} }

3
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.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
g2d.clip(roundShape); g2d.clip(roundShape);
g2d.setColor(backgroundColor); g2d.setColor(backgroundColor);
if(!textField.isEnabled()){
g2d.setColor(UIConstants.NORMAL_BACKGROUND);
}
g2d.fillRoundRect(1, 1, width - 2, height - 2, 0, 0); g2d.fillRoundRect(1, 1, width - 2, height - 2, 0, 0);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF);
} }

5
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.base.ConfigManager;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
@ -83,8 +84,8 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
tipsPane1.setText(valid ? StringUtils.BLANK : Inter.getLocText("FR-Designer_EmailPane-warnings")); tipsPane1.setText(valid ? StringUtils.BLANK : Inter.getLocText("FR-Designer_EmailPane-warnings"));
centerPane.setEnabled(valid); centerPane.setEnabled(valid);
mainTextEditor.setEnabled(valid); mainTextEditor.setEnabled(valid);
mainTextEditor.setBackground(valid ? Color.WHITE : new Color(244, 243, 233)); mainTextEditor.setBackground(valid ? Color.WHITE : UIConstants.DEFAULT_BG_RULER);
mainTextEditor.setBorder(BorderFactory.createLineBorder(valid ? new Color(128, 152, 186) : new Color(201, 198,184))); mainTextEditor.setBorder(BorderFactory.createLineBorder(valid ? new Color(128, 152, 186) : UIConstants.TITLED_BORDER_COLOR));
maitoEditor.setEnabled(valid); maitoEditor.setEnabled(valid);
ccEditor.setEnabled(valid); ccEditor.setEnabled(valid);
bccEditor.setEnabled(valid); bccEditor.setEnabled(valid);

5
designer_base/src/com/fr/design/javascript/JavaScriptImplPane.java

@ -73,16 +73,17 @@ public class JavaScriptImplPane extends FurtherBasicBeanPane<JavaScriptImpl> {
}; };
importedJsPane = new UITableEditorPane<String>(model); importedJsPane = new UITableEditorPane<String>(model);
importedJsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), Inter.getLocText("ReportServerP-Import_JavaScript"))); 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 = new JSContentPane(args);
jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), Inter.getLocText("FR-Designer_JavaScript"))); 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( JPanel topPane = GUICoreUtils.createBorderLayoutPane(
importedJsPane, BorderLayout.CENTER, importedJsPane, BorderLayout.CENTER,
parameterPane, BorderLayout.EAST parameterPane, BorderLayout.EAST
); );
topPane.setPreferredSize(new Dimension(300, 150)); topPane.setPreferredSize(new Dimension(300, 150));
topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 12, 0));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(topPane,BorderLayout.NORTH) ; this.add(topPane,BorderLayout.NORTH) ;

3
designer_base/src/com/fr/design/scrollruler/ModLineBorder.java

@ -7,6 +7,7 @@ import java.awt.Insets;
import javax.swing.border.AbstractBorder; import javax.swing.border.AbstractBorder;
import com.fr.design.constants.UIConstants;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
/** /**
@ -31,7 +32,7 @@ public class ModLineBorder extends AbstractBorder {
* @param modifiers modifiers * @param modifiers modifiers
*/ */
public ModLineBorder(int modifiers) { public ModLineBorder(int modifiers) {
this(modifiers, GUICoreUtils.getTitleLineBorderColor(), 1); this(modifiers, UIConstants.TITLED_BORDER_COLOR, 1);
} }
/** /**

2
designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java

@ -19,7 +19,7 @@ public class GUIPaintUtils {
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR); g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR);
} else { } else {
g2d.setColor(UIConstants.LINE_COLOR); g2d.setColor(UIConstants.TITLED_BORDER_COLOR);
} }
if (isRound) { if (isRound) {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

4
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.chart.web.ChartHyperRelateFloatLink;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.UIConstants;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.frpane.ReportletParameterViewPane;
@ -18,6 +19,7 @@ import com.fr.stable.ParameterProvider;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import java.awt.*; import java.awt.*;
import java.util.List; import java.util.List;
@ -57,7 +59,7 @@ public class ChartHyperRelateFloatLinkPane extends BasicBeanPane<ChartHyperRelat
pane.add(new UILabel(Inter.getLocText("M_Insert-Float") + ":")); pane.add(new UILabel(Inter.getLocText("M_Insert-Float") + ":"));
pane.add(floatNameBox); pane.add(floatNameBox);
Border boder = null; Border boder = new LineBorder(UIConstants.TITLED_BORDER_COLOR);
Font font = null; Font font = null;
TitledBorder border = new TitledBorder(boder, Inter.getLocText(new String[]{"Related", "M_Insert-Float"}), 4, 2, font, new Color(1, 159, 222)); TitledBorder border = new TitledBorder(boder, Inter.getLocText(new String[]{"Related", "M_Insert-Float"}), 4, 2, font, new Color(1, 159, 222));
// 圆角不行 // 圆角不行

Loading…
Cancel
Save