|
|
@ -11,6 +11,7 @@ import com.fr.design.constants.LayoutConstants; |
|
|
|
import com.fr.design.event.GlobalNameListener; |
|
|
|
import com.fr.design.event.GlobalNameListener; |
|
|
|
import com.fr.design.event.GlobalNameObserver; |
|
|
|
import com.fr.design.event.GlobalNameObserver; |
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
|
|
|
|
import com.fr.design.fun.BackgroundQuickUIProvider; |
|
|
|
import com.fr.design.gui.ibutton.UIToggleButton; |
|
|
|
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.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
@ -20,7 +21,12 @@ import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; |
|
|
|
import com.fr.design.style.color.NewColorSelectBox; |
|
|
|
import com.fr.design.style.color.NewColorSelectBox; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
|
|
|
|
import com.fr.plugin.context.PluginContext; |
|
|
|
|
|
|
|
import com.fr.plugin.manage.PluginFilter; |
|
|
|
|
|
|
|
import com.fr.plugin.observer.PluginEvent; |
|
|
|
|
|
|
|
import com.fr.plugin.observer.PluginEventListener; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.CoreConstants; |
|
|
|
import com.fr.stable.CoreConstants; |
|
|
|
|
|
|
|
|
|
|
@ -64,6 +70,7 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void initComponents() { |
|
|
|
protected void initComponents() { |
|
|
|
|
|
|
|
|
|
|
|
initButtonsWithIcon(); |
|
|
|
initButtonsWithIcon(); |
|
|
|
this.setLayout(new BorderLayout(0, 0)); |
|
|
|
this.setLayout(new BorderLayout(0, 0)); |
|
|
|
JPanel externalPane = new JPanel(new GridLayout(0, 4)); |
|
|
|
JPanel externalPane = new JPanel(new GridLayout(0, 4)); |
|
|
@ -96,7 +103,7 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse |
|
|
|
borderPanel = new UIExpandablePane(Inter.getLocText("FR-Designer_Border"), 280, 24, panel); |
|
|
|
borderPanel = new UIExpandablePane(Inter.getLocText("FR-Designer_Border"), 280, 24, panel); |
|
|
|
this.add(borderPanel, BorderLayout.NORTH); |
|
|
|
this.add(borderPanel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
|
|
backgroundPane = new BackgroundPane(); |
|
|
|
initBackgroundPane(); |
|
|
|
backgroundPanel = new UIExpandablePane(Inter.getLocText("FR-Designer_Background"), 280, 24, backgroundPane); |
|
|
|
backgroundPanel = new UIExpandablePane(Inter.getLocText("FR-Designer_Background"), 280, 24, backgroundPane); |
|
|
|
this.add(backgroundPanel, BorderLayout.CENTER); |
|
|
|
this.add(backgroundPanel, BorderLayout.CENTER); |
|
|
|
initAllNames(); |
|
|
|
initAllNames(); |
|
|
@ -104,6 +111,26 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse |
|
|
|
innerToggleButton.addChangeListener(innerToggleButtonChangeListener); |
|
|
|
innerToggleButton.addChangeListener(innerToggleButtonChangeListener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initBackgroundPane() { |
|
|
|
|
|
|
|
//初始化背景pane并监听插件
|
|
|
|
|
|
|
|
backgroundPane = new BackgroundPane(); |
|
|
|
|
|
|
|
GeneralContext.listenPluginRunningChanged(new PluginEventListener() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void on(PluginEvent event) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
backgroundPane = new BackgroundPane(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, new PluginFilter() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean accept(PluginContext context) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return context.contain(BackgroundQuickUIProvider.MARK_STRING); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ChangeListener outerToggleButtonChangeListener = new ChangeListener() { |
|
|
|
ChangeListener outerToggleButtonChangeListener = new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|