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