|
|
|
@ -3,10 +3,7 @@
|
|
|
|
|
*/ |
|
|
|
|
package com.fr.design.style.color; |
|
|
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Cursor; |
|
|
|
|
import java.awt.GridLayout; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
@ -71,10 +68,22 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable
|
|
|
|
|
// center
|
|
|
|
|
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); |
|
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 第一行,1个取色按钮 + 7个最近使用的颜色
|
|
|
|
|
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 pane = new UsedColorPane(1, 8, ColorSelectConfigManager.getInstance().getColors(),this); |
|
|
|
|
centerPane.add(pane.getPane()); |
|
|
|
|
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(); |
|
|
|
|
centerPane.add(menuColorPane1); |
|
|
|
|