@ -0,0 +1,54 @@
|
||||
package com.fine.theme.light.ui; |
||||
|
||||
import com.fine.theme.utils.FineUIUtils; |
||||
import com.formdev.flatlaf.ui.FlatPanelUI; |
||||
import org.jetbrains.annotations.Nullable; |
||||
|
||||
import javax.swing.JComponent; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.plaf.ComponentUI; |
||||
|
||||
import static com.fine.theme.utils.FineClientProperties.PANEL_TYPE; |
||||
import static com.fine.theme.utils.FineClientProperties.ROUNDED_PANEL; |
||||
|
||||
/** |
||||
* Panel 面板UI |
||||
* |
||||
* @author Levy.Xie |
||||
* @since 11.0 |
||||
* Created on 2024/08/02 |
||||
*/ |
||||
public class FinePanelUI extends FlatPanelUI { |
||||
|
||||
/** |
||||
* @param shared |
||||
* @since 2 |
||||
*/ |
||||
protected FinePanelUI(boolean shared) { |
||||
super(shared); |
||||
} |
||||
|
||||
/** |
||||
* 创建UI |
||||
*/ |
||||
public static ComponentUI createUI(JComponent c) { |
||||
return new FinePanelUI(false); |
||||
} |
||||
|
||||
@Override |
||||
protected void installDefaults(JPanel p) { |
||||
super.installDefaults(p); |
||||
if (ROUNDED_PANEL.equals(getPanelTypeStr(p))) { |
||||
this.arc = FineUIUtils.getUIInt("Panel.arc", "Component.arc"); |
||||
} |
||||
} |
||||
|
||||
@Nullable |
||||
static String getPanelTypeStr(JPanel p) { |
||||
Object value = p.getClientProperty(PANEL_TYPE); |
||||
if (value instanceof String) { |
||||
return (String) value; |
||||
} |
||||
return null; |
||||
} |
||||
} |
@ -0,0 +1,15 @@
|
||||
package com.fine.theme.utils; |
||||
|
||||
/** |
||||
* 主题UI常量 |
||||
* |
||||
* @author Levy.Xie |
||||
* @since 11.0 |
||||
* Created on 2024/08/05 |
||||
*/ |
||||
public class FineUIConstants { |
||||
|
||||
public static final int SCALE_FONT_SIZE_12 = FineUIScale.scale(12); |
||||
|
||||
public static final int SCALE_FONT_SIZE_13 = FineUIScale.scale(13); |
||||
} |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 962 B |
After Width: | Height: | Size: 968 B |
Before Width: | Height: | Size: 962 B After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 968 B After Width: | Height: | Size: 1.8 KiB |
@ -0,0 +1,67 @@
|
||||
package com.fr.design.widget; |
||||
|
||||
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
||||
import com.fr.design.gui.ibutton.UIHeadGroup; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.mainframe.ElementCasePane; |
||||
import com.fr.form.ui.Widget; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.CardLayout; |
||||
import java.awt.Component; |
||||
|
||||
/** |
||||
* 东区控件面板子类 |
||||
* @author Renekton |
||||
* @since 2024/8/6. |
||||
* Created on 2024/8/6. |
||||
*/ |
||||
public class EastCellWidgetCardPane extends CellWidgetCardPane { |
||||
|
||||
private CardLayout tabbedPane; |
||||
|
||||
private JPanel center; |
||||
|
||||
private UIHeadGroup tabsHeaderIconPane; |
||||
|
||||
public EastCellWidgetCardPane(ElementCasePane pane) { |
||||
super(pane); |
||||
} |
||||
|
||||
private void initComponents() { |
||||
|
||||
this.removeAll(); |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
|
||||
tabbedPane = new CardLayout(); |
||||
center = new JPanel(tabbedPane); |
||||
|
||||
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")}; |
||||
tabsHeaderIconPane = new UIHeadGroup(tabTitles) { |
||||
@Override |
||||
public void tabChanged(int index) { |
||||
tabbedPane.show(center, tabTitles[index]); |
||||
} |
||||
}; |
||||
JPanel wrapperPane = new JPanel(new BorderLayout()); |
||||
wrapperPane.add(tabsHeaderIconPane, BorderLayout.NORTH); |
||||
wrapperPane.add(center, BorderLayout.CENTER); |
||||
wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)); |
||||
this.add(wrapperPane, BorderLayout.CENTER); |
||||
Component component = initTabPane(); |
||||
center.add(component, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute")); |
||||
center.add(getEventTabPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event")); |
||||
center.add(getMobileTabPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")); |
||||
initPaneList(); |
||||
} |
||||
|
||||
/** |
||||
* 东区面板 |
||||
*/ |
||||
public void populate(Widget cellWidget) { |
||||
initComponents(); |
||||
super.populateWidget(cellWidget); |
||||
} |
||||
|
||||
} |