Browse Source

Merge pull request #1032 in BA/design from ~HZZZ/design:design to 9.0

* commit '7c734e68b4b0100f9f6d7a066eb98571c54181b4': (27 commits)
  btn group border
  btn group
  image error
  scroll bar
  color
  format
  img
  img
  reset HEAD^1
  remove unused img
  toolbar menu dock background
  format
  grid column and row background
  right background
  10
  9
  format
  format “
  tab pane color
  tab pane font color
  ...
master
superman 8 years ago
parent
commit
9a98beb8fc
  1. 26
      designer/src/com/fr/design/actions/cell/style/StyleBackgroundAction.java
  2. 6
      designer/src/com/fr/design/cell/bar/DynamicScrollButton.java
  3. 2
      designer/src/com/fr/design/cell/bar/ScrollBarUIConstant.java
  4. 2
      designer/src/com/fr/design/condition/BackPane.java
  5. 2
      designer/src/com/fr/design/mainframe/SheetNameTabPane.java
  6. 2
      designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java
  7. 10
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  8. 2
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java
  9. 2
      designer/src/com/fr/design/mainframe/alphafine/preview/DocumentPreviewPane.java
  10. 6
      designer/src/com/fr/design/mainframe/alphafine/preview/PluginPreviewPane.java
  11. 2
      designer/src/com/fr/design/parameter/ParameterDefinitePane.java
  12. 2
      designer/src/com/fr/design/present/BarCodePane.java
  13. 2
      designer/src/com/fr/design/present/CurrencyLinePane.java
  14. 6
      designer/src/com/fr/design/webattr/ToolBarDragPane.java
  15. 6
      designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java
  16. 8
      designer/src/com/fr/grid/DrawFlowRect.java
  17. 2
      designer/src/com/fr/grid/Grid.java
  18. 5
      designer/src/com/fr/grid/GridColumnUI.java
  19. 19
      designer/src/com/fr/grid/GridHeader.java
  20. 2
      designer/src/com/fr/grid/GridRow.java
  21. 6
      designer/src/com/fr/grid/GridRowUI.java
  22. 2
      designer/src/com/fr/poly/PolyComponetsBar.java
  23. 2
      designer/src/com/fr/poly/PolyDesignUI.java
  24. 1
      designer/src/com/fr/poly/PolyDesigner.java
  25. 2
      designer/src/com/fr/poly/creator/BlockEditor.java
  26. 2
      designer/src/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java
  27. 14
      designer/src/com/fr/start/Designer.java
  28. 2
      designer_base/src/com/fr/design/actions/help/alphafine/RemindPane.java
  29. 24
      designer_base/src/com/fr/design/constants/UIConstants.java
  30. 2
      designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java
  31. 957
      designer_base/src/com/fr/design/file/MutilTempalteTabPane.java
  32. 162
      designer_base/src/com/fr/design/file/NewTemplatePane.java
  33. 4
      designer_base/src/com/fr/design/gui/UIDefaultTheme.java
  34. 2
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  35. 2
      designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java
  36. 4
      designer_base/src/com/fr/design/gui/date/UICalendarPanel.java
  37. 2
      designer_base/src/com/fr/design/gui/frpane/UITitlePanel.java
  38. 2
      designer_base/src/com/fr/design/gui/ibutton/UIBasicButtonUI.java
  39. 777
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java
  40. 300
      designer_base/src/com/fr/design/gui/ibutton/UIHeadGroup.java
  41. 2
      designer_base/src/com/fr/design/gui/ibutton/UITabButton.java
  42. 2
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  43. 2
      designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  44. 4
      designer_base/src/com/fr/design/gui/icontainer/UIScrollPane.java
  45. 3
      designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java
  46. 2
      designer_base/src/com/fr/design/gui/imenu/UIMenuHighLight.java
  47. 3
      designer_base/src/com/fr/design/gui/iscrollbar/UIScrollBarUI.java
  48. 7
      designer_base/src/com/fr/design/gui/iscrollbar/UIScrollButton.java
  49. 2
      designer_base/src/com/fr/design/gui/ispinner/UISpinner.java
  50. 2
      designer_base/src/com/fr/design/gui/itextarea/UITextAreaUI.java
  51. 2
      designer_base/src/com/fr/design/gui/itextfield/UITextFieldUI.java
  52. 2
      designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java
  53. 49
      designer_base/src/com/fr/design/gui/itoolbar/UIToolbar.java
  54. 8
      designer_base/src/com/fr/design/gui/itooltip/UIToolTipUI.java
  55. 22
      designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java
  56. 2
      designer_base/src/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java
  57. 4
      designer_base/src/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java
  58. 4
      designer_base/src/com/fr/design/gui/syntax/ui/rtextarea/FoldIndicator.java
  59. BIN
      designer_base/src/com/fr/design/images/buttonicon/add.png
  60. BIN
      designer_base/src/com/fr/design/images/buttonicon/addicon.png
  61. BIN
      designer_base/src/com/fr/design/images/buttonicon/additicon_grey.png
  62. BIN
      designer_base/src/com/fr/design/images/buttonicon/anab24.png
  63. BIN
      designer_base/src/com/fr/design/images/buttonicon/anas.png
  64. BIN
      designer_base/src/com/fr/design/images/buttonicon/arrow.png
  65. BIN
      designer_base/src/com/fr/design/images/buttonicon/arrowdown.png
  66. BIN
      designer_base/src/com/fr/design/images/buttonicon/arrowup.png
  67. BIN
      designer_base/src/com/fr/design/images/buttonicon/bind_ds_column.png
  68. BIN
      designer_base/src/com/fr/design/images/buttonicon/button_0.png
  69. BIN
      designer_base/src/com/fr/design/images/buttonicon/cell.png
  70. BIN
      designer_base/src/com/fr/design/images/buttonicon/cell_group.png
  71. BIN
      designer_base/src/com/fr/design/images/buttonicon/close_icon.png
  72. BIN
      designer_base/src/com/fr/design/images/buttonicon/column.png
  73. BIN
      designer_base/src/com/fr/design/images/buttonicon/config.png
  74. BIN
      designer_base/src/com/fr/design/images/buttonicon/cube.png
  75. BIN
      designer_base/src/com/fr/design/images/buttonicon/delete.png
  76. BIN
      designer_base/src/com/fr/design/images/buttonicon/ds_column.png
  77. BIN
      designer_base/src/com/fr/design/images/buttonicon/dscolumn.png
  78. BIN
      designer_base/src/com/fr/design/images/buttonicon/editn.png
  79. BIN
      designer_base/src/com/fr/design/images/buttonicon/editp.png
  80. BIN
      designer_base/src/com/fr/design/images/buttonicon/hiden.png
  81. BIN
      designer_base/src/com/fr/design/images/buttonicon/hidep.png
  82. BIN
      designer_base/src/com/fr/design/images/buttonicon/list_normal.png
  83. BIN
      designer_base/src/com/fr/design/images/buttonicon/minus.png
  84. BIN
      designer_base/src/com/fr/design/images/buttonicon/more.png
  85. BIN
      designer_base/src/com/fr/design/images/buttonicon/more2.png
  86. BIN
      designer_base/src/com/fr/design/images/buttonicon/more3.png
  87. BIN
      designer_base/src/com/fr/design/images/buttonicon/more4.png
  88. BIN
      designer_base/src/com/fr/design/images/buttonicon/mouseoverclose icon.png
  89. BIN
      designer_base/src/com/fr/design/images/buttonicon/newcpts.png
  90. BIN
      designer_base/src/com/fr/design/images/buttonicon/open.png
  91. BIN
      designer_base/src/com/fr/design/images/buttonicon/pageb24.png
  92. BIN
      designer_base/src/com/fr/design/images/buttonicon/pages.png
  93. BIN
      designer_base/src/com/fr/design/images/buttonicon/parameter.png
  94. BIN
      designer_base/src/com/fr/design/images/buttonicon/plus.png
  95. BIN
      designer_base/src/com/fr/design/images/buttonicon/pressclose icon.png
  96. BIN
      designer_base/src/com/fr/design/images/buttonicon/prevew_down_icon.png
  97. BIN
      designer_base/src/com/fr/design/images/buttonicon/prewidget.png
  98. BIN
      designer_base/src/com/fr/design/images/buttonicon/redo.png
  99. BIN
      designer_base/src/com/fr/design/images/buttonicon/refresh.png
  100. BIN
      designer_base/src/com/fr/design/images/buttonicon/save.png
  101. Some files were not shown because too many files have changed in this diff Show More

26
designer/src/com/fr/design/actions/cell/style/StyleBackgroundAction.java

