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