Browse Source

无JIRA任务。调整代码。

master
plough 8 years ago
parent
commit
f2d5c68c8e
  1. 2
      designer_base/src/com/fr/design/locale/designer.properties
  2. 2
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  3. 3
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  4. 4
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  5. 2
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  6. 2
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  7. 9
      designer_base/src/com/fr/design/style/color/ColorPicker.java
  8. 4
      designer_base/src/com/fr/design/style/color/ColorSelectDialog.java
  9. 33
      designer_base/src/com/fr/design/style/color/ColorSelectPane.java

2
designer_base/src/com/fr/design/locale/designer.properties

@ -487,3 +487,5 @@ FR-Designer-LayerPageReport_PageQuery=
FR-Designer-LayerPageReport_Define_PageQuerySQL= FR-Designer-LayerPageReport_Define_PageQuerySQL=
FR-Designer_Event= FR-Designer_Event=
FR-Designer_Properties= FR-Designer_Properties=
FR-Designer_Button_OK=OK
FR-Designer_Button_Cancel=Cancel

2
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -487,3 +487,5 @@ FR-Designer_Is_Share_DBTableData=Shared data set
FR-Designer_Event=Event FR-Designer_Event=Event
FR-Designer_Properties=Properties FR-Designer_Properties=Properties
FR-Designer_Properties_Mobile=MobileProperties FR-Designer_Properties_Mobile=MobileProperties
FR-Designer_Button_OK=OK
FR-Designer_Button_Cancel=Cancel

3
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -466,3 +466,6 @@ FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C
FR-Designer_Event=\ FR-Designer_Event=\
FR-Designer_Properties=FR-Designer_Properties=\ FR-Designer_Properties=FR-Designer_Properties=\
\ \
FR-Designer_Button_OK=FR-Designer_Button_OK=\u78BA\u5B9A
FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB
\

4
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -460,4 +460,6 @@ FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720
FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30
FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql
FR-Designer_Event=\ FR-Designer_Event=\
FR-Designer_Properties=\ FR-Designer_Properties=\uFFFD
FR-Designer_Button_OK=\uD655\uC778FR-Designer_Button_Cancel=\uCDE8\uC18C
\

2
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -491,3 +491,5 @@ FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6
FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Event=\u4E8B\u4EF6
FR-Designer_Properties=\u5C5E\u6027 FR-Designer_Properties=\u5C5E\u6027
FR-Designer_Properties_Mobile=\u624B\u673A\u5C5E\u6027 FR-Designer_Properties_Mobile=\u624B\u673A\u5C5E\u6027
FR-Designer_Button_OK=\u786E\u5B9A
FR-Designer_Button_Cancel=\u53D6\u6D88

2
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -479,3 +479,5 @@ FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6
FR-Designer_Properties=\u5C6C\u6027 FR-Designer_Properties=\u5C6C\u6027
FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Event=\u4E8B\u4EF6
FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027 FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027
FR-Designer_Button_OK=\u78BA\u5B9A
FR-Designer_Button_Cancel=\u53D6\u6D88

9
designer_base/src/com/fr/design/style/color/ColorPicker.java

@ -50,11 +50,11 @@ public class ColorPicker extends JDialog implements ActionListener
this.setAlwaysOnTop(true); this.setAlwaysOnTop(true);
this.setVisible(true); this.setVisible(true);
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
System.out.println("Construced ColorPicker.");
} }
public void start() { public void start() {
timer = new Timer(1000/FPS, this); int timeCycle = 1000 / FPS;
timer = new Timer(timeCycle, this);
timer.start(); timer.start();
hideCursor(); hideCursor();
// System.out.println(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow()); // System.out.println(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow());
@ -160,8 +160,9 @@ class ColorPickerPanel extends JPanel
public Color getPixelColor(Point mousePos) { public Color getPixelColor(Point mousePos) {
int rgb = screenImage.getRGB(mousePos.x, mousePos.y); int rgb = screenImage.getRGB(mousePos.x, mousePos.y);
int R = (rgb & 0xff0000) >> 16; int shiftStep = 8; // 右移的比特位
int G = (rgb & 0xff00) >> 8; int R = (rgb & 0xff0000) >> shiftStep * 2;
int G = (rgb & 0xff00) >> shiftStep;
int B = (rgb & 0xff); int B = (rgb & 0xff);
return new Color(R, G, B); return new Color(R, G, B);
} }

4
designer_base/src/com/fr/design/style/color/ColorSelectDialog.java

@ -91,8 +91,8 @@ public class ColorSelectDialog extends MiddleChartDialog{
this.add(buttonPane, BorderLayout.SOUTH); this.add(buttonPane, BorderLayout.SOUTH);
ok = new UIButton(Inter.getLocText("OK")); ok = new UIButton(Inter.getLocText("FR-Designer_Button_OK"));
cancel = new UIButton(Inter.getLocText("Cancel")); cancel = new UIButton(Inter.getLocText("FR-Designer_Button_Cancel"));
buttonPane.add(ok); buttonPane.add(ok);
buttonPane.add(cancel); buttonPane.add(cancel);

33
designer_base/src/com/fr/design/style/color/ColorSelectPane.java

@ -69,21 +69,7 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
// 第一行,1个取色按钮 + 7个最近使用的颜色 centerPane.add(getRow1Pane());
JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout());
row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0));
row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7
centerPane.add(row1Pane);
// 取色按钮
PickColorButton pickColorButton = new PickColorButton(this, PickColorButton.IconType.ICON16, true);
row1Pane.add(pickColorButton, BorderLayout.WEST);
// 最近使用
UsedColorPane usedColorPane = new UsedColorPane(1, 7, ColorSelectConfigManager.getInstance().getColors(),this);
usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 8));
row1Pane.add(usedColorPane.getPane());
JPanel menuColorPane1 = new JPanel(); JPanel menuColorPane1 = new JPanel();
centerPane.add(menuColorPane1); centerPane.add(menuColorPane1);
@ -113,6 +99,23 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable
centerPane.add(centerPane1); centerPane.add(centerPane1);
} }
// 第一行,1个取色按钮 + 7个最近使用的颜色
private JPanel getRow1Pane() {
JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout());
row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0));
row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7
// 取色按钮
PickColorButton pickColorButton = new PickColorButton(this, PickColorButton.IconType.ICON16, true);
row1Pane.add(pickColorButton, BorderLayout.WEST);
// 最近使用
UsedColorPane usedColorPane = new UsedColorPane(1, 7, ColorSelectConfigManager.getInstance().getColors(),this);
usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 8));
row1Pane.add(usedColorPane.getPane());
return row1Pane;
}
protected Color[] getColorArray(){ protected Color[] getColorArray(){
return ColorFactory.MenuColors; return ColorFactory.MenuColors;
} }

Loading…
Cancel
Save