@ -51,21 +51,21 @@ public class StyleBackgroundAction extends AbstractStyleAction implements Change
}
@Override
public boolean isFontStye() {
return false;
}
public boolean isFontStye() {
return false;
}
@Override
public JComponent createToolBarComponent() {
Object object = this.getValue(UIToolbarColorButton.class.getName());
if (object == null || !(object instanceof UIToolbarColorButton)) {
UIToolbarColorButton tbButton = new UIToolbarColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png"));
tbButton.set4Toolbar();
this.putValue(UIToolbarColorButton.class.getName(), tbButton);
@Override
public JComponent createToolBarComponent() {
Object object = this.getValue(UIToolbarColorButton.class.getName());
if (object == null || !(object instanceof UIToolbarColorButton)) {
UIToolbarColorButton tbButton = new UIToolbarColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png"));
tbButton.set4Toolbar();
this.putValue(UIToolbarColorButton.class.getName(), tbButton);
tbButton.setEnabled(this.isEnabled());
tbButton.setColor(Color.WHITE);
tbButton.addColorChangeListener(this);
tbButton.setEnabled(this.isEnabled());
tbButton.setColor(Color.WHITE);
tbButton.addColorChangeListener(this);
//peter:产生tooltip
tbButton.setToolTipText(ActionFactory.createButtonToolTipText(this));

6
designer/src/com/fr/design/cell/bar/DynamicScrollButton.java

@ -145,12 +145,6 @@ public class DynamicScrollButton extends BasicArrowButton {
//GradientPaint scrollBarHight = new GradientPaint(0, 0, new Color(1.0f, 1.0f, 1.0f, 0.5f), 0, 7, new Color(1.0f, 1.0f, 1.0f, 0.2f));
g2.setPaint(scrollBarBg);
g2.fillRoundRect(1, 1, 16, 16, 0, 0);
// g2.setPaint(scrollBarHight);
// g2.fillRoundRect(1, 1, 16, 7, 3, 3);
// g2.setColor(a);
// g2.drawRoundRect(1, 1, 15, 15, 3, 3);
// g2.setColor(new Color(240, 240, 240));
// g2.drawRoundRect(2, 2, 13, 13, 3, 3);
break;
}
// dispose of image graphics

2
designer/src/com/fr/design/cell/bar/ScrollBarUIConstant.java

@ -23,7 +23,7 @@ public class ScrollBarUIConstant {
public static final ColorUIResource SCROLL_ARROW_COLOR = new ColorUIResource(112, 112, 112);
public static final ColorUIResource PRESSED_LIGHT_COLOR = new ColorUIResource(205, 234, 252);
public static final ColorUIResource WHITE_BORDER_COLOR = new ColorUIResource(240, 240, 240);
public static final ColorUIResource WHITE_BORDER_COLOR = new ColorUIResource(212, 212, 216);
public static final ColorUIResource NORMAL_SCROLL_BUTTON_COLOR = new ColorUIResource(0xffffff);
public static final ColorUIResource PRESSED_SCROLL_BUTTON_COLOR = new ColorUIResource(0xd2d2d2);

2
designer/src/com/fr/design/condition/BackPane.java

@ -55,7 +55,7 @@ public class BackPane extends ConditionAttrSingleConditionPane<HighlightAction>
this.add(backgroundPreviewPane);
this.add(editBackgroundButton);
this.add(this.backScopeComboBox);
this.backgroundPreviewPane.setBackgroundObject(ColorBackground.getInstance(Color.white));
this.backgroundPreviewPane.setBackgroundObject(ColorBackground.getInstance(Color.WHITE));
}
@Override

2
designer/src/com/fr/design/mainframe/SheetNameTabPane.java

@ -384,7 +384,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
if (isNeedPaintAuthority) {
g2d.setPaint(new GradientPaint(1, 1, UIConstants.AUTHORITY_SHEET_LIGHT, 1, getHeight() - 1, UIConstants.AUTHORITY_SHEET_DARK));
} else {
g2d.setPaint(new GradientPaint(1, 1, Color.white, 1, getHeight() - 1, Color.white));
g2d.setPaint(new GradientPaint(1, 1, Color.WHITE, 1, getHeight() - 1, Color.WHITE));
}
GeneralPath generalPath = new GeneralPath(Path2D.WIND_EVEN_ODD, x.length);
generalPath.moveTo((float) x[0], (float) y[0]);

2
designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java

@ -32,7 +32,7 @@ public class ContentCellRender implements ListCellRenderer<Object> {
if (isSelected) {
String iconUrl = "/com/fr/design/mainframe/alphafine/images/selected" + model.getType().getTypeValue() + ".png";
panel.setBackground(AlphaFineConstants.BLUE);
titleLabel.setForeground(Color.white);
titleLabel.setForeground(Color.WHITE);
titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl)));
} else {
String iconUrl = "/com/fr/design/mainframe/alphafine/images/alphafine" + model.getType().getTypeValue() + ".png";

10
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -132,13 +132,13 @@ public class AlphaFineDialog extends UIDialog {
UILabel iconLabel = new UILabel(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigsearch.png")));
iconLabel.setPreferredSize(AlphaFineConstants.ICON_LABEL_SIZE);
iconLabel.setOpaque(true);
iconLabel.setBackground(Color.white);
iconLabel.setBackground(Color.WHITE);
topPane.add(iconLabel, BorderLayout.WEST);
topPane.add(searchTextField, BorderLayout.CENTER);
closeButton = new UIButton() {
@Override
public void paintComponent(Graphics g) {
g.setColor(Color.white);
g.setColor(Color.WHITE);
g.fillRect(0, 0, getSize().width, getSize().height);
super.paintComponent(g);
}
@ -171,7 +171,7 @@ public class AlphaFineDialog extends UIDialog {
searchTextField = new AlphaFineTextField(PLACE_HOLDER);
initTextFieldKeyListener();
searchTextField.setFont(AlphaFineConstants.GREATER_FONT);
searchTextField.setBackground(Color.white);
searchTextField.setBackground(Color.WHITE);
searchTextField.setBorderPainted(false);
}
@ -294,11 +294,11 @@ public class AlphaFineDialog extends UIDialog {
searchResultList.setCellRenderer(new ContentCellRender());
leftSearchResultPane = new UIScrollPane(searchResultList);
leftSearchResultPane.setBackground(Color.white);
leftSearchResultPane.setBackground(Color.WHITE);
leftSearchResultPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
leftSearchResultPane.setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT));
rightSearchResultPane = new JPanel();
rightSearchResultPane.setBackground(Color.white);
rightSearchResultPane.setBackground(Color.WHITE);
UILabel splitLine = new UILabel();
splitLine.setBackground(AlphaFineConstants.GRAY);
splitLine.setPreferredSize(new Dimension(1, AlphaFineConstants.CONTENT_HEIGHT));

2
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java

@ -6,6 +6,7 @@ import com.fr.design.actions.help.alphafine.AlphaFineListener;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.alphafine.AlphaFineHelper;
import com.fr.design.utils.ThemeUtils;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
@ -30,6 +31,7 @@ public class AlphaFinePane extends BasicPane {
refreshButton.setToolTipText(Inter.getLocText("FR-Designer_AlphaFine"));
refreshButton.set4ToolbarButton();
this.add(refreshButton);
this.setBackground(ThemeUtils.WHITE_BORDER_COLOR);
refreshButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

2
designer/src/com/fr/design/mainframe/alphafine/preview/DocumentPreviewPane.java

@ -15,7 +15,7 @@ public class DocumentPreviewPane extends JPanel {
public DocumentPreviewPane(String title, String summary) {
this.setLayout(new BorderLayout());
this.setBackground(Color.white);
this.setBackground(Color.WHITE);
UITextArea titleArea = new UITextArea(title);
UITextArea contentArea = new UITextArea(summary);
titleArea.setOpaque(false);

6
designer/src/com/fr/design/mainframe/alphafine/preview/PluginPreviewPane.java

@ -16,7 +16,7 @@ public class PluginPreviewPane extends JPanel {
public PluginPreviewPane(String title, Image image, String version, String jartime, CellType type, int price) {
setLayout(new BorderLayout());
setBorder(BorderFactory.createEmptyBorder(50, 0, 0, 0));
setBackground(Color.white);
setBackground(Color.WHITE);
UILabel imageLabel = new UILabel();
image = image.getScaledInstance(200, 200, Image.SCALE_SMOOTH);
imageLabel.setIcon(new ImageIcon(image));
@ -29,9 +29,9 @@ public class PluginPreviewPane extends JPanel {
line.setPreferredSize(new Dimension(200, 1));
line.setBackground(AlphaFineConstants.GRAY);
JPanel panel = new JPanel(new BorderLayout());
panel.setBackground(Color.white);
panel.setBackground(Color.WHITE);
JPanel bottomPane = new JPanel(new BorderLayout());
bottomPane.setBackground(Color.white);
bottomPane.setBackground(Color.WHITE);
bottomPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
if (type == CellType.PLUGIN) {
UILabel versionLabel = new UILabel("V" + version);

2
designer/src/com/fr/design/parameter/ParameterDefinitePane.java

@ -151,7 +151,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
*/
public void setComponentBg(Container cc) {
for (Component com : cc.getComponents()) {
com.setBackground(new Color(240, 240, 240));
com.setBackground(new Color(212, 212, 216));
if (com instanceof Container) {
setComponentBg((Container) com);
}

2
designer/src/com/fr/design/present/BarCodePane.java

@ -302,7 +302,7 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
private Object obj;
public BarCodePreviewPane() {
// setBackground(Color.white);
// setBackground(Color.WHITE);
}
/**

2
designer/src/com/fr/design/present/CurrencyLinePane.java

@ -154,7 +154,7 @@ public class CurrencyLinePane extends FurtherBasicBeanPane<CurrencyLinePresent>
CurrencyLineAttr currencyLineAttr;
public CurrencyLinePreviewPane() {
// setBackground(Color.white);
// setBackground(Color.WHITE);
}
public void setObject(String text, CurrencyLineAttr currencyLineAttr) {

6
designer/src/com/fr/design/webattr/ToolBarDragPane.java

@ -130,10 +130,10 @@ public class ToolBarDragPane extends WidgetToolBarPane {
initLayoutTable();
JPanel center = FRGUIPaneFactory.createBorderLayout_S_Pane();
center.setBackground(Color.white);
center.setBackground(Color.WHITE);
center.add(topButton, BorderLayout.NORTH);
JPanel small = FRGUIPaneFactory.createBorderLayout_S_Pane();
small.setBackground(Color.white);
small.setBackground(Color.WHITE);
small.add(new UILabel(StringUtils.BLANK), BorderLayout.NORTH);
small.add(layoutTable, BorderLayout.CENTER);
center.add(small, BorderLayout.CENTER);
@ -168,7 +168,7 @@ public class ToolBarDragPane extends WidgetToolBarPane {
layoutTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
layoutTable.setColumnSelectionAllowed(false);
layoutTable.setRowSelectionAllowed(false);
layoutTable.setBackground(Color.white);
layoutTable.setBackground(Color.WHITE);
int columnWidth = Integer.parseInt(Inter.getLocText("FR-Designer_LayoutTable_Column_Width"));
for (int i = 0; i < layoutTable.getColumnModel().getColumnCount(); i++) {
layoutTable.getColumnModel().getColumn(i).setPreferredWidth(columnWidth);

6
designer/src/com/fr/design/write/submit/SmartInsertDBManipulationPane.java

@ -517,7 +517,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
if (row == SmartJTablePane4DB.this.editingRowIndex) {
this.setBackground(java.awt.Color.cyan);
} else {
this.setBackground(java.awt.Color.white);
this.setBackground(java.awt.Color.WHITE);
}
return this;
@ -550,7 +550,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
if (row == SmartJTablePane4DB.this.editingRowIndex) {
pane.setBackground(java.awt.Color.cyan);
} else {
pane.setBackground(java.awt.Color.white);
pane.setBackground(java.awt.Color.WHITE);
}
pane.setToolTipText(tip);
@ -585,7 +585,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
if (row == SmartJTablePane4DB.this.editingRowIndex) {
this.setBackground(java.awt.Color.cyan);
} else {
this.setBackground(java.awt.Color.white);
this.setBackground(java.awt.Color.WHITE);
}
return this;

8
designer/src/com/fr/grid/DrawFlowRect.java

@ -88,7 +88,7 @@ public class DrawFlowRect implements Runnable {
g.drawLine(x, y, width, y);
//第二根线同上
g.drawLine(x-1, y-1, width, y-1);
g.setColor(Color.white);
g.setColor(Color.WHITE);
//第一根白色虚线
drawFlowLine(g, x, y, width, y);
isReal = oldisReal; //还原 数据
@ -101,7 +101,7 @@ public class DrawFlowRect implements Runnable {
g.setColor(Color.black); //右
g.drawLine(width, y, width, height);
g.drawLine(width-1, y-1, width-1, height);
g.setColor(Color.white);
g.setColor(Color.WHITE);
isReal = oldisReal; //还原 数据
lenReal = oldlenReal;
drawFlowLine(g, width, y, width, height);
@ -115,7 +115,7 @@ public class DrawFlowRect implements Runnable {
g.setColor(Color.black); //左
g.drawLine(x, height, x, y);
g.drawLine(x+1, height-1, x+1, y);
g.setColor(Color.white);
g.setColor(Color.WHITE);
isReal = oldisReal; //还原 数据
lenReal = oldlenReal;
drawFlowLine(g, x, height, x, y );
@ -128,7 +128,7 @@ public class DrawFlowRect implements Runnable {
g.setColor(Color.black); //下
g.drawLine(width, height, x, height);
g.drawLine(width+1, height+1, x, height+1);
g.setColor(Color.white);
g.setColor(Color.WHITE);
isReal = oldisReal; //还原 数据
lenReal = oldlenReal;
drawFlowLine(g, width, height, x, height);

2
designer/src/com/fr/grid/Grid.java

@ -57,7 +57,7 @@ public class Grid extends BaseGridComponent {
transient private TemplateCellElement editingCellElement;
private boolean showGridLine = true;
private Color gridLineColor = Color.lightGray; // line color.
private Color gridLineColor = new Color(0xf0f0f3); // line color.
private boolean isShowPaginateLine = true;
private Color paginationLineColor = Color.RED; // line color of paper

5
designer/src/com/fr/grid/GridColumnUI.java

@ -27,8 +27,7 @@ import com.fr.report.elementcase.ElementCase;
* @since 2012-3-22下午5:51:10
*/
public class GridColumnUI extends ComponentUI {
protected Color withoutDetailsBackground = Color.lightGray;
protected Color withoutDetailsBackground = new Color(0xf0f0f3);
private int resolution ;
public GridColumnUI(int resolution){
@ -71,7 +70,7 @@ public class GridColumnUI extends ComponentUI {
if (gridColumn.getBackground() != null) {
g2d.setPaint(this.withoutDetailsBackground);
GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, columnLeftWidth, size.getHeight()));
g2d.setPaint(gridColumn.getBackground());
g2d.setPaint(Color.WHITE);
GraphHelper.fill(g2d, new Rectangle2D.Double(columnLeftWidth, 0, size.getWidth() - columnLeftWidth, size.getHeight()));
}
// draw left border line.

19
designer/src/com/fr/grid/GridHeader.java

@ -1,18 +1,15 @@
package com.fr.grid;
import com.fr.base.ScreenResolution;
import java.awt.Color;
import java.awt.*;
public abstract class GridHeader<T> extends BaseGridComponent {
public final static int SIZE_ADJUST = 4;
public final static int SIZE_ADJUST = 4;
//属性
private Color separatorLineColor = new Color(172, 168, 153); //separator lines
private Color selectedForeground = Color.black;
private Color selectedBackground = new Color(253, 216, 153);
private Color selectedBackground = new Color(208, 240, 252);
protected int resolution;
@ -23,21 +20,21 @@ public abstract class GridHeader<T> extends BaseGridComponent {
this.setFocusable(false);
this.setOpaque(true);
initByConstructor();
}
public void setResolution(int resolution){
public void setResolution(int resolution) {
this.resolution = resolution;
}
public int getResolution(){
public int getResolution() {
return this.resolution;
}
protected abstract void initByConstructor();
protected abstract T getDisplay(int index) ;
protected abstract T getDisplay(int index);
/**

2
designer/src/com/fr/grid/GridRow.java

@ -21,7 +21,7 @@ import javax.swing.plaf.ComponentUI;
*/
public class GridRow extends GridHeader<Integer> {
private static final int MAX = 5;
private static final int MAX = 4;
private int resolution = ScreenResolution.getScreenResolution();
private GridRowMouseHandler gridRowMouseHandler;

6
designer/src/com/fr/grid/GridRowUI.java

@ -26,7 +26,7 @@ import com.fr.report.elementcase.ElementCase;
* @since 2012-3-22下午5:54:21
*/
public class GridRowUI extends ComponentUI {
private Color detailsBackground = Color.lightGray;
private Color detailsBackground = new Color(0xf0f0f3);
private int resolution ;
GridRowUI(int resolution){
@ -68,8 +68,8 @@ public class GridRowUI extends ComponentUI {
rowTopHeight = Math.min(horizontalLineHeight, rowTopHeight);
if (gridRow.getBackground() != null) {
g2d.setPaint(this.detailsBackground);
GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, size.getWidth(), rowTopHeight));
g2d.setPaint(gridRow.getBackground());
GraphHelper.fill(g2d, new Rectangle2D.Double(0, 0, size.getWidth(), rowTopHeight));
g2d.setPaint(Color.WHITE);
GraphHelper.fill(g2d, new Rectangle2D.Double(0, rowTopHeight, size.getHeight(), size.getHeight() - rowTopHeight));
}
// draw top border line.

2
designer/src/com/fr/poly/PolyComponetsBar.java

@ -34,7 +34,7 @@ public class PolyComponetsBar extends JToolBar {
setOrientation(SwingConstants.VERTICAL);
setBorder(BorderFactory.createEmptyBorder(4, 4, 0, 4));
setFloatable(false);
setBackground(UIConstants.NORMAL_BACKGROUND);
setBackground(UIConstants.TOOLBARUI_BACKGROUND);
setLayout(FRGUIPaneFactory.create1ColumnGridLayout());
int typeLen = typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM;
serIcons = new SerIcon[typeLen + 1];

2
designer/src/com/fr/poly/PolyDesignUI.java

@ -76,7 +76,7 @@ public class PolyDesignUI extends ComponentUI {
Graphics2D g2d = (Graphics2D) g;
Dimension d = c.getSize();
TemplateReport report = designer.getTemplateReport();
g2d.setPaint(Color.white);
g2d.setPaint(Color.WHITE);
GraphHelper.fillRect(g, 0, 0, d.width, d.height);
ReportSettingsProvider rs = report.getReportSettings();
if (rs != null) {

1
designer/src/com/fr/poly/PolyDesigner.java

@ -152,6 +152,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
ployareaPane.add(PolyDesignerLayout.VRuler, new VerticalRuler(this));
ployareaPane.add(PolyDesignerLayout.HRuler, new HorizontalRuler(this));
ployareaPane.setBackground(Color.WHITE);
this.add(ployareaPane, BorderLayout.CENTER);
this.add(polyComponetsBar, BorderLayout.WEST);
this.addKeyListener(showValSpinnerKeyListener);

2
designer/src/com/fr/poly/creator/BlockEditor.java

@ -59,7 +59,7 @@ public abstract class BlockEditor<T extends JComponent,U extends TemplateBlock>
this.initDataChangeListener();
}
protected void initComponets(){
this.setBackground(Color.white);
this.setBackground(Color.WHITE);
this.setOpaque(false);
this.setLayout(new BlockEditorLayout());
editComponent = createEffective();

2
designer/src/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java

@ -50,7 +50,7 @@ public class FloatStringQuickEditor extends FloatQuickEditor {
stringTextField.setWrapStyleWord(true);
stringTextField.setMargin(new Insets(5, 5, 5, 5));
stringTextField.setBorder(BorderFactory.createLineBorder(Color.gray));
stringTextField.setBackground(Color.white);
stringTextField.setBackground(Color.WHITE);
}
ActionListener getFormulaActionListener = new ActionListener() {

14
designer/src/com/fr/start/Designer.java

@ -132,23 +132,26 @@ public class Designer extends BaseDesigner {
public UILargeToolbar createLargeToolbar() {
UILargeToolbar largeToolbar = super.createLargeToolbar();
largeToolbar.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 4));
largeToolbar.add(new JPanel() {
JPanel templeJpanel = new JPanel() {
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.width = 1;
return dim;
}
});
};
templeJpanel.setBackground(Color.WHITE);
largeToolbar.add(templeJpanel);
createRunButton(largeToolbar);
largeToolbar.add(run);
largeToolbar.add(new JPanel() {
templeJpanel = new JPanel() {
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.width = GAP;
return dim;
}
});
largeToolbar.addSeparator(new Dimension(2, 42));
};
templeJpanel.setBackground(Color.WHITE);
largeToolbar.add(templeJpanel);
largeToolbar.setBorder(new MatteBorder(new Insets(0, 0, 1, 0), UIConstants.LINE_COLOR));
return largeToolbar;
}
@ -260,6 +263,7 @@ public class Designer extends BaseDesigner {
run.set4Toolbar();
run.getUpButton().setToolTipText(Inter.getLocText("FR-Designer_Preview"));
run.getDownButton().setToolTipText(Inter.getLocText("FR-Designer_Dropdown-More-Preview"));
run.setBackground(Color.WHITE);
}
@Override

2
designer_base/src/com/fr/design/actions/help/alphafine/RemindPane.java

@ -69,7 +69,7 @@ public class RemindPane extends JPanel {
});
noRemindLabel = new UILabel(Inter.getLocText("FR-Designer-Alphafine_No_Remind"));
noRemindLabel.setFont(MEDIUM_FONT);
noRemindLabel.setForeground(Color.white);
noRemindLabel.setForeground(Color.WHITE);
checkLabel = new UILabel();
checkLabel.setIcon(unCheckIcon);
checkLabel.addMouseListener(new MouseAdapter() {

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

@ -62,11 +62,15 @@ public interface UIConstants {
public static final Color SKY_BLUE = new Color(164, 192, 220);
public static final Color OCEAN_BLUE = new Color(141, 179, 217);
public static final Color DARK_BLUE = new Color(0, 88, 144);
public static final Color NORMAL_BACKGROUND = new Color(240, 240, 240);
public static final Color SHADOW_GREY = new Color(0xe2e2e2);
public static final Color NORMAL_BACKGROUND = new Color(212, 212, 216);
public static final Color TREE_BACKGROUND = new Color(240, 240, 243);
public static final Color TOOL_PANE_BACKGROUND = new Color(232, 232, 223);
public static final Color SELECT_TAB = new Color(245, 245, 247);
public static final Color TOOLBARUI_BACKGROUND = new Color(255, 255, 255);
public static final Color SHADOW_GREY = new Color(217, 218, 221);
public static final Color SHADOW_CENTER = new Color(200, 200, 200);
public static final Color SHADOW_PURPLE = new Color(255, 0, 255);
public static final Color FLESH_BLUE = new Color(168, 180, 202);
public static final Color FLESH_BLUE = new Color(65, 155, 249);
public static final Color HOVER_BLUE = new Color(0xd2d2d2);
public static final Color DOTTED_LINE_COLOR = new Color(35, 108, 184);
public static final Color AUTHORITY_COLOR = new Color(88, 125, 153);
@ -77,21 +81,20 @@ public interface UIConstants {
public static final Color AUTHORITY_SHEET_DARK = new Color(86, 120, 143);
public static final Color AUTHORITY_SHEET_LIGHT = new Color(156, 204, 238);
public static final Color AUTHORITY_SHEET_UNSELECTED = new Color(146, 192, 225);
public static final Color ATTRIBUTE_PRESS = new Color(0xdfecfc);
public static final Color ATTRIBUTE_NORMAL = new Color(0xe2e2e2);
public static final Color ATTRIBUTE_HOVER = new Color(0xd3d3d3);
public static final Color ATTRIBUTE_PRESS = new Color(0xD8F2FD);
public static final Color ATTRIBUTE_NORMAL = new Color(0xDADADD);
public static final Color ATTRIBUTE_HOVER = new Color(0xC9C9CD);
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 SHEET_NORMAL = new Color(0xc8c8ca);
public static final Color SELECTED_BACKGROUND = new Color(0xdeedfe);
public static final Color SELECTED_BORDER_LINE_COLOR = new Color(0x3384f0);
public static final Color DEFAULT_BG_RULER = new Color(0xf7f7f7);
public static final Color DEFAULT_BG_RULER = new Color(0xffffff);
public static final Color RULER_LINE_COLOR = new Color(0xababab);
public static final Color RULER_SCALE_COLOR = new Color(0x4e504f);
public static final Color PROPERTY_PANE_BACKGROUND = new Color(0xdadadd);
public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png");
public static final BufferedImage DRAG_BAR_RIGHT = BaseUtils.readImage("com/fr/design/images/control/barm.png");
public static final BufferedImage DRAG_BAR_LEFT = BaseUtils.readImage("com/fr/design/images/control/barl.png");
@ -139,9 +142,10 @@ public interface UIConstants {
public static final Icon LIST_EDIT_WHITE_ICON = BaseUtils.readIcon("/com/fr/design/images/control/edit.png");
public static final Color PRESSED_DARK_GRAY = new Color(127, 127, 127);
public static final Color GRDIENT_DARK_GRAY = new Color(45, 45, 45);
public static final Color BARNOMAL = new Color(153, 153, 153);
public static final Color BARNOMAL = new Color(232, 232, 233);
public static final int ARC = 0;
public static final int LARGEARC = 0;
public static final int BUTTON_GROUP_ARC = 6;
public static final int LARGEARC = 6;
public static final Stroke BS = new BasicStroke(1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 2f, new float[]{3, 1}, 0);
public static final Icon PREVIEW_DOWN = BaseUtils.readIcon("com/fr/design/images/buttonicon/prevew_down_icon.png");
public static final Icon CLOSE_OF_AUTHORITY = BaseUtils.readIcon("/com/fr/design/images/m_report/close.png");

2
designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java

@ -120,7 +120,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
UIScrollPane scrollPane = new UIScrollPane(dataTree);
scrollPane.setBorder(null);
initbuttonGroup();
JPanel jPanel = new JPanel(new BorderLayout(4, 4));
JPanel jPanel = new JPanel(new BorderLayout(0, 0));
JPanel buttonPane = new JPanel(new GridLayout());
buttonPane.add(buttonGroup, BorderLayout.CENTER);
jPanel.add(buttonPane, BorderLayout.NORTH);

957
designer_base/src/com/fr/design/file/MutilTempalteTabPane.java

File diff suppressed because one or more lines are too long

162
designer_base/src/com/fr/design/file/NewTemplatePane.java

@ -1 +1,161 @@
package com.fr.design.file; import com.fr.base.BaseUtils; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; import javax.swing.*; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.Line2D; /** * Author : daisy * Date: 13-8-27 * Time: 下午6:07 */ public abstract class NewTemplatePane extends JComponent implements MouseListener, MouseMotionListener { private static final Icon GRAY_NEW_CPT = BaseUtils.readIcon("/com/fr/design/images/buttonicon/additicon_grey.png"); private static final int PRE_GAP = 0; private static final int HEIGHT = 26; private Graphics2D g2d; private Icon newWorkBookIconMode = null; private int newIconStartX = PRE_GAP; public NewTemplatePane() { newWorkBookIconMode = getNew(); this.setLayout(new BorderLayout(0, 0)); this.addMouseListener(this); this.addMouseMotionListener(this); this.setBorder(null); this.setForeground(new Color(99, 99, 99)); } public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); dim.width = HEIGHT; return dim; } public void paintComponent(Graphics g) { super.paintComponent(g); g2d = (Graphics2D) g; int sheetIconY = (getHeight() - newWorkBookIconMode.getIconHeight()) / 2; newWorkBookIconMode.paintIcon(this, g2d, newIconStartX, sheetIconY); paintUnderLine(g2d); } private void paintUnderLine(Graphics2D g2d) { //画下面的那条线 g2d.setPaint(UIConstants.LINE_COLOR); g2d.draw(new Line2D.Double((float) 0, (float) (getHeight()-1), getWidth(), (float) (getHeight()-1))); } /** *鼠标点击 * @param e 事件 */ public void mouseClicked(MouseEvent e) { if (BaseUtils.isAuthorityEditing()) { newWorkBookIconMode = GRAY_NEW_CPT; } } /** *鼠标按下 * @param e 事件 */ public void mousePressed(MouseEvent e) { int evtX = e.getX(); if (BaseUtils.isAuthorityEditing()) { newWorkBookIconMode = GRAY_NEW_CPT; } if (isOverNewIcon(evtX) && newWorkBookIconMode != GRAY_NEW_CPT) { newWorkBookIconMode = getMousePressNew(); newIconStartX = 0; DesignerContext.getDesignerFrame().addAndActivateJTemplate(); } this.repaint(); } /** *鼠标松开 * @param e 事件 */ public void mouseReleased(MouseEvent e) { if (BaseUtils.isAuthorityEditing()) { newWorkBookIconMode = GRAY_NEW_CPT; } } /** *鼠标进入 * @param e 事件 */ public void mouseEntered(MouseEvent e) { if (BaseUtils.isAuthorityEditing()) { newWorkBookIconMode = GRAY_NEW_CPT; } } /** *鼠标离开 * @param e 事件 */ public void mouseExited(MouseEvent e) { newIconStartX = PRE_GAP; if (BaseUtils.isAuthorityEditing()) { newWorkBookIconMode = GRAY_NEW_CPT; } else { newWorkBookIconMode = getNew(); } this.repaint(); } /** *鼠标拖拽 * @param e 事件 */ public void mouseDragged(MouseEvent e) { } /** *鼠标移动 * @param e 事件 */ public void mouseMoved(MouseEvent e) { int evtX = e.getX(); if (BaseUtils.isAuthorityEditing()) { newWorkBookIconMode = GRAY_NEW_CPT; } else if (isOverNewIcon(evtX)) { newIconStartX = 0; newWorkBookIconMode = getMouseOverNew(); } this.repaint(); } private boolean isOverNewIcon(int evtX) { return (evtX >= PRE_GAP && evtX <= PRE_GAP + newWorkBookIconMode.getIconWidth()); } public void setButtonGray(boolean isGray) { newWorkBookIconMode = isGray ? GRAY_NEW_CPT : getNew(); } public abstract Icon getNew(); public abstract Icon getMouseOverNew(); public abstract Icon getMousePressNew(); }
package com.fr.design.file;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.DesignerContext;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.Line2D;
/**
* Author : daisy
* Date: 13-8-27
* Time: 下午6:07
*/
public abstract class NewTemplatePane extends JComponent implements MouseListener, MouseMotionListener {
private static final Icon GRAY_NEW_CPT = BaseUtils.readIcon("/com/fr/design/images/buttonicon/additicon_grey.png");
private static final int PRE_GAP = 0;
private static final int HEIGHT = 26;
private Graphics2D g2d;
private Icon newWorkBookIconMode = null;
private int newIconStartX = PRE_GAP;
public NewTemplatePane() {
newWorkBookIconMode = getNew();
this.setLayout(new BorderLayout(0, 0));
this.addMouseListener(this);
this.addMouseMotionListener(this);
this.setBorder(null);
this.setForeground(new Color(99, 99, 99));
}
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.width = HEIGHT;
return dim;
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
g2d = (Graphics2D) g;
int sheetIconY = (getHeight() - newWorkBookIconMode.getIconHeight()) / 2;
newWorkBookIconMode.paintIcon(this, g2d, newIconStartX, sheetIconY);
// paintUnderLine(g2d);
}
private void paintUnderLine(Graphics2D g2d) {
//画下面的那条线
g2d.setPaint(UIConstants.LINE_COLOR);
g2d.draw(new Line2D.Double((float) 0, (float) (getHeight()-1), getWidth(), (float) (getHeight()-1)));
}
/**
*鼠标点击
* @param e 事件
*/
public void mouseClicked(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) {
newWorkBookIconMode = GRAY_NEW_CPT;
}
}
/**
*鼠标按下
* @param e 事件
*/
public void mousePressed(MouseEvent e) {
int evtX = e.getX();
if (BaseUtils.isAuthorityEditing()) {
newWorkBookIconMode = GRAY_NEW_CPT;
}
if (isOverNewIcon(evtX) && newWorkBookIconMode != GRAY_NEW_CPT) {
newWorkBookIconMode = getMousePressNew();
newIconStartX = 0;
DesignerContext.getDesignerFrame().addAndActivateJTemplate();
}
this.repaint();
}
/**
*鼠标松开
* @param e 事件
*/
public void mouseReleased(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) {
newWorkBookIconMode = GRAY_NEW_CPT;
}
}
/**
*鼠标进入
* @param e 事件
*/
public void mouseEntered(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) {
newWorkBookIconMode = GRAY_NEW_CPT;
}
}
/**
*鼠标离开
* @param e 事件
*/
public void mouseExited(MouseEvent e) {
newIconStartX = PRE_GAP;
if (BaseUtils.isAuthorityEditing()) {
newWorkBookIconMode = GRAY_NEW_CPT;
} else {
newWorkBookIconMode = getNew();
}
this.repaint();
}
/**
*鼠标拖拽
* @param e 事件
*/
public void mouseDragged(MouseEvent e) {
}
/**
*鼠标移动
* @param e 事件
*/
public void mouseMoved(MouseEvent e) {
int evtX = e.getX();
if (BaseUtils.isAuthorityEditing()) {
newWorkBookIconMode = GRAY_NEW_CPT;
} else if (isOverNewIcon(evtX)) {
newIconStartX = 0;
newWorkBookIconMode = getMouseOverNew();
}
this.repaint();
}
private boolean isOverNewIcon(int evtX) {
return (evtX >= PRE_GAP && evtX <= PRE_GAP + newWorkBookIconMode.getIconWidth());
}
public void setButtonGray(boolean isGray) {
newWorkBookIconMode = isGray ? GRAY_NEW_CPT : getNew();
}
public abstract Icon getNew();
public abstract Icon getMouseOverNew();
public abstract Icon getMousePressNew();
}

4
designer_base/src/com/fr/design/gui/UIDefaultTheme.java

@ -48,7 +48,7 @@ public class UIDefaultTheme extends DefaultMetalTheme {
putTreeAndList(table);
putOthers(table);
table.put("Desktop.background", new ColorUIResource(212, 210, 194));
table.put("Separator.background", new ColorUIResource(173, 170, 153));
table.put("Separator.background", new ColorUIResource(232, 232, 233));
table.put("Separator.foreground", new ColorUIResource(236, 233, 216));
table.put("TitledBorder.border", new LineBorder(
new ColorUIResource(165, 163, 151)));
@ -87,7 +87,7 @@ public class UIDefaultTheme extends DefaultMetalTheme {
table.put("TabbedPane.tabAreaInsets", new InsetsUIResource(4, 2, 0, 0));
table.put("TabbedPane.tabInsets", new InsetsUIResource(1, 6, 4, 6));
table.put("Table.gridColor", ThemeUtils.TABLE_GRID_COLOR);
table.put("MenuBar.background", new ColorUIResource(240, 240, 240));
table.put("MenuBar.background", new ColorUIResource(212, 212, 216));
table.put("Menu.foreground", ThemeUtils.MENU_ITEM_FONT_COLOR);
table.put("MenuItem.foreground", ThemeUtils.MENU_ITEM_FONT_COLOR);
table.put("ToolBar.background", new ColorUIResource(239, 237, 229));

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

@ -142,7 +142,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
@Override
public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.white);
g2.setColor(Color.WHITE);
g2.fillRect(0, 0, c.getWidth(), c.getHeight());
}
});

2
designer_base/src/com/fr/design/gui/controlpane/UINameableListCellRenderer.java

@ -90,7 +90,7 @@ public class UINameableListCellRenderer extends
if (isSelected) {
setBackground(bg == null ? list.getSelectionBackground() : bg);
setForeground(fg == null ? list.getSelectionForeground() : fg);
label.setForeground(Color.white);
label.setForeground(Color.WHITE);
editButton.setIcon(UIConstants.LIST_EDIT_WHITE_ICON);
}
else {

4
designer_base/src/com/fr/design/gui/date/UICalendarPanel.java

@ -575,7 +575,7 @@ public class UICalendarPanel extends JPanel {
this.getComponent(selectedIndex).setForeground(Color.black);
}
if (index != -1 && index < getComponentCount()) {
this.getComponent(index).setForeground(Color.white);
this.getComponent(index).setForeground(Color.WHITE);
}
this.selectedIndex = index;
repaint();
@ -716,7 +716,7 @@ public class UICalendarPanel extends JPanel {
Graphics2D g2d = (Graphics2D)g;
if (isRolOver) {
Shape shape = new RoundRectangle2D.Double(1, 1, 86, 15, UIConstants.ARC, UIConstants.ARC);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.white);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.WHITE);
} else {
GUIPaintUtils.drawBorder(g2d, 0, 0, 101, 18, true, 3);
}

2
designer_base/src/com/fr/design/gui/frpane/UITitlePanel.java

@ -27,7 +27,7 @@ public class UITitlePanel extends JPanel {
public UITitlePanel(JPanel contentPanel, String title) {
JPanel TitleBar = FRGUIPaneFactory.createBorderLayout_S_Pane();
TitleBar.setBackground(new Color(148, 148, 148));
TitleBar.setForeground(Color.white);
TitleBar.setForeground(Color.WHITE);
TitleBar.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, new Color(85, 85, 85)));
UILabel titlelabel = new UILabel(" " + title);

2
designer_base/src/com/fr/design/gui/ibutton/UIBasicButtonUI.java

@ -5,9 +5,9 @@
package com.fr.design.gui.ibutton;
import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.general.ComparatorUtils;
import com.fr.design.utils.ColorRoutines;
import com.fr.design.utils.ThemeUtils;
import com.fr.general.ComparatorUtils;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;

777
designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -1,5 +1,17 @@
package com.fr.design.gui.ibutton;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
@ -10,419 +22,370 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.Border;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import com.fr.design.utils.gui.GUICoreUtils;
public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
private boolean isTwoLine = false;
private boolean isFourLine = false;
private static final long serialVersionUID = 1L;
protected List<UIToggleButton> labelButtonList;
protected int selectedIndex = -1;
private List<T> objectList;// 起到一个render的作用
private GlobalNameListener globalNameListener = null;
private String buttonGroupName = "";
private boolean isToolBarComponent = false;
private static final long serialVersionUID = 1L;
protected List<UIToggleButton> labelButtonList;
protected int selectedIndex = -1;
private List<T> objectList;// 起到一个render的作用
private GlobalNameListener globalNameListener = null;
private String buttonGroupName = "";
private boolean isToolBarComponent = false;
private boolean isClick;
public UIButtonGroup(String[] textArray) {
this(textArray, null);
}
public UIButtonGroup(Icon[] iconArray) {
this(iconArray, null);
}
public UIButtonGroup(Icon[] iconArray, T[] objects) {
if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) {
this.objectList = Arrays.asList(objects);
}
labelButtonList = new ArrayList<UIToggleButton>(iconArray.length);
this.setLayout(getGridLayout(iconArray.length));
this.setBorder(getGroupBorder());
for (int i = 0; i < iconArray.length; i++) {
final int index = i;
Icon icon = iconArray[i];
final UIToggleButton labelButton = new UIToggleButton(icon) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
public UIButtonGroup(String[] textArray) {
this(textArray, null);
}
public UIButtonGroup(Icon[] iconArray) {
this(iconArray, null);
}
public UIButtonGroup(Icon[] iconArray, T[] objects) {
if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) {
this.objectList = Arrays.asList(objects);
}
labelButtonList = new ArrayList<UIToggleButton>(iconArray.length);
this.setLayout(getGridLayout(iconArray.length));
this.setBorder(getGroupBorder());
for (int i = 0; i < iconArray.length; i++) {
final int index = i;
Icon icon = iconArray[i];
final UIToggleButton labelButton = new UIToggleButton(icon) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
isClick = true;
if (!isEnabled()) {
return;
}
if (globalNameListener != null) {
globalNameListener.setGlobalName(buttonGroupName);
}
setSelectedWithFireChanged(index);
}
};
}
public boolean shouldResponseNameListener() {
return false;
}
};
initButton(labelButton);
}
}
public boolean hasClick(){
return isClick;
}
public void setClickState(boolean changeFlag){
isClick = changeFlag;
if (!isEnabled()) {
return;
}
if (globalNameListener != null) {
globalNameListener.setGlobalName(buttonGroupName);
}
setSelectedWithFireChanged(index);
}
};
}
public boolean shouldResponseNameListener() {
return false;
}
};
initButton(labelButton);
}
}
public boolean hasClick() {
return isClick;
}
public void setClickState(boolean changeFlag) {
isClick = changeFlag;
}
public void setForToolBarButtonGroup(boolean isToolBarComponent) {
this.isToolBarComponent = isToolBarComponent;
if (isToolBarComponent) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).set4ToolbarButton();
}
}
repaint();
}
/**
* setEnabled
*
* @param enabled
*/
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).setEnabled(enabled);
}
}
public UIButtonGroup(String[] textArray, T[] objects) {
if (!ArrayUtils.isEmpty(objects) && textArray.length == objects.length) {
this.objectList = Arrays.asList(objects);
}
labelButtonList = new ArrayList<UIToggleButton>(textArray.length);
this.setLayout(getGridLayout(textArray.length));
this.setBorder(getGroupBorder());
for (int i = 0; i < textArray.length; i++) {
final int index = i;
final UIToggleButton labelButton = new UIToggleButton(textArray[i]) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (!isEnabled()) {
return;
}
if (globalNameListener != null) {
globalNameListener.setGlobalName(buttonGroupName);
}
setSelectedWithFireChanged(index);
}
};
}
@Override
public Insets getInsets() {
return new Insets(0, 2, 0, 2);
}
public boolean shouldResponseNameListener() {
return false;
}
};
initButton(labelButton);
}
}
public void setForToolBarButtonGroup(boolean isToolBarComponent) {
this.isToolBarComponent = isToolBarComponent;
if (isToolBarComponent) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).set4ToolbarButton();
}
}
repaint();
}
/**
* setEnabled
*
* @param enabled
*/
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).setEnabled(enabled);
}
}
public UIButtonGroup(String[] textArray, T[] objects) {
if (!ArrayUtils.isEmpty(objects) && textArray.length == objects.length) {
this.objectList = Arrays.asList(objects);
}
labelButtonList = new ArrayList<UIToggleButton>(textArray.length);
this.setLayout(getGridLayout(textArray.length));
this.setBorder(getGroupBorder());
for (int i = 0; i < textArray.length; i++) {
final int index = i;
final UIToggleButton labelButton = new UIToggleButton(textArray[i]) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (!isEnabled()) {
return;
}
if(globalNameListener != null) {
globalNameListener.setGlobalName(buttonGroupName);
}
setSelectedWithFireChanged(index);
}
};
}
@Override
public Insets getInsets() {
return new Insets(0, 2, 0, 2);
}
public boolean shouldResponseNameListener() {
return false;
}
};
initButton(labelButton);
}
}
public void setGlobalName(String name) {
buttonGroupName = name;
}
protected void initButton(UIToggleButton labelButton) {
labelButton.setRoundBorder(false);
labelButton.setBorderPainted(false);
labelButtonList.add(labelButton);
this.add(labelButton);
}
protected Border getGroupBorder() {
return BorderFactory.createEmptyBorder(1, 1, 1, 1);
}
protected LayoutManager getGridLayout(int number) {
return new GridLayout(0, number, 1, 0);
}
public void setTwoLine() {
this.isTwoLine = true;
}
public void setFourLine() {
this.isFourLine = true;
}
/**
* paintComponent
*
* @param g
*/
public void paintComponents(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
Shape oldClip = g2d.getClip();
g2d.clip(new RoundRectangle2D.Double(1, 1, getWidth(), getHeight(), UIConstants.ARC, UIConstants.ARC));
super.paintComponents(g);
g2d.setClip(oldClip);
}
/**
* 重载Border画法
*
* @param g
*/
@Override
protected void paintBorder(Graphics g) {
if(isToolBarComponent){
return;
}
Graphics2D g2d = (Graphics2D) g;
g2d.setColor(UIConstants.LINE_COLOR);
if (isTwoLine) {
int width = 0;
int upCount = (labelButtonList.size() - 1) / 2 + 1;
for (int i = 0; i < upCount - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight() * 2 + 1;
g.drawLine(width, 0, width, height);
}
width += labelButtonList.get(upCount).getWidth() + 1;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(0, 0, width, getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
g2d.drawLine(0, getHeight() / 2, width, getHeight() / 2);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
} else if (isFourLine) {
// 4 * 1
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
for (int i = 1; i <= 3; i++) {
g2d.drawLine(0, getHeight() / 4 * i, getWidth() - 1, getHeight() / 4 * i);
}
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
} else {
int width = 0;
for (int i = 0; i < labelButtonList.size() - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight();
g.drawLine(width, 0, width, height);
}
width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(0, 0, width, getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
}
/**
* setSelectedItem
*
* @param ob
*/
public void setSelectedItem(T ob) {
if (objectList == null) {
setSelectedIndex(-1);
return;
}
setSelectedIndex(objectList.indexOf(ob));
}
/**
* getSelectedItem
*
* @return
*/
public T getSelectedItem() {
if (selectedIndex == -1) {
return null;
}
return objectList.get(selectedIndex);
}
/**
* getSelectedIndex
*
* @return
*/
public int getSelectedIndex() {
return selectedIndex;
}
protected void setSelectedWithFireChanged(int newSelectedIndex) {
selectedIndex = newSelectedIndex;
for (int i = 0; i < labelButtonList.size(); i++) {
if (i == selectedIndex) {
labelButtonList.get(i).setSelectedWithFireListener(true);
} else {
labelButtonList.get(i).setSelected(false);
}
}
}
/**
* setSelectedIndex
*
* @param newSelectedIndex
*/
public void setSelectedIndex(int newSelectedIndex) {
selectedIndex = newSelectedIndex;
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).setSelected(i == selectedIndex);
}
}
private void fireStateChanged() {
Object[] listeners = listenerList.getListenerList();
ChangeEvent e = null;
for (int i = 0; i < listeners.length; i++) {
if (listeners[i] == ChangeListener.class) {
if (e == null) {
e = new ChangeEvent(this);
}
((ChangeListener) listeners[i + 1]).stateChanged(e);
}
}
}
/**
* getButton
*
* @param index
* @return
*/
public UIToggleButton getButton(int index) {
return labelButtonList.get(index);
}
/**
* 给所有的Button添加Tips
*
* @param tips
*/
public void setAllToolTips(String[] tips) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).setToolTipText(tips[i]);
}
}
/**
* 注册全局属性名字监听器
*
* @param listener 观察者监听事件
*/
public void registerNameListener(GlobalNameListener listener) {
globalNameListener = listener;
}
/**
* 是否响应名字监听事件
*
* @return
*/
public boolean shouldResponseNameListener() {
return true;
}
/**
* @param l
*/
public void addChangeListener(ChangeListener l) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).addChangeListener(l);
listenerList.add(ChangeListener.class, l);
}
}
/**
* @param l
*/
public void removeChangeListener(ChangeListener l) {
this.listenerList.remove(ChangeListener.class, l);
}
/**
* @param l
*/
public void addActionListener(ActionListener l) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).addActionListener(l);
}
}
/**
* @param l
*/
public void removeActionListener(ActionListener l) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).removeActionListener(l);
}
}
/**
* populate
*/
public void populateBean() {
fireStateChanged();
}
/**
* main
*
* @param 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());
Icon[] a1 = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
Integer[] a2 = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
UIButtonGroup<Integer> bb = new UIButtonGroup<Integer>(a1, a2);
bb.setBounds(20, 20, bb.getPreferredSize().width, bb.getPreferredSize().height);
bb.setSelectedIndex(0);
bb.setEnabled(false);
content.add(bb);
GUICoreUtils.centerWindow(jf);
jf.setSize(400, 400);
jf.setVisible(true);
}
public void setGlobalName(String name) {
buttonGroupName = name;
}
protected void initButton(UIToggleButton labelButton) {
labelButton.setRoundBorder(true);
labelButton.setBorderPainted(false);
labelButtonList.add(labelButton);
this.add(labelButton);
}
protected Border getGroupBorder() {
return BorderFactory.createEmptyBorder(1, 1, 1, 1);
}
protected LayoutManager getGridLayout(int number) {
return new GridLayout(0, number, 0, 0);
}
/**
* paintComponent
*
* @param g
*/
public void paintComponents(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
Shape oldClip = g2d.getClip();
g2d.clip(new RoundRectangle2D.Double(0, 0, getWidth(), getHeight(), UIConstants.ARC, UIConstants.ARC));
super.paintComponents(g);
g2d.setClip(oldClip);
}
/**
* 重载Border画法
*
* @param g
*/
@Override
protected void paintBorder(Graphics g) {
if (isToolBarComponent) {
return;
}
Graphics2D g2d = (Graphics2D) g;
g2d.setColor(UIConstants.SHADOW_GREY);
int width = 0;
for (int i = 0; i < labelButtonList.size() - 1; i++) {
width += labelButtonList.get(i).getWidth() + 1;
int height = labelButtonList.get(i).getHeight();
g.drawLine(width, 0, width, height);
}
width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawRoundRect(0, 0, width, getHeight() - 1, UIConstants.BUTTON_GROUP_ARC, UIConstants.BUTTON_GROUP_ARC);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
}
/**
* setSelectedItem
*
* @param ob
*/
public void setSelectedItem(T ob) {
if (objectList == null) {
setSelectedIndex(-1);
return;
}
setSelectedIndex(objectList.indexOf(ob));
}
/**
* getSelectedItem
*
* @return
*/
public T getSelectedItem() {
if (selectedIndex == -1) {
return null;
}
return objectList.get(selectedIndex);
}
/**
* getSelectedIndex
*
* @return
*/
public int getSelectedIndex() {
return selectedIndex;
}
protected void setSelectedWithFireChanged(int newSelectedIndex) {
selectedIndex = newSelectedIndex;
for (int i = 0; i < labelButtonList.size(); i++) {
if (i == selectedIndex) {
labelButtonList.get(i).setSelectedWithFireListener(true);
} else {
labelButtonList.get(i).setSelected(false);
}
}
}
/**
* setSelectedIndex
*
* @param newSelectedIndex
*/
public void setSelectedIndex(int newSelectedIndex) {
selectedIndex = newSelectedIndex;
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).setSelected(i == selectedIndex);
}
}
private void fireStateChanged() {
Object[] listeners = listenerList.getListenerList();
ChangeEvent e = null;
for (int i = 0; i < listeners.length; i++) {
if (listeners[i] == ChangeListener.class) {
if (e == null) {
e = new ChangeEvent(this);
}
((ChangeListener) listeners[i + 1]).stateChanged(e);
}
}
}
/**
* getButton
*
* @param index
* @return
*/
public UIToggleButton getButton(int index) {
return labelButtonList.get(index);
}
/**
* 给所有的Button添加Tips
*
* @param tips
*/
public void setAllToolTips(String[] tips) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).setToolTipText(tips[i]);
}
}
/**
* 注册全局属性名字监听器
*
* @param listener 观察者监听事件
*/
public void registerNameListener(GlobalNameListener listener) {
globalNameListener = listener;
}
/**
* 是否响应名字监听事件
*
* @return
*/
public boolean shouldResponseNameListener() {
return true;
}
/**
* @param l
*/
public void addChangeListener(ChangeListener l) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).addChangeListener(l);
listenerList.add(ChangeListener.class, l);
}
}
/**
* @param l
*/
public void removeChangeListener(ChangeListener l) {
this.listenerList.remove(ChangeListener.class, l);
}
/**
* @param l
*/
public void addActionListener(ActionListener l) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).addActionListener(l);
}
}
/**
* @param l
*/
public void removeActionListener(ActionListener l) {
for (int i = 0; i < labelButtonList.size(); i++) {
labelButtonList.get(i).removeActionListener(l);
}
}
/**
* populate
*/
public void populateBean() {
fireStateChanged();
}
/**
* main
*
* @param 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());
Icon[] a1 = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
Integer[] a2 = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
UIButtonGroup<Integer> bb = new UIButtonGroup<Integer>(a1, a2);
bb.setBounds(20, 20, bb.getPreferredSize().width, bb.getPreferredSize().height);
bb.setSelectedIndex(0);
bb.setEnabled(false);
content.add(bb);
GUICoreUtils.centerWindow(jf);
jf.setSize(400, 400);
jf.setVisible(true);
}
}

300
designer_base/src/com/fr/design/gui/ibutton/UIHeadGroup.java

@ -1,89 +1,81 @@
package com.fr.design.gui.ibutton;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class UIHeadGroup extends JPanel {
protected List<UIToggleButton> labelButtonList;
private boolean isNeedLeftRightOutLine = true;
protected int selectedIndex = -1;
import com.fr.base.BaseUtils;
import com.fr.design.constants.UIConstants;
import com.fr.design.utils.gui.GUICoreUtils;
protected void tabChanged(int newSelectedIndex) {
}
public class UIHeadGroup extends JPanel{
protected List<UIToggleButton> labelButtonList;
private boolean isNeedLeftRightOutLine = true;
protected int selectedIndex = -1;
protected void tabChanged(int newSelectedIndex) {
}
public UIHeadGroup(String[] textArray) {
labelButtonList = new ArrayList<UIToggleButton>(textArray.length);
this.setBackground(UIConstants.NORMAL_BACKGROUND);
this.setLayout(new GridLayout(0, textArray.length, 1, 0));
this.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
for(int i = 0; i < textArray.length; i++) {
final int index = i;
String text = textArray[i];
final UIToggleButton labelButton = new UIToggleButton(text) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
setSelectedIndex(index);
UIHeadGroup.this.repaint();
}
};
}
};
initButton(labelButton);
}
setSelectedIndex(0);
}
public UIHeadGroup(Icon[] iconArray) {
labelButtonList = new ArrayList<UIToggleButton>(iconArray.length);
this.setBackground(UIConstants.NORMAL_BACKGROUND);
this.setLayout(new GridLayout(0, iconArray.length, 1, 0));
this.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
for(int i = 0; i < iconArray.length; i++) {
final int index = i;
Icon icon = iconArray[i];
final UIToggleButton labelButton = new UIToggleButton(icon) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
setSelectedIndex(index);
UIHeadGroup.this.repaint();
}
};
}
};
initButton(labelButton);
}
setSelectedIndex(0);
}
public UIHeadGroup(String[] textArray) {
labelButtonList = new ArrayList<UIToggleButton>(textArray.length);
this.setBackground(UIConstants.NORMAL_BACKGROUND);
this.setLayout(new GridLayout(0, textArray.length, 1, 0));
// this.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
for (int i = 0; i < textArray.length; i++) {
final int index = i;
String text = textArray[i];
final UIToggleButton labelButton = new UIToggleButton(text) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
setSelectedIndex(index);
UIHeadGroup.this.repaint();
}
};
}
};
initButton(labelButton);
}
setSelectedIndex(0);
}
public UIHeadGroup(Icon[] iconArray) {
labelButtonList = new ArrayList<UIToggleButton>(iconArray.length);
this.setBackground(UIConstants.NORMAL_BACKGROUND);
this.setLayout(new GridLayout(0, iconArray.length, 1, 0));
// this.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
for (int i = 0; i < iconArray.length; i++) {
final int index = i;
Icon icon = iconArray[i];
final UIToggleButton labelButton = new UIToggleButton(icon) {
@Override
protected MouseListener getMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
setSelectedIndex(index);
UIHeadGroup.this.repaint();
}
};
}
};
initButton(labelButton);
}
setSelectedIndex(0);
}
public UIHeadGroup(Icon[] iconArray, String[] textArray) {
labelButtonList = new ArrayList<UIToggleButton>(Math.min(textArray.length, iconArray.length));
this.setBackground(UIConstants.NORMAL_BACKGROUND);
this.setLayout(new GridLayout(0, textArray.length, 1, 0));
this.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
for(int i = 0; i < textArray.length; i++) {
for (int i = 0; i < textArray.length; i++) {
final int index = i;
String text = textArray[i];
Icon icon = iconArray[i];
@ -104,87 +96,87 @@ public class UIHeadGroup extends JPanel{
setSelectedIndex(0);
}
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = 25;
return dim;
}
@Override
protected void paintBorder(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
g2d.setColor(UIConstants.LINE_COLOR);
int width = 0;
for(int i = 0; i < labelButtonList.size() - 1; i++) {
int height = labelButtonList.get(i).getHeight();
width += labelButtonList.get(i).getWidth() + 1;
g.drawLine(width, 0, width, height);
}
width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1;
if(isNeedLeftRightOutLine) {
g2d.drawRect(0, 0, width, getHeight() - 1);
} else {
g2d.drawLine(1, 0, width - 1, 0);
g2d.drawLine(1, getHeight() - 1, width - 1, getHeight() - 1);
}
g2d.setColor(UIConstants.NORMAL_BACKGROUND);
UIToggleButton headButton = labelButtonList.get(selectedIndex);
g2d.drawLine(headButton.getX(), headButton.getHeight() + 1, headButton.getX() + headButton.getWidth() - 1, headButton.getHeight() + 1);
}
private void initButton(UIToggleButton labelButton) {
labelButton.setRoundBorder(false);
labelButton.setBorderPainted(false);
labelButton.setPressedPainted(false);
labelButtonList.add(labelButton);
this.add(labelButton);
}
public void setSelectedIndex(int newSelectedIndex) {
selectedIndex = newSelectedIndex;
for (int i = 0; i < labelButtonList.size(); i++) {
UIToggleButton button = labelButtonList.get(i);
if(i == selectedIndex) {
button.setNormalPainted(false);
button.setOpaque(true);
button.setBackground(null);
button.setSelected(true);
} else {
button.setOpaque(false);
button.setNormalPainted(true);
button.setSelected(false);
}
}
tabChanged(newSelectedIndex);
}
public void setNeedLeftRightOutLine(boolean isNeedLeftRightOutLine) {
this.isNeedLeftRightOutLine = isNeedLeftRightOutLine;
}
public int getSelectedIndex() {
return selectedIndex;
}
public static void main(String... args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel)jf.getContentPane();
content.setLayout(null);
Icon[] a1 = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
UIHeadGroup bb = new UIHeadGroup(a1);
bb.setBounds(20, 20, bb.getPreferredSize().width, bb.getPreferredSize().height);
bb.setSelectedIndex(0);
content.add(bb);
GUICoreUtils.centerWindow(jf);
jf.setSize(400, 400);
jf.setVisible(true);
}
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = 25;
return dim;
}
@Override
protected void paintBorder(Graphics g) {
// Graphics2D g2d = (Graphics2D)g;
// g2d.setColor(UIConstants.LINE_COLOR);
//
// int width = 0;
// for(int i = 0; i < labelButtonList.size() - 1; i++) {
// int height = labelButtonList.get(i).getHeight();
// width += labelButtonList.get(i).getWidth() + 1;
// g.drawLine(width, 0, width, height);
// }
//
// width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1;
// if(isNeedLeftRightOutLine) {
// g2d.drawRect(0, 0, width, getHeight() - 1);
// } else {
// g2d.drawLine(1, 0, width - 1, 0);
// g2d.drawLine(1, getHeight() - 1, width - 1, getHeight() - 1);
// }
//
//
// g2d.setColor(UIConstants.NORMAL_BACKGROUND);
// UIToggleButton headButton = labelButtonList.get(selectedIndex);
// g2d.drawLine(headButton.getX(), headButton.getHeight() + 1, headButton.getX() + headButton.getWidth() - 1, headButton.getHeight() + 1);
}
private void initButton(UIToggleButton labelButton) {
labelButton.setRoundBorder(false);
labelButton.setBorderPainted(false);
labelButton.setPressedPainted(false);
labelButtonList.add(labelButton);
this.add(labelButton);
}
public void setSelectedIndex(int newSelectedIndex) {
selectedIndex = newSelectedIndex;
for (int i = 0; i < labelButtonList.size(); i++) {
UIToggleButton button = labelButtonList.get(i);
if (i == selectedIndex) {
button.setNormalPainted(false);
button.setBackground(new Color(240, 240, 243));
button.setOpaque(true);
button.setSelected(true);
} else {
button.setOpaque(false);
button.setNormalPainted(true);
button.setSelected(false);
}
}
tabChanged(newSelectedIndex);
}
public void setNeedLeftRightOutLine(boolean isNeedLeftRightOutLine) {
this.isNeedLeftRightOutLine = isNeedLeftRightOutLine;
}
public int getSelectedIndex() {
return selectedIndex;
}
public static void main(String... args) {
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane();
content.setLayout(null);
Icon[] a1 = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
UIHeadGroup bb = new UIHeadGroup(a1);
bb.setBounds(20, 20, bb.getPreferredSize().width, bb.getPreferredSize().height);
bb.setSelectedIndex(0);
content.add(bb);
GUICoreUtils.centerWindow(jf);
jf.setSize(400, 400);
jf.setVisible(true);
}
}

2
designer_base/src/com/fr/design/gui/ibutton/UITabButton.java

@ -157,7 +157,7 @@ public class UITabButton extends UILabel implements UISelectedComponent {
GradientPaint gp = new GradientPaint(1, 1, darkColor, 1, 5, lightColor);
g2d.setPaint(gp);
g2d.fillRect(0, 0, w - 1, h);
this.setForeground(Color.white);
this.setForeground(Color.WHITE);
} else if (!isSelected() && isRollover) {
Color blue = UIConstants.LIGHT_BLUE;
g2d.setColor(blue);

2
designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -99,7 +99,7 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
if (hasFocus && !isPopupVisible(comboBox)) {
if (comboBox.isEnabled()) {
c.setForeground(Color.black);
c.setBackground(Color.white);
c.setBackground(Color.WHITE);
} else {
c.setForeground(DefaultLookup.getColor(
comboBox, this, "ComboBox.disabledForeground", comboBox.getForeground()));

2
designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -99,7 +99,7 @@ public class UIEastResizableContainer extends JPanel {
UIEastResizableContainer bb = new UIEastResizableContainer(leftPane, rightPane);
JPanel cc = new JPanel();
cc.setBackground(Color.white);
cc.setBackground(Color.WHITE);
content.add(bb, BorderLayout.EAST);
content.add(cc, BorderLayout.CENTER);

4
designer_base/src/com/fr/design/gui/icontainer/UIScrollPane.java

@ -19,6 +19,10 @@ public class UIScrollPane extends JScrollPane {
this.setHorizontalScrollBar(createHorizontalScrollBar());
this.getVerticalScrollBar().setUnitIncrement(30);
this.getVerticalScrollBar().setBlockIncrement(30);
this.getHorizontalScrollBar().setOpaque(true);
this.getHorizontalScrollBar().setBackground(Color.WHITE);
this.getVerticalScrollBar().setOpaque(true);
this.getVerticalScrollBar().setBackground(Color.WHITE);
}
@Override

3
designer_base/src/com/fr/design/gui/icontainer/UIScrollPaneUI.java

@ -4,6 +4,7 @@ import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.metal.MetalScrollBarUI;
import javax.swing.plaf.metal.MetalScrollPaneUI;
import java.awt.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
@ -35,11 +36,13 @@ public class UIScrollPaneUI extends MetalScrollPaneUI implements PropertyChangeL
// Note: It never happened before Java 1.5 that scrollbar is null
JScrollBar sb = scrollpane.getHorizontalScrollBar();
if (sb != null) {
sb.setBackground(Color.red);
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
}
sb = scrollpane.getVerticalScrollBar();
if (sb != null) {
sb.setBackground(Color.red);
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
}
}

2
designer_base/src/com/fr/design/gui/imenu/UIMenuHighLight.java

@ -13,7 +13,7 @@ public class UIMenuHighLight extends JPanel{
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = 2;
dim.height = 0;
return dim;
}
public void paint(Graphics g) {

3
designer_base/src/com/fr/design/gui/iscrollbar/UIScrollBarUI.java

@ -467,8 +467,7 @@ public class UIScrollBarUI extends ScrollBarUI implements LayoutManager, SwingCo
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.translate(thumbBounds.x, thumbBounds.y);
Color color = isDragging ? UIConstants.LINE_COLOR : UIConstants.BARNOMAL;
color = isPressing ? UIConstants.LINE_COLOR : UIConstants.BARNOMAL;
Color color = isPressing ? UIConstants.LINE_COLOR : UIConstants.BARNOMAL;
g2.setColor(color);
g2.fillRoundRect(1, 1, width - 2, height - 2, UIConstants.LARGEARC, UIConstants.LARGEARC);

7
designer_base/src/com/fr/design/gui/iscrollbar/UIScrollButton.java

@ -110,15 +110,8 @@ public class UIScrollButton extends BasicArrowButton {
} else {
scrollBarBg = new GradientPaint(1, 1, new Color(0xffffff), 1, 16, new Color(0xffffff));
}
// GradientPaint scrollBarHight = new GradientPaint(0, 0, new Color(1.0f, 1.0f, 1.0f, 0.5f), 0, 7, new Color(1.0f, 1.0f, 1.0f, 0.2f));
g2.setPaint(scrollBarBg);
g2.fillRoundRect(1, 1, 16, 16, 0, 0);
// g2.setPaint(scrollBarHight);
// g2.fillRoundRect(1, 1, 16, 7, 3, 3);
// g2.setColor(a);
// g2.drawRoundRect(1, 1, 15, 15, 3, 3);
// g2.setColor(new Color(240, 240, 240));
// g2.drawRoundRect(2, 2, 13, 13, 3, 3);
break;
}
// dispose of image graphics

2
designer_base/src/com/fr/design/gui/ispinner/UISpinner.java

@ -315,7 +315,7 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
g2d.fillRoundRect(1, 1, width - 2, height - 2, UIConstants.ARC, UIConstants.ARC);
if (isRollOver && isEnabled()) {
Shape shape = new RoundRectangle2D.Double(1, 1, width - 3, height - 3, UIConstants.ARC, UIConstants.ARC);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.white);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.WHITE);
} else {
g2d.setColor(UIConstants.LINE_COLOR);
g2d.drawRoundRect(1, 1, width - 2, height - 2, UIConstants.ARC, UIConstants.ARC);

2
designer_base/src/com/fr/design/gui/itextarea/UITextAreaUI.java

@ -46,7 +46,7 @@ public class UITextAreaUI extends BasicTextAreaUI {
g2d.clearRect(0, 0, width, height);
if(isRollOver && textField.isEnabled() && ((UITextArea)textField).isEditable()) {
Shape shape = new RoundRectangle2D.Double(1, 1, width - 3, height - 3, UIConstants.ARC, UIConstants.ARC);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.white);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.WHITE);
} else {
g2d.setColor(UIConstants.LINE_COLOR);
g2d.drawRoundRect(1, 1, width - 2, height - 2, UIConstants.ARC, UIConstants.ARC);

2
designer_base/src/com/fr/design/gui/itextfield/UITextFieldUI.java

@ -20,7 +20,7 @@ public class UITextFieldUI extends BasicTextFieldUI {
protected boolean isRollOver;
private JComponent textField;
private Color backgroundColor = Color.white;
private Color backgroundColor = Color.WHITE;
public UITextFieldUI(final JComponent textField) {
super();

2
designer_base/src/com/fr/design/gui/itoolbar/UIToolBarUI.java

@ -89,7 +89,7 @@ public class UIToolBarUI extends MetalToolBarUI {
*/
public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(UIConstants.NORMAL_BACKGROUND);
g2.setColor(UIConstants.TOOLBARUI_BACKGROUND);
g2.fillRect(0, 0, c.getWidth(), c.getHeight());
}

49
designer_base/src/com/fr/design/gui/itoolbar/UIToolbar.java

@ -1,33 +1,38 @@
package com.fr.design.gui.itoolbar;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import javax.swing.JToolBar;
public class UIToolbar extends JToolBar {
private static final int TOOLBAR_HEIGNT = 26;
public class UIToolbar extends JToolBar{
private static final int TOOLBAR_HEIGNT = 26;
public UIToolbar() {
this(FlowLayout.LEFT);
}
public UIToolbar() {
this(FlowLayout.LEFT);
}
public UIToolbar(int align, UIToolBarUI uiToolBarUI) {
super();
setFloatable(false);
setRollover(true);
setLayout(new FlowLayout(align, 4, 0));
setUI(uiToolBarUI);
setBorderPainted(false);
}
public UIToolbar(int align) {
super();
setFloatable(false);
setRollover(true);
setLayout(new FlowLayout(align, 4, 0));
setUI(new UIToolBarUI());
}
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = TOOLBAR_HEIGNT;
return dim;
}
public UIToolbar(int align) {
this(align, new UIToolBarUI());
}
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = TOOLBAR_HEIGNT;
return dim;
}
public void checkComponentsByNames (boolean flag, ArrayList<String> names) {
for (int i = 0; i < getComponentCount(); i ++) {
public void checkComponentsByNames(boolean flag, ArrayList<String> names) {
for (int i = 0; i < getComponentCount(); i++) {
Component component = getComponents()[i];
if (names.contains(component.getName())) {
component.setEnabled(flag);

8
designer_base/src/com/fr/design/gui/itooltip/UIToolTipUI.java

@ -34,13 +34,13 @@ public class UIToolTipUI extends ToolTipUI {
int height = size.height;
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
GradientPaint paint = new GradientPaint(0, 0, new Color(240, 240, 240), 0, height ,new Color(171, 183, 203));
GradientPaint paint = new GradientPaint(0, 0, new Color(212, 212, 216), 0, height ,new Color(171, 183, 203));
g2.setPaint(paint);
g2.fillRoundRect(0, 0, width - 3, height - 3, 6, 6);
g2.setColor(new Color(100, 100, 100));
g2.drawRoundRect(0, 0, width - 3, height - 3, 6, 6);
GradientPaint cornerPaint = new GradientPaint(width-3, height-3, new Color(100, 100, 100, 191), width - 1, height - 1, new Color(240, 240, 240));
GradientPaint cornerPaint = new GradientPaint(width-3, height-3, new Color(100, 100, 100, 191), width - 1, height - 1, new Color(212, 212, 216));
g2.setPaint(cornerPaint);
g2.fillArc(width - 6, height - 6, 6, 6, 270, 90 );
@ -49,7 +49,7 @@ public class UIToolTipUI extends ToolTipUI {
shadowDown.lineTo(3, height);
shadowDown.lineTo(width - 3, height);
shadowDown.lineTo(width - 3, height - 3);
GradientPaint downPaint = new GradientPaint(0, height-3, new Color(100, 100, 100, 191), 0, height, new Color(240, 240, 240));
GradientPaint downPaint = new GradientPaint(0, height-3, new Color(100, 100, 100, 191), 0, height, new Color(212, 212, 216));
g2.setPaint(downPaint);
GraphHelper.fill(g2, shadowDown);
@ -58,7 +58,7 @@ public class UIToolTipUI extends ToolTipUI {
shadowRight.lineTo(width, height - 3);
shadowRight.lineTo(width, 3);
shadowRight.lineTo(width - 3, 0);
GradientPaint rightPaint = new GradientPaint(width - 3, 0, new Color(100, 100, 100, 191), width, 0, new Color(240, 240, 240));
GradientPaint rightPaint = new GradientPaint(width - 3, 0, new Color(100, 100, 100, 191), width, 0, new Color(212, 212, 216));
g2.setPaint(rightPaint);
GraphHelper.fill(g2, shadowRight);

22
designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -106,7 +106,7 @@ public class EnvFileTree extends RefreshableJTree {
Dimension dim = label.getPreferredSize();
dim.height += 2;
this.setPreferredSize(dim);
this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND);
this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND);
this.setForeground(UIConstants.FONT_COLOR);
this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE);
return this;
@ -327,18 +327,18 @@ public class EnvFileTree extends RefreshableJTree {
/*
* 把FileNode[]转成ExpandMutableTreeNode[]
*/
private ExpandMutableTreeNode[] fileNodeArray2TreeNodeArray(FileNode[] fn_array) {
ExpandMutableTreeNode[] res = new ExpandMutableTreeNode[fn_array.length];
for (int i = 0; i < res.length; i++) {
FileNode fn = fn_array[i];
res[i] = new ExpandMutableTreeNode(fn);
if (fn.isDirectory()) {
res[i].add(new ExpandMutableTreeNode());
private ExpandMutableTreeNode[] fileNodeArray2TreeNodeArray(FileNode[] fn_array) {
ExpandMutableTreeNode[] res = new ExpandMutableTreeNode[fn_array.length];
for (int i = 0; i < res.length; i++) {
FileNode fn = fn_array[i];
res[i] = new ExpandMutableTreeNode(fn);
if (fn.isDirectory()) {
res[i].add(new ExpandMutableTreeNode());
}
}
}
return res;
}
return res;
}
/*
* 是否是父子关系的文件.

2
designer_base/src/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java

@ -40,7 +40,7 @@ public abstract class RefreshableJTree extends CheckBoxTree {
ExpandMutableTreeNode root = (ExpandMutableTreeNode) model.getRoot();
root.setExpanded(true);
this.setRootVisible(false);
this.setBackground(UIConstants.NORMAL_BACKGROUND);
this.setBackground(UIConstants.TREE_BACKGROUND);
this.addTreeExpansionListener(expansion);
this.addTreeWillExpandListener(willExpand);
}

4
designer_base/src/com/fr/design/gui/syntax/ui/rtextarea/ConfigurableCaret.java

@ -422,7 +422,7 @@ public class ConfigurableCaret extends DefaultCaret {
case BLOCK_STYLE:
Color textAreaBg = textArea.getBackground();
if (textAreaBg==null) {
textAreaBg = Color.white;
textAreaBg = Color.WHITE;
}
g.setXORMode(textAreaBg);
// fills x==r.x to x==(r.x+(r.width)-1), inclusive.
@ -439,7 +439,7 @@ public class ConfigurableCaret extends DefaultCaret {
case UNDERLINE_STYLE:
textAreaBg = textArea.getBackground();
if (textAreaBg==null) {
textAreaBg = Color.white;
textAreaBg = Color.WHITE;
}
g.setXORMode(textAreaBg);
int y = r.y + r.height;

4
designer_base/src/com/fr/design/gui/syntax/ui/rtextarea/FoldIndicator.java

@ -92,7 +92,7 @@ public class FoldIndicator extends AbstractGutterComponent {
/**
* The default color used to paint the "inside" of fold icons.
*/
static final Color DEFAULT_FOLD_BACKGROUND = Color.white;
static final Color DEFAULT_FOLD_BACKGROUND = Color.WHITE;
/**
* Listens for events in this component.
@ -128,7 +128,7 @@ public class FoldIndicator extends AbstractGutterComponent {
public JToolTip createToolTip() {
JToolTip tip = super.createToolTip();
Color textAreaBG = textArea.getBackground();
if (textAreaBG!=null && !Color.white.equals(textAreaBG)) {
if (textAreaBG!=null && !Color.WHITE.equals(textAreaBG)) {
Color bg = TipUtil.getToolTipBackground();
// If current L&F's tool tip color is close enough to "yellow",
// and we're not using the default text background of white, use

BIN
designer_base/src/com/fr/design/images/buttonicon/add.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 453 B

BIN
designer_base/src/com/fr/design/images/buttonicon/addicon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 216 B

BIN
designer_base/src/com/fr/design/images/buttonicon/additicon_grey.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 208 B

BIN
designer_base/src/com/fr/design/images/buttonicon/anab24.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 695 B

BIN
designer_base/src/com/fr/design/images/buttonicon/anas.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 412 B

BIN
designer_base/src/com/fr/design/images/buttonicon/arrow.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 191 B

BIN
designer_base/src/com/fr/design/images/buttonicon/arrowdown.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 191 B

BIN
designer_base/src/com/fr/design/images/buttonicon/arrowup.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 200 B

BIN
designer_base/src/com/fr/design/images/buttonicon/bind_ds_column.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 270 B

BIN
designer_base/src/com/fr/design/images/buttonicon/button_0.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 B

After

Width:  |  Height:  |  Size: 623 B

BIN
designer_base/src/com/fr/design/images/buttonicon/cell.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 159 B

BIN
designer_base/src/com/fr/design/images/buttonicon/cell_group.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 166 B

BIN
designer_base/src/com/fr/design/images/buttonicon/close_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 259 B

BIN
designer_base/src/com/fr/design/images/buttonicon/column.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 143 B

BIN
designer_base/src/com/fr/design/images/buttonicon/config.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 439 B

BIN
designer_base/src/com/fr/design/images/buttonicon/cube.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 688 B

BIN
designer_base/src/com/fr/design/images/buttonicon/delete.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 514 B

BIN
designer_base/src/com/fr/design/images/buttonicon/ds_column.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 270 B

BIN
designer_base/src/com/fr/design/images/buttonicon/dscolumn.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 143 B

BIN
designer_base/src/com/fr/design/images/buttonicon/editn.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 700 B

BIN
designer_base/src/com/fr/design/images/buttonicon/editp.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 675 B

BIN
designer_base/src/com/fr/design/images/buttonicon/hiden.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
designer_base/src/com/fr/design/images/buttonicon/hidep.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
designer_base/src/com/fr/design/images/buttonicon/list_normal.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1020 B

After

Width:  |  Height:  |  Size: 229 B

BIN
designer_base/src/com/fr/design/images/buttonicon/minus.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 121 B

BIN
designer_base/src/com/fr/design/images/buttonicon/more.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 481 B

BIN
designer_base/src/com/fr/design/images/buttonicon/more2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 463 B

BIN
designer_base/src/com/fr/design/images/buttonicon/more3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 532 B

BIN
designer_base/src/com/fr/design/images/buttonicon/more4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 473 B

BIN
designer_base/src/com/fr/design/images/buttonicon/mouseoverclose icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 559 B

BIN
designer_base/src/com/fr/design/images/buttonicon/newcpts.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 221 B

BIN
designer_base/src/com/fr/design/images/buttonicon/open.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 359 B

BIN
designer_base/src/com/fr/design/images/buttonicon/pageb24.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 739 B

BIN
designer_base/src/com/fr/design/images/buttonicon/pages.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

After

Width:  |  Height:  |  Size: 414 B

BIN
designer_base/src/com/fr/design/images/buttonicon/parameter.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 388 B

BIN
designer_base/src/com/fr/design/images/buttonicon/plus.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 169 B

BIN
designer_base/src/com/fr/design/images/buttonicon/pressclose icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 589 B

BIN
designer_base/src/com/fr/design/images/buttonicon/prevew_down_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 139 B

BIN
designer_base/src/com/fr/design/images/buttonicon/prewidget.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 396 B

BIN
designer_base/src/com/fr/design/images/buttonicon/redo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 424 B

BIN
designer_base/src/com/fr/design/images/buttonicon/refresh.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 533 B

BIN
designer_base/src/com/fr/design/images/buttonicon/save.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 231 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save