|
|
@ -4,17 +4,24 @@ import com.fr.base.BaseUtils; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.file.Releasable; |
|
|
|
import com.fr.design.file.Releasable; |
|
|
|
import com.fr.design.gui.ibutton.UIHeadGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIHeadGroup; |
|
|
|
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo; |
|
|
|
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo; |
|
|
|
import com.fr.design.mainframe.share.collect.ComponentCollector; |
|
|
|
import com.fr.design.mainframe.share.collect.ComponentCollector; |
|
|
|
import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane; |
|
|
|
import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane; |
|
|
|
import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane; |
|
|
|
import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JScrollPane; |
|
|
|
import javax.swing.JScrollPane; |
|
|
|
|
|
|
|
import javax.swing.SwingConstants; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.CardLayout; |
|
|
|
import java.awt.CardLayout; |
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
@ -31,6 +38,8 @@ public class FormWidgetDetailPane extends FormDockView implements Releasable { |
|
|
|
private UIHeadGroup headGroup; |
|
|
|
private UIHeadGroup headGroup; |
|
|
|
private List<BasicPane> paneList; |
|
|
|
private List<BasicPane> paneList; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isEmptyPane = false; |
|
|
|
|
|
|
|
|
|
|
|
public static FormWidgetDetailPane getInstance() { |
|
|
|
public static FormWidgetDetailPane getInstance() { |
|
|
|
if (HOLDER.singleton == null) { |
|
|
|
if (HOLDER.singleton == null) { |
|
|
|
HOLDER.singleton = new FormWidgetDetailPane(); |
|
|
|
HOLDER.singleton = new FormWidgetDetailPane(); |
|
|
@ -59,7 +68,7 @@ public class FormWidgetDetailPane extends FormDockView implements Releasable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getViewTitle() { |
|
|
|
public String getViewTitle() { |
|
|
|
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Tree_And_Table"); |
|
|
|
return Toolkit.i18nText("Fine-Design_Form_Widget_Tree_And_Table"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -71,6 +80,9 @@ public class FormWidgetDetailPane extends FormDockView implements Releasable { |
|
|
|
* 初始化 |
|
|
|
* 初始化 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void refreshDockingView(){ |
|
|
|
public void refreshDockingView(){ |
|
|
|
|
|
|
|
if (isEmptyPane) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
FormDesigner designer = this.getEditingFormDesigner(); |
|
|
|
FormDesigner designer = this.getEditingFormDesigner(); |
|
|
|
removeAll(); |
|
|
|
removeAll(); |
|
|
|
if (designer == null) { |
|
|
|
if (designer == null) { |
|
|
@ -101,6 +113,10 @@ public class FormWidgetDetailPane extends FormDockView implements Releasable { |
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void resetEmptyPane(){ |
|
|
|
|
|
|
|
this.isEmptyPane = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 清除数据 |
|
|
|
* 清除数据 |
|
|
@ -111,10 +127,34 @@ public class FormWidgetDetailPane extends FormDockView implements Releasable { |
|
|
|
this.add(psp, BorderLayout.CENTER); |
|
|
|
this.add(psp, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void switch2Empty(){ |
|
|
|
|
|
|
|
isEmptyPane = true; |
|
|
|
|
|
|
|
this.removeAll(); |
|
|
|
|
|
|
|
JPanel panel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); |
|
|
|
|
|
|
|
UILabel imagePanel = new UILabel(BaseUtils.readIcon("/com/fr/design/form/images/version_not_match.png")); |
|
|
|
|
|
|
|
imagePanel.setPreferredSize(new Dimension(240, 96)); |
|
|
|
|
|
|
|
imagePanel.setHorizontalAlignment(SwingConstants.CENTER); |
|
|
|
|
|
|
|
panel.add(imagePanel); |
|
|
|
|
|
|
|
UILabel uiLabel1 = tipLabel(Toolkit.i18nText("Fine-Design_Share_Version_Not_Match_Tip1")); |
|
|
|
|
|
|
|
UILabel uiLabel2 = tipLabel(Toolkit.i18nText("Fine-Design_Share_Version_Not_Match_Tip2")); |
|
|
|
|
|
|
|
panel.add(uiLabel1); |
|
|
|
|
|
|
|
panel.add(uiLabel2); |
|
|
|
|
|
|
|
panel.setBorder(BorderFactory.createEmptyBorder(240, 0, 0, 0)); |
|
|
|
|
|
|
|
this.add(panel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private UILabel tipLabel(String text) { |
|
|
|
|
|
|
|
UILabel tipLabel = new UILabel(text); |
|
|
|
|
|
|
|
tipLabel.setHorizontalAlignment(SwingConstants.CENTER); |
|
|
|
|
|
|
|
tipLabel.setPreferredSize(new Dimension(240, 20)); |
|
|
|
|
|
|
|
tipLabel.setForeground(Color.decode("#8F8F92")); |
|
|
|
|
|
|
|
return tipLabel; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void enterWidgetLib() { |
|
|
|
public void enterWidgetLib() { |
|
|
|
|
|
|
|
ComponentReuseNotifyUtil.enterWidgetLibExtraAction(); |
|
|
|
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_LIB); |
|
|
|
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_LIB); |
|
|
|
ComponentReuseNotifyUtil.enterWidgetLibExtraAction(false); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|