|
|
|
@ -10,11 +10,14 @@ import com.fr.design.data.BasicTableDataTreePane;
|
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.event.TargetModifiedEvent; |
|
|
|
|
import com.fr.design.event.TargetModifiedListener; |
|
|
|
|
import com.fr.design.gui.itoolbar.UIToolbar; |
|
|
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JLayeredPane; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -33,6 +36,9 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
|
|
|
|
|
private TransparentPane transparentPane = new TransparentPane(); |
|
|
|
|
private OpenLoadingPane loadingPane = new OpenLoadingPane(); |
|
|
|
|
private OpenFailedPane failedPane = new OpenFailedPane(); |
|
|
|
|
|
|
|
|
|
Map<Component, Boolean> backUpToolbarComponentState = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
private JLayeredPane layeredPane = new JLayeredPane() { |
|
|
|
|
@Override |
|
|
|
|
public void doLayout() { |
|
|
|
@ -103,7 +109,7 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void showOpenStatus() { |
|
|
|
|
DesignerContext.getDesignerFrame().refreshUIToolBar(); |
|
|
|
|
forbidToolBar(); |
|
|
|
|
DesignerFrameFileDealerPane.getInstance().stateChange(); |
|
|
|
|
EastRegionContainerPane.getInstance().updateAllPropertyPane(); |
|
|
|
|
JComponent downPane = WestRegionContainerPane.getInstance().getDownPane(); |
|
|
|
@ -120,9 +126,9 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void showCover() { |
|
|
|
|
forbidToolBar(); |
|
|
|
|
transparentPane.start(); |
|
|
|
|
layeredPane.moveToFront(transparentPane); |
|
|
|
|
DesignerContext.getDesignerFrame().refreshUIToolBar(true); |
|
|
|
|
EastRegionContainerPane.getInstance().updateAllPropertyPane(); |
|
|
|
|
JComponent downPane = WestRegionContainerPane.getInstance().getDownPane(); |
|
|
|
|
if (downPane instanceof BasicTableDataTreePane) { |
|
|
|
@ -132,6 +138,7 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void hideCover() { |
|
|
|
|
recoverToolBar(); |
|
|
|
|
transparentPane.stop(); |
|
|
|
|
layeredPane.moveToFront(component); |
|
|
|
|
EastRegionContainerPane.getInstance().updateAllPropertyPane(); |
|
|
|
@ -142,6 +149,22 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void forbidToolBar() { |
|
|
|
|
CenterRegionContainerPane centerRegionContainerPane = CenterRegionContainerPane.getInstance(); |
|
|
|
|
backUpToolbarComponentState = centerRegionContainerPane.getToolbarComponentState(); |
|
|
|
|
for (Component component : backUpToolbarComponentState.keySet()) { |
|
|
|
|
component.setEnabled(false); |
|
|
|
|
} |
|
|
|
|
centerRegionContainerPane.getToolBarMenuDock().updateEnable(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void recoverToolBar() { |
|
|
|
|
UIToolbar.resetComponentState(backUpToolbarComponentState); |
|
|
|
|
backUpToolbarComponentState.clear(); |
|
|
|
|
CenterRegionContainerPane centerRegionContainerPane = CenterRegionContainerPane.getInstance(); |
|
|
|
|
centerRegionContainerPane.getToolBarMenuDock().updateEnable(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JTemplate<?, ?> getSelectedJTemplate() { |
|
|
|
|
return component; |
|
|
|
|
} |
|
|
|
|