|
|
|
@ -2,7 +2,7 @@ package com.fr.widgettheme.theme.panel;
|
|
|
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIColorButton; |
|
|
|
|
import com.fr.design.gui.frpane.FontSizeComboPane; |
|
|
|
|
import com.fr.widgettheme.theme.widget.style.TextStyle; |
|
|
|
|
import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
@ -39,16 +39,16 @@ public class WidgetTextStylePane extends JPanel {
|
|
|
|
|
this.add(fontColorButton); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setTextStyle(TextStyle textStyle) { |
|
|
|
|
this.fontSizePane.setValue(textStyle.getFontSize()); |
|
|
|
|
this.fontColorButton.setColor(textStyle.getFontColor()); |
|
|
|
|
public void setTextStyle(ThemeTextStyle themeTextStyle) { |
|
|
|
|
this.fontSizePane.setValue(themeTextStyle.getFontSize()); |
|
|
|
|
this.fontColorButton.setColor(themeTextStyle.getFontColor()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public TextStyle getTextStyle() { |
|
|
|
|
TextStyle textStyle = new TextStyle(); |
|
|
|
|
textStyle.setFontSize(this.fontSizePane.getValue()); |
|
|
|
|
textStyle.setFontColor(this.fontColorButton.getColor()); |
|
|
|
|
return textStyle; |
|
|
|
|
public ThemeTextStyle getTextStyle() { |
|
|
|
|
ThemeTextStyle themeTextStyle = new ThemeTextStyle(); |
|
|
|
|
themeTextStyle.setFontSize(this.fontSizePane.getValue()); |
|
|
|
|
themeTextStyle.setFontColor(this.fontColorButton.getColor()); |
|
|
|
|
return themeTextStyle; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setFontSizeValue(int fontSize) { |
|
|
|
|