|
|
@ -14,7 +14,11 @@ import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.file.HistoryTemplateListPane; |
|
|
|
import com.fr.design.file.HistoryTemplateListPane; |
|
|
|
import com.fr.design.formula.TinyFormulaPane; |
|
|
|
import com.fr.design.formula.TinyFormulaPane; |
|
|
|
import com.fr.design.gui.frpane.UINumberDragPane; |
|
|
|
import com.fr.design.gui.frpane.UINumberDragPane; |
|
|
|
import com.fr.design.gui.ibutton.*; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIButtonUI; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIColorButton; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIToggleButton; |
|
|
|
import com.fr.design.gui.icombobox.LineComboBox; |
|
|
|
import com.fr.design.gui.icombobox.LineComboBox; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
@ -37,15 +41,35 @@ import com.fr.general.FRFont; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.AbstractButton; |
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
|
|
|
import javax.swing.ButtonGroup; |
|
|
|
|
|
|
|
import javax.swing.ButtonModel; |
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import javax.swing.JToggleButton; |
|
|
|
import javax.swing.border.Border; |
|
|
|
import javax.swing.border.Border; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
import javax.swing.event.DocumentEvent; |
|
|
|
import javax.swing.event.DocumentEvent; |
|
|
|
import javax.swing.event.DocumentListener; |
|
|
|
import javax.swing.event.DocumentListener; |
|
|
|
import javax.swing.plaf.basic.BasicToggleButtonUI; |
|
|
|
import javax.swing.plaf.basic.BasicToggleButtonUI; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.event.*; |
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
|
|
|
|
import java.awt.Font; |
|
|
|
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
|
|
|
import java.awt.RenderingHints; |
|
|
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
import java.awt.event.ItemEvent; |
|
|
|
|
|
|
|
import java.awt.event.ItemListener; |
|
|
|
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
import java.awt.geom.RoundRectangle2D; |
|
|
|
import java.awt.geom.RoundRectangle2D; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -97,47 +121,47 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
private int minNumber = 0; |
|
|
|
private int minNumber = 0; |
|
|
|
private double maxNumber = 100; |
|
|
|
private double maxNumber = 100; |
|
|
|
private int iconWidth = 32; |
|
|
|
private int iconWidth = 32; |
|
|
|
|
|
|
|
|
|
|
|
public LayoutBorderStyle getBorderStyle() { |
|
|
|
public LayoutBorderStyle getBorderStyle() { |
|
|
|
return borderStyle; |
|
|
|
return borderStyle; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setBorderStyle(LayoutBorderStyle borderStyle) { |
|
|
|
public void setBorderStyle(LayoutBorderStyle borderStyle) { |
|
|
|
this.borderStyle = borderStyle; |
|
|
|
this.borderStyle = borderStyle; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public LayoutBorderPreviewPane getLayoutBorderPreviewPane() { |
|
|
|
public LayoutBorderPreviewPane getLayoutBorderPreviewPane() { |
|
|
|
return layoutBorderPreviewPane; |
|
|
|
return layoutBorderPreviewPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setLayoutBorderPreviewPane( |
|
|
|
public void setLayoutBorderPreviewPane( |
|
|
|
LayoutBorderPreviewPane layoutBorderPreviewPane) { |
|
|
|
LayoutBorderPreviewPane layoutBorderPreviewPane) { |
|
|
|
this.layoutBorderPreviewPane = layoutBorderPreviewPane; |
|
|
|
this.layoutBorderPreviewPane = layoutBorderPreviewPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIComboBox getBorderTypeCombo() { |
|
|
|
public UIComboBox getBorderTypeCombo() { |
|
|
|
return borderTypeCombo; |
|
|
|
return borderTypeCombo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setBorderTypeCombo(UIComboBox borderTypeCombo) { |
|
|
|
public void setBorderTypeCombo(UIComboBox borderTypeCombo) { |
|
|
|
this.borderTypeCombo = borderTypeCombo; |
|
|
|
this.borderTypeCombo = borderTypeCombo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIComboBox getBorderStyleCombo() { |
|
|
|
public UIComboBox getBorderStyleCombo() { |
|
|
|
return borderStyleCombo; |
|
|
|
return borderStyleCombo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setBorderStyleCombo(UIComboBox borderStyleCombo) { |
|
|
|
public void setBorderStyleCombo(UIComboBox borderStyleCombo) { |
|
|
|
this.borderStyleCombo = borderStyleCombo; |
|
|
|
this.borderStyleCombo = borderStyleCombo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public LineComboBox getCurrentLineCombo() { |
|
|
|
public LineComboBox getCurrentLineCombo() { |
|
|
|
return currentLineCombo; |
|
|
|
return currentLineCombo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setCurrentLineCombo(LineComboBox currentLineCombo) { |
|
|
|
public void setCurrentLineCombo(LineComboBox currentLineCombo) { |
|
|
|
this.currentLineCombo = currentLineCombo; |
|
|
|
this.currentLineCombo = currentLineCombo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public UISpinner getBorderCornerSpinner() { |
|
|
|
public UISpinner getBorderCornerSpinner() { |
|
|
@ -150,162 +174,162 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public UIColorButton getCurrentLineColorPane() { |
|
|
|
public UIColorButton getCurrentLineColorPane() { |
|
|
|
return currentLineColorPane; |
|
|
|
return currentLineColorPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setCurrentLineColorPane(UIColorButton currentLineColorPane) { |
|
|
|
public void setCurrentLineColorPane(UIColorButton currentLineColorPane) { |
|
|
|
this.currentLineColorPane = currentLineColorPane; |
|
|
|
this.currentLineColorPane = currentLineColorPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public BackgroundSpecialPane getBackgroundPane() { |
|
|
|
public BackgroundSpecialPane getBackgroundPane() { |
|
|
|
return backgroundPane; |
|
|
|
return backgroundPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setBackgroundPane(BackgroundSpecialPane backgroundPane) { |
|
|
|
public void setBackgroundPane(BackgroundSpecialPane backgroundPane) { |
|
|
|
this.backgroundPane = backgroundPane; |
|
|
|
this.backgroundPane = backgroundPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UINumberDragPane getNumberDragPane() { |
|
|
|
public UINumberDragPane getNumberDragPane() { |
|
|
|
return numberDragPane; |
|
|
|
return numberDragPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setNumberDragPane(UINumberDragPane numberDragPane) { |
|
|
|
public void setNumberDragPane(UINumberDragPane numberDragPane) { |
|
|
|
this.numberDragPane = numberDragPane; |
|
|
|
this.numberDragPane = numberDragPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public TinyFormulaPane getFormulaPane() { |
|
|
|
public TinyFormulaPane getFormulaPane() { |
|
|
|
return formulaPane; |
|
|
|
return formulaPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setFormulaPane(TinyFormulaPane formulaPane) { |
|
|
|
public void setFormulaPane(TinyFormulaPane formulaPane) { |
|
|
|
this.formulaPane = formulaPane; |
|
|
|
this.formulaPane = formulaPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIComboBox getFontNameComboBox() { |
|
|
|
public UIComboBox getFontNameComboBox() { |
|
|
|
return fontNameComboBox; |
|
|
|
return fontNameComboBox; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setFontNameComboBox(UIComboBox fontNameComboBox) { |
|
|
|
public void setFontNameComboBox(UIComboBox fontNameComboBox) { |
|
|
|
this.fontNameComboBox = fontNameComboBox; |
|
|
|
this.fontNameComboBox = fontNameComboBox; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIComboBox getFontSizeComboBox() { |
|
|
|
public UIComboBox getFontSizeComboBox() { |
|
|
|
return fontSizeComboBox; |
|
|
|
return fontSizeComboBox; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setFontSizeComboBox(UIComboBox fontSizeComboBox) { |
|
|
|
public void setFontSizeComboBox(UIComboBox fontSizeComboBox) { |
|
|
|
this.fontSizeComboBox = fontSizeComboBox; |
|
|
|
this.fontSizeComboBox = fontSizeComboBox; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIColorButton getColorSelectPane() { |
|
|
|
public UIColorButton getColorSelectPane() { |
|
|
|
return colorSelectPane; |
|
|
|
return colorSelectPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setColorSelectPane(UIColorButton colorSelectPane) { |
|
|
|
public void setColorSelectPane(UIColorButton colorSelectPane) { |
|
|
|
this.colorSelectPane = colorSelectPane; |
|
|
|
this.colorSelectPane = colorSelectPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIToggleButton getBold() { |
|
|
|
public UIToggleButton getBold() { |
|
|
|
return bold; |
|
|
|
return bold; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setBold(UIToggleButton bold) { |
|
|
|
public void setBold(UIToggleButton bold) { |
|
|
|
this.bold = bold; |
|
|
|
this.bold = bold; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIToggleButton getItalic() { |
|
|
|
public UIToggleButton getItalic() { |
|
|
|
return italic; |
|
|
|
return italic; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setItalic(UIToggleButton italic) { |
|
|
|
public void setItalic(UIToggleButton italic) { |
|
|
|
this.italic = italic; |
|
|
|
this.italic = italic; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIToggleButton getUnderline() { |
|
|
|
public UIToggleButton getUnderline() { |
|
|
|
return underline; |
|
|
|
return underline; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setUnderline(UIToggleButton underline) { |
|
|
|
public void setUnderline(UIToggleButton underline) { |
|
|
|
this.underline = underline; |
|
|
|
this.underline = underline; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public LineComboBox getUnderlineCombo() { |
|
|
|
public LineComboBox getUnderlineCombo() { |
|
|
|
return underlineCombo; |
|
|
|
return underlineCombo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setUnderlineCombo(LineComboBox underlineCombo) { |
|
|
|
public void setUnderlineCombo(LineComboBox underlineCombo) { |
|
|
|
this.underlineCombo = underlineCombo; |
|
|
|
this.underlineCombo = underlineCombo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIButtonGroup gethAlignmentPane() { |
|
|
|
public UIButtonGroup gethAlignmentPane() { |
|
|
|
return hAlignmentPane; |
|
|
|
return hAlignmentPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void sethAlignmentPane(UIButtonGroup hAlignmentPane) { |
|
|
|
public void sethAlignmentPane(UIButtonGroup hAlignmentPane) { |
|
|
|
this.hAlignmentPane = hAlignmentPane; |
|
|
|
this.hAlignmentPane = hAlignmentPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public BackgroundNoImagePane getTitleBackgroundPane() { |
|
|
|
public BackgroundNoImagePane getTitleBackgroundPane() { |
|
|
|
return titleBackgroundPane; |
|
|
|
return titleBackgroundPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setTitleBackgroundPane(BackgroundNoImagePane titleBackgroundPane) { |
|
|
|
public void setTitleBackgroundPane(BackgroundNoImagePane titleBackgroundPane) { |
|
|
|
this.titleBackgroundPane = titleBackgroundPane; |
|
|
|
this.titleBackgroundPane = titleBackgroundPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public UIScrollPane getTitlePane() { |
|
|
|
public UIScrollPane getTitlePane() { |
|
|
|
return titlePane; |
|
|
|
return titlePane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setTitlePane(UIScrollPane titlePane) { |
|
|
|
public void setTitlePane(UIScrollPane titlePane) { |
|
|
|
this.titlePane = titlePane; |
|
|
|
this.titlePane = titlePane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getMinNumber() { |
|
|
|
public int getMinNumber() { |
|
|
|
return minNumber; |
|
|
|
return minNumber; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setMinNumber(int minNumber) { |
|
|
|
public void setMinNumber(int minNumber) { |
|
|
|
this.minNumber = minNumber; |
|
|
|
this.minNumber = minNumber; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public double getMaxNumber() { |
|
|
|
public double getMaxNumber() { |
|
|
|
return maxNumber; |
|
|
|
return maxNumber; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setMaxNumber(double maxNumber) { |
|
|
|
public void setMaxNumber(double maxNumber) { |
|
|
|
this.maxNumber = maxNumber; |
|
|
|
this.maxNumber = maxNumber; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getIconWidth() { |
|
|
|
public int getIconWidth() { |
|
|
|
return iconWidth; |
|
|
|
return iconWidth; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setIconWidth(int iconWidth) { |
|
|
|
public void setIconWidth(int iconWidth) { |
|
|
|
this.iconWidth = iconWidth; |
|
|
|
this.iconWidth = iconWidth; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public final static int[] BORDER_LINE_STYLE_ARRAY = new int[]{ |
|
|
|
public final static int[] BORDER_LINE_STYLE_ARRAY = new int[]{ |
|
|
|
Constants.LINE_NONE, |
|
|
|
Constants.LINE_NONE, |
|
|
|
Constants.LINE_THIN, //1px
|
|
|
|
Constants.LINE_THIN, //1px
|
|
|
|
Constants.LINE_MEDIUM, //2px
|
|
|
|
Constants.LINE_MEDIUM, //2px
|
|
|
|
Constants.LINE_THICK, //3px
|
|
|
|
Constants.LINE_THICK, //3px
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
public final static String[] BORDER_TYPE = new String[]{Inter.getLocText("FR-Designer-Widget-Style_Standard"), Inter.getLocText("FR-Designer-Widget-Style_Custom")}; |
|
|
|
public final static String[] BORDER_TYPE = new String[]{Inter.getLocText("FR-Designer-Widget-Style_Standard"), Inter.getLocText("FR-Designer-Widget-Style_Custom")}; |
|
|
|
public final static String[] BORDER_STYLE= new String[]{Inter.getLocText("FR-Designer-Widget-Style_Common"), Inter.getLocText("FR-Designer-Widget-Style_Shadow")}; |
|
|
|
public final static String[] BORDER_STYLE= new String[]{Inter.getLocText("FR-Designer-Widget-Style_Common"), Inter.getLocText("FR-Designer-Widget-Style_Shadow")}; |
|
|
|
|
|
|
|
|
|
|
|
private final static Dimension BUTTON_SIZE = new Dimension(24, 20); |
|
|
|
private final static Dimension BUTTON_SIZE = new Dimension(24, 20); |
|
|
|
|
|
|
|
|
|
|
|
public LayoutBorderPane() { |
|
|
|
public LayoutBorderPane() { |
|
|
|
this.initComponents(); |
|
|
|
this.initComponents(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void initComponents() { |
|
|
|
protected void initComponents() { |
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); |
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
|
|
|
|
|
|
|
JPanel defaultPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
JPanel defaultPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
this.add(defaultPane, BorderLayout.CENTER); |
|
|
|
this.add(defaultPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
@ -318,7 +342,7 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
borderPane.setBorder(BorderFactory.createEmptyBorder(10, 4, 10, 4)); |
|
|
|
borderPane.setBorder(BorderFactory.createEmptyBorder(10, 4, 10, 4)); |
|
|
|
|
|
|
|
|
|
|
|
layoutBorderPreviewPane = new LayoutBorderPreviewPane(borderStyle); |
|
|
|
layoutBorderPreviewPane = new LayoutBorderPreviewPane(borderStyle); |
|
|
|
|
|
|
|
|
|
|
|
borderPane.add(layoutBorderPreviewPane, BorderLayout.CENTER); |
|
|
|
borderPane.add(layoutBorderPreviewPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
JPanel rightPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
JPanel rightPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
@ -336,17 +360,7 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected UIScrollPane initRightTopPane(){ |
|
|
|
protected UIScrollPane initRightTopPane(){ |
|
|
|
this.borderTypeCombo = new UIComboBox(BORDER_TYPE); |
|
|
|
switchBorderType(); |
|
|
|
this.borderTypeCombo.addItemListener(new ItemListener() { |
|
|
|
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
|
|
|
|
if(borderTypeCombo.getSelectedIndex() == 0){ |
|
|
|
|
|
|
|
titlePane.setVisible(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
titlePane.setVisible(true); |
|
|
|
|
|
|
|
currentLineCombo.setSelectedItem(Constants.LINE_THIN); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.borderStyleCombo = new UIComboBox(BORDER_STYLE); |
|
|
|
this.borderStyleCombo = new UIComboBox(BORDER_STYLE); |
|
|
|
this.currentLineCombo = new LineComboBox(BORDER_LINE_STYLE_ARRAY); |
|
|
|
this.currentLineCombo = new LineComboBox(BORDER_LINE_STYLE_ARRAY); |
|
|
|
this.currentLineColorPane = new UIColorButton(null); |
|
|
|
this.currentLineColorPane = new UIColorButton(null); |
|
|
@ -366,22 +380,43 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
double[] rowSize = {p,p,p,p,p,p,p,p}; |
|
|
|
double[] rowSize = {p,p,p,p,p,p,p,p}; |
|
|
|
double[] columnSize = { p, MAX_WIDTH}; |
|
|
|
double[] columnSize = { p, MAX_WIDTH}; |
|
|
|
JPanel rightTopContentPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ |
|
|
|
JPanel rightTopContentPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Frame_Style")), borderTypeCombo}, |
|
|
|
getBorderTypeComp(), |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Render_Style")), borderStyleCombo}, |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Render_Style")), borderStyleCombo}, |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Border_Line")), currentLineCombo}, |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Border_Line")), currentLineCombo}, |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Border_Color")), buttonPane}, |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Border_Color")), buttonPane}, |
|
|
|
{new UILabel(Inter.getLocText("plugin-ChartF_Radius")+":"),borderCornerSpinner}, |
|
|
|
getBorderCornerSpinnerComp(), |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Body_Background")), backgroundPane}, |
|
|
|
{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Body_Background")), backgroundPane}, |
|
|
|
{new UILabel(""),new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Alpha"))}, |
|
|
|
{new UILabel(""),new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Alpha"))}, |
|
|
|
{new UILabel(""),transparencyPane}, |
|
|
|
{new UILabel(""),transparencyPane}, |
|
|
|
}, rowSize, columnSize, 10); |
|
|
|
}, rowSize, columnSize, 10); |
|
|
|
rightTopContentPane.setBorder(BorderFactory.createEmptyBorder(15, 12, 10, 12)); |
|
|
|
rightTopContentPane.setBorder(BorderFactory.createEmptyBorder(15, 12, 10, 12)); |
|
|
|
UIScrollPane rightTopPane = new UIScrollPane(rightTopContentPane); |
|
|
|
UIScrollPane rightTopPane = new UIScrollPane(rightTopContentPane); |
|
|
|
rightTopPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer-Widget-Style_Frame"),null)); |
|
|
|
rightTopPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer-Widget-Style_Frame"),null)); |
|
|
|
rightTopPane.setPreferredSize(rightTopPane.getPreferredSize()); |
|
|
|
rightTopPane.setPreferredSize(rightTopPane.getPreferredSize()); |
|
|
|
return rightTopPane; |
|
|
|
return rightTopPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected JComponent[] getBorderTypeComp(){ |
|
|
|
|
|
|
|
return new JComponent[]{new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Frame_Style")), borderTypeCombo}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected JComponent[] getBorderCornerSpinnerComp(){ |
|
|
|
|
|
|
|
return new JComponent[]{new UILabel(Inter.getLocText("plugin-ChartF_Radius")+":"),borderCornerSpinner}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void switchBorderType(){ |
|
|
|
|
|
|
|
this.borderTypeCombo = new UIComboBox(BORDER_TYPE); |
|
|
|
|
|
|
|
this.borderTypeCombo.addItemListener(new ItemListener() { |
|
|
|
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
|
|
|
|
if(borderTypeCombo.getSelectedIndex() == 0){ |
|
|
|
|
|
|
|
titlePane.setVisible(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
titlePane.setVisible(true); |
|
|
|
|
|
|
|
currentLineCombo.setSelectedItem(Constants.LINE_THIN); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -452,8 +487,8 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
titlePane.setVisible(false); |
|
|
|
titlePane.setVisible(false); |
|
|
|
return titlePane; |
|
|
|
return titlePane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected JPanel initFontButtonPane(){ |
|
|
|
protected JPanel initFontButtonPane(){ |
|
|
|
colorSelectPane = new UIColorButton(); |
|
|
|
colorSelectPane = new UIColorButton(); |
|
|
@ -524,8 +559,8 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
title.setPosition((Integer)hAlignmentPane.getSelectedItem()); |
|
|
|
title.setPosition((Integer)hAlignmentPane.getSelectedItem()); |
|
|
|
title.setBackground(titleBackgroundPane.update()); |
|
|
|
title.setBackground(titleBackgroundPane.update()); |
|
|
|
style.setTitle(title); |
|
|
|
style.setTitle(title); |
|
|
|
return style; |
|
|
|
return style; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected FRFont updateItalicBold(FRFont frFont) { |
|
|
|
protected FRFont updateItalicBold(FRFont frFont) { |
|
|
|
int italic_bold = frFont.getStyle(); |
|
|
|
int italic_bold = frFont.getStyle(); |
|
|
@ -547,10 +582,10 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populate(LayoutBorderStyle style) { |
|
|
|
public void populate(LayoutBorderStyle style) { |
|
|
|
if(this.borderStyle == null) { |
|
|
|
if(this.borderStyle == null) { |
|
|
|
borderStyle = new LayoutBorderStyle(); |
|
|
|
borderStyle = new LayoutBorderStyle(); |
|
|
|
} |
|
|
|
} |
|
|
|
this.borderStyle.setStyle(style); |
|
|
|
this.borderStyle.setStyle(style); |
|
|
|
|
|
|
|
|
|
|
|
populateBorder(); |
|
|
|
populateBorder(); |
|
|
|
|
|
|
|
|
|
|
@ -558,7 +593,7 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void populateBorder(){ |
|
|
|
protected void populateBorderType(){ |
|
|
|
this.borderTypeCombo.setSelectedIndex(borderStyle.getType()); |
|
|
|
this.borderTypeCombo.setSelectedIndex(borderStyle.getType()); |
|
|
|
this.borderTypeCombo.addItemListener(new ItemListener() { |
|
|
|
this.borderTypeCombo.addItemListener(new ItemListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -566,6 +601,10 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
paintPreviewPane(); |
|
|
|
paintPreviewPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void populateBorder(){ |
|
|
|
|
|
|
|
populateBorderType(); |
|
|
|
this.borderStyleCombo.setSelectedIndex(borderStyle.getBorderStyle()); |
|
|
|
this.borderStyleCombo.setSelectedIndex(borderStyle.getBorderStyle()); |
|
|
|
this.borderStyleCombo.addItemListener(new ItemListener() { |
|
|
|
this.borderStyleCombo.addItemListener(new ItemListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -610,7 +649,7 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
populateFourmula(widgetTitle); |
|
|
|
populateFourmula(widgetTitle); |
|
|
|
populateFont(widgetTitle); |
|
|
|
populateFont(widgetTitle); |
|
|
|
|
|
|
|
|
|
|
|
underline.addMouseListener(new MouseAdapter() { |
|
|
|
underline.addMouseListener(new MouseAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
@ -631,10 +670,10 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
paintPreviewPane(); |
|
|
|
paintPreviewPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
titleBackgroundPane.populateBean(widgetTitle.getBackground()); |
|
|
|
|
|
|
|
|
|
|
|
titleBackgroundPane.populateBean(widgetTitle.getBackground()); |
|
|
|
this.titleBackgroundPane.addChangeListener(new ChangeListener() { |
|
|
|
this.titleBackgroundPane.addChangeListener(new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
@ -716,27 +755,27 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void populateFourmula(WidgetTitle widgetTitle) { |
|
|
|
|
|
|
|
this.formulaPane.populateBean(widgetTitle.getTextObject().toString()); |
|
|
|
|
|
|
|
this.formulaPane.getUITextField().getDocument() |
|
|
|
|
|
|
|
.addDocumentListener(new DocumentListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void insertUpdate(DocumentEvent e) { |
|
|
|
|
|
|
|
paintPreviewPane(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
private void populateFourmula(WidgetTitle widgetTitle) { |
|
|
|
public void removeUpdate(DocumentEvent e) { |
|
|
|
this.formulaPane.populateBean(widgetTitle.getTextObject().toString()); |
|
|
|
paintPreviewPane(); |
|
|
|
this.formulaPane.getUITextField().getDocument() |
|
|
|
} |
|
|
|
.addDocumentListener(new DocumentListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void insertUpdate(DocumentEvent e) { |
|
|
|
public void changedUpdate(DocumentEvent e) { |
|
|
|
paintPreviewPane(); |
|
|
|
paintPreviewPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
@Override |
|
|
|
} |
|
|
|
public void removeUpdate(DocumentEvent e) { |
|
|
|
|
|
|
|
paintPreviewPane(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void changedUpdate(DocumentEvent e) { |
|
|
|
|
|
|
|
paintPreviewPane(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected JPanel createVerButtonPane(JToggleButton noBorder, String text) { |
|
|
|
protected JPanel createVerButtonPane(JToggleButton noBorder, String text) { |
|
|
@ -747,119 +786,119 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
return verPane; |
|
|
|
return verPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected class VerButtonPane extends JPanel { |
|
|
|
protected class VerButtonPane extends JPanel { |
|
|
|
|
|
|
|
|
|
|
|
JToggleButton noBorder; |
|
|
|
JToggleButton noBorder; |
|
|
|
BorderButton normalBorder; |
|
|
|
BorderButton normalBorder; |
|
|
|
BorderButton RoundedBorder; |
|
|
|
BorderButton RoundedBorder; |
|
|
|
ButtonGroup group; |
|
|
|
ButtonGroup group; |
|
|
|
|
|
|
|
|
|
|
|
private VerButtonPane () { |
|
|
|
private VerButtonPane () { |
|
|
|
setLayout(new FlowLayout(FlowLayout.CENTER)); |
|
|
|
setLayout(new FlowLayout(FlowLayout.CENTER)); |
|
|
|
setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0)); |
|
|
|
setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0)); |
|
|
|
group = new ButtonGroup(); |
|
|
|
group = new ButtonGroup(); |
|
|
|
noBorder = new BorderButton(NO_BORDERS); |
|
|
|
noBorder = new BorderButton(NO_BORDERS); |
|
|
|
normalBorder = new BorderButton(RIGHTANGLE_BORDERS); |
|
|
|
normalBorder = new BorderButton(RIGHTANGLE_BORDERS); |
|
|
|
RoundedBorder = new BorderButton(ROUNDED_BORDERS); |
|
|
|
RoundedBorder = new BorderButton(ROUNDED_BORDERS); |
|
|
|
group.add(noBorder); |
|
|
|
group.add(noBorder); |
|
|
|
group.add(normalBorder); |
|
|
|
group.add(normalBorder); |
|
|
|
group.add(RoundedBorder); |
|
|
|
group.add(RoundedBorder); |
|
|
|
|
|
|
|
|
|
|
|
// add(createVerButtonPane(noBorder, Inter.getLocText("None")));
|
|
|
|
// add(createVerButtonPane(noBorder, Inter.getLocText("None")));
|
|
|
|
// add(createVerButtonPane(normalBorder, Inter.getLocText("Border-Style-Normal")));
|
|
|
|
// add(createVerButtonPane(normalBorder, Inter.getLocText("Border-Style-Normal")));
|
|
|
|
// add(createVerButtonPane(RoundedBorder, Inter.getLocText("Border-Style-Radius")));
|
|
|
|
// add(createVerButtonPane(RoundedBorder, Inter.getLocText("Border-Style-Radius")));
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populate(LayoutBorderStyle style) { |
|
|
|
public void populate(LayoutBorderStyle style) { |
|
|
|
if(style.getBorder() == Constants.LINE_NONE) { |
|
|
|
if(style.getBorder() == Constants.LINE_NONE) { |
|
|
|
group.setSelected(noBorder.getModel(), true); |
|
|
|
group.setSelected(noBorder.getModel(), true); |
|
|
|
} else if(style.getBorderRadius() != NO_RADIUS) { |
|
|
|
} else if(style.getBorderRadius() != NO_RADIUS) { |
|
|
|
group.setSelected(RoundedBorder.getModel(), true); |
|
|
|
group.setSelected(RoundedBorder.getModel(), true); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
group.setSelected(normalBorder.getModel(), true); |
|
|
|
group.setSelected(normalBorder.getModel(), true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private class BorderButton extends JToggleButton { |
|
|
|
private class BorderButton extends JToggleButton { |
|
|
|
private BorderButton(int border) { |
|
|
|
private BorderButton(int border) { |
|
|
|
super(); |
|
|
|
super(); |
|
|
|
this.setIcon(new BorderButtonIcon(border)); |
|
|
|
this.setIcon(new BorderButtonIcon(border)); |
|
|
|
addBorderActionListener(border); |
|
|
|
addBorderActionListener(border); |
|
|
|
setPreferredSize(new Dimension(32, 32)); |
|
|
|
setPreferredSize(new Dimension(32, 32)); |
|
|
|
this.setBorder(new UIRoundedBorder(new Color(220, 220, 220), 1, 5)); |
|
|
|
this.setBorder(new UIRoundedBorder(new Color(220, 220, 220), 1, 5)); |
|
|
|
this.setRolloverEnabled(true); |
|
|
|
this.setRolloverEnabled(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Border getBorder() { |
|
|
|
public Border getBorder() { |
|
|
|
ButtonModel model = getModel(); |
|
|
|
ButtonModel model = getModel(); |
|
|
|
if (this.isSelected()) { |
|
|
|
if (this.isSelected()) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
if (isRolloverEnabled() && model.isRollover()) { |
|
|
|
if (isRolloverEnabled() && model.isRollover()) { |
|
|
|
return new UIRoundedBorder(new Color(148, 148, 148), 1, 5); |
|
|
|
return new UIRoundedBorder(new Color(148, 148, 148), 1, 5); |
|
|
|
} |
|
|
|
} |
|
|
|
return super.getBorder(); |
|
|
|
return super.getBorder(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void updateUI() { |
|
|
|
public void updateUI() { |
|
|
|
setUI(new BorderToggleButtonUI()); |
|
|
|
setUI(new BorderToggleButtonUI()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void addBorderActionListener(final int border) { |
|
|
|
private void addBorderActionListener(final int border) { |
|
|
|
addActionListener(new ActionListener() { |
|
|
|
addActionListener(new ActionListener() { |
|
|
|
public void actionPerformed(ActionEvent ae) { |
|
|
|
public void actionPerformed(ActionEvent ae) { |
|
|
|
if (border == 0) { |
|
|
|
if (border == 0) { |
|
|
|
borderStyle.reset(); |
|
|
|
borderStyle.reset(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
borderStyle.setColor(currentLineColorPane.getColor()); |
|
|
|
borderStyle.setColor(currentLineColorPane.getColor()); |
|
|
|
borderStyle.setBorder(currentLineCombo.getSelectedLineStyle()); |
|
|
|
borderStyle.setBorder(currentLineCombo.getSelectedLineStyle()); |
|
|
|
borderStyle.setBorderRadius((int)borderCornerSpinner.getValue()); |
|
|
|
borderStyle.setBorderRadius((int)borderCornerSpinner.getValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
layoutBorderPreviewPane.repaint(); |
|
|
|
layoutBorderPreviewPane.repaint(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private class BorderToggleButtonUI extends BasicToggleButtonUI { |
|
|
|
private class BorderToggleButtonUI extends BasicToggleButtonUI { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void paint(Graphics g, JComponent c) { |
|
|
|
public void paint(Graphics g, JComponent c) { |
|
|
|
paintBackground(g, (AbstractButton) c); |
|
|
|
paintBackground(g, (AbstractButton) c); |
|
|
|
super.paint(g, c); |
|
|
|
super.paint(g, c); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void paintBackground(Graphics g, AbstractButton b) { |
|
|
|
private void paintBackground(Graphics g, AbstractButton b) { |
|
|
|
if (b.isContentAreaFilled()) { |
|
|
|
if (b.isContentAreaFilled()) { |
|
|
|
Dimension size = b.getSize(); |
|
|
|
Dimension size = b.getSize(); |
|
|
|
Background background = new GradientBackground(new Color(247, 247, 247), new Color(228, 228, 228), |
|
|
|
Background background = new GradientBackground(new Color(247, 247, 247), new Color(228, 228, 228), |
|
|
|
GradientBackground.TOP2BOTTOM); |
|
|
|
GradientBackground.TOP2BOTTOM); |
|
|
|
background.paint(g, new RoundRectangle2D.Double(2, 2, size.width - 4, size.height - 4, 5, 5)); |
|
|
|
background.paint(g, new RoundRectangle2D.Double(2, 2, size.width - 4, size.height - 4, 5, 5)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void paintBorder(Graphics g, Color lineColor, int width, int height) { |
|
|
|
private void paintBorder(Graphics g, Color lineColor, int width, int height) { |
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
|
|
g2d.setColor(lineColor); |
|
|
|
g2d.setColor(lineColor); |
|
|
|
g2d.drawRoundRect(0, 0, width - 1, height - 1, 5, 5); |
|
|
|
g2d.drawRoundRect(0, 0, width - 1, height - 1, 5, 5); |
|
|
|
g2d.setColor(Color.WHITE); |
|
|
|
g2d.setColor(Color.WHITE); |
|
|
|
g2d.drawRoundRect(1, 1, width - 3, height - 3, 5, 5); |
|
|
|
g2d.drawRoundRect(1, 1, width - 3, height - 3, 5, 5); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void paintButtonPressed(Graphics g, AbstractButton b) { |
|
|
|
protected void paintButtonPressed(Graphics g, AbstractButton b) { |
|
|
|
Dimension size = b.getSize(); |
|
|
|
Dimension size = b.getSize(); |
|
|
|
paintBorder(g, new Color(78,143,203), size.height, size.width); |
|
|
|
paintBorder(g, new Color(78,143,203), size.height, size.width); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Icon to display in shortcut setting buttons
|
|
|
|
// Icon to display in shortcut setting buttons
|
|
|
|
private class BorderButtonIcon implements Icon { |
|
|
|
private class BorderButtonIcon implements Icon { |
|
|
@ -883,13 +922,13 @@ public class LayoutBorderPane extends BasicPane { |
|
|
|
g.drawRect(3, 3, this.getIconWidth() - 7, this.getIconHeight() - 7); |
|
|
|
g.drawRect(3, 3, this.getIconWidth() - 7, this.getIconHeight() - 7); |
|
|
|
} else if (display == LayoutBorderPane.ROUNDED_BORDERS) { |
|
|
|
} else if (display == LayoutBorderPane.ROUNDED_BORDERS) { |
|
|
|
g.setColor(Color.black); |
|
|
|
g.setColor(Color.black); |
|
|
|
g.drawRoundRect(3, 3, this.getIconWidth() - 7, this.getIconHeight() - 7, 6, 6); |
|
|
|
g.drawRoundRect(3, 3, this.getIconWidth() - 7, this.getIconHeight() - 7, 6, 6); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected String title4PopupWindow() { |
|
|
|
protected String title4PopupWindow() { |
|
|
|
return Inter.getLocText("FR-Designer-Widget_Style"); |
|
|
|
return Inter.getLocText("FR-Designer-Widget_Style"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |