|
|
@ -23,6 +23,7 @@ import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.vcs.common.VcsHelper; |
|
|
|
import com.fr.design.update.push.DesignerPushUpdateManager; |
|
|
|
import com.fr.design.update.push.DesignerPushUpdateManager; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
@ -139,7 +140,9 @@ public class PreferencePane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
private UICheckBox vcsEnableCheckBox; |
|
|
|
private UICheckBox vcsEnableCheckBox; |
|
|
|
private UICheckBox saveCommitCheckBox; |
|
|
|
private UICheckBox saveCommitCheckBox; |
|
|
|
|
|
|
|
private UICheckBox useIntervalCheckBox; |
|
|
|
private IntegerEditor saveIntervalEditor; |
|
|
|
private IntegerEditor saveIntervalEditor; |
|
|
|
|
|
|
|
private UILabel remindVcsLabel; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -205,15 +208,22 @@ public class PreferencePane extends BasicPane { |
|
|
|
private void createVcsSettingPane(JPanel generalPane) { |
|
|
|
private void createVcsSettingPane(JPanel generalPane) { |
|
|
|
JPanel vcsPane = FRGUIPaneFactory.createVerticalTitledBorderPane(Toolkit.i18nText("Fine-Design_Vcs_Title")); |
|
|
|
JPanel vcsPane = FRGUIPaneFactory.createVerticalTitledBorderPane(Toolkit.i18nText("Fine-Design_Vcs_Title")); |
|
|
|
generalPane.add(vcsPane); |
|
|
|
generalPane.add(vcsPane); |
|
|
|
|
|
|
|
remindVcsLabel = new UILabel("Fine-Design_Vcs_Remind"); |
|
|
|
|
|
|
|
remindVcsLabel.setVisible(!VcsHelper.needInit()); |
|
|
|
vcsEnableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Vcs_SaveAuto")); |
|
|
|
vcsEnableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Vcs_SaveAuto")); |
|
|
|
saveCommitCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Vcs_No_Delete")); |
|
|
|
saveCommitCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Vcs_No_Delete")); |
|
|
|
saveIntervalEditor = new IntegerEditor(30); |
|
|
|
saveIntervalEditor = new IntegerEditor(30); |
|
|
|
JPanel memorySpace = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
useIntervalCheckBox = new UICheckBox(); |
|
|
|
|
|
|
|
JPanel enableVcsPanel = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
|
|
|
|
enableVcsPanel.add(vcsEnableCheckBox); |
|
|
|
|
|
|
|
enableVcsPanel.add(remindVcsLabel); |
|
|
|
|
|
|
|
JPanel intervalPanel = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
UILabel everyLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Every")); |
|
|
|
UILabel everyLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Every")); |
|
|
|
UILabel delayLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Delay")); |
|
|
|
UILabel delayLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Delay")); |
|
|
|
memorySpace.add(everyLabel); |
|
|
|
intervalPanel.add(useIntervalCheckBox); |
|
|
|
memorySpace.add(saveIntervalEditor); |
|
|
|
intervalPanel.add(everyLabel); |
|
|
|
memorySpace.add(delayLabel); |
|
|
|
intervalPanel.add(saveIntervalEditor); |
|
|
|
|
|
|
|
intervalPanel.add(delayLabel); |
|
|
|
vcsEnableCheckBox.addChangeListener(new ChangeListener() { |
|
|
|
vcsEnableCheckBox.addChangeListener(new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
@ -221,14 +231,16 @@ public class PreferencePane extends BasicPane { |
|
|
|
if (selected) { |
|
|
|
if (selected) { |
|
|
|
saveCommitCheckBox.setEnabled(true); |
|
|
|
saveCommitCheckBox.setEnabled(true); |
|
|
|
saveIntervalEditor.setEnabled(true); |
|
|
|
saveIntervalEditor.setEnabled(true); |
|
|
|
|
|
|
|
useIntervalCheckBox.setEnabled(true); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
saveCommitCheckBox.setEnabled(false); |
|
|
|
saveCommitCheckBox.setEnabled(false); |
|
|
|
saveIntervalEditor.setEnabled(false); |
|
|
|
saveIntervalEditor.setEnabled(false); |
|
|
|
|
|
|
|
useIntervalCheckBox.setEnabled(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
vcsPane.add(vcsEnableCheckBox); |
|
|
|
vcsPane.add(enableVcsPanel); |
|
|
|
vcsPane.add(memorySpace); |
|
|
|
vcsPane.add(intervalPanel); |
|
|
|
vcsPane.add(saveCommitCheckBox); |
|
|
|
vcsPane.add(saveCommitCheckBox); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -581,13 +593,21 @@ public class PreferencePane extends BasicPane { |
|
|
|
defaultStringToFormulaBox.setEnabled(false); |
|
|
|
defaultStringToFormulaBox.setEnabled(false); |
|
|
|
defaultStringToFormulaBox.setSelected(false); |
|
|
|
defaultStringToFormulaBox.setSelected(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (VcsHelper.needInit()) { |
|
|
|
vcsEnableCheckBox.setSelected(designerEnvManager.isVcsEnable()); |
|
|
|
vcsEnableCheckBox.setSelected(designerEnvManager.isVcsEnable()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
vcsEnableCheckBox.setEnabled(false); |
|
|
|
|
|
|
|
vcsEnableCheckBox.setSelected(false); |
|
|
|
|
|
|
|
} |
|
|
|
if (!vcsEnableCheckBox.isSelected()) { |
|
|
|
if (!vcsEnableCheckBox.isSelected()) { |
|
|
|
saveIntervalEditor.setEnabled(false); |
|
|
|
|
|
|
|
saveCommitCheckBox.setEnabled(false); |
|
|
|
saveCommitCheckBox.setEnabled(false); |
|
|
|
|
|
|
|
saveIntervalEditor.setEnabled(false); |
|
|
|
|
|
|
|
useIntervalCheckBox.setEnabled(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
saveIntervalEditor.setValue(designerEnvManager.getSaveInterval()); |
|
|
|
saveIntervalEditor.setValue(designerEnvManager.getSaveInterval()); |
|
|
|
saveCommitCheckBox.setSelected(designerEnvManager.isSaveCommit()); |
|
|
|
saveCommitCheckBox.setSelected(designerEnvManager.isSaveCommit()); |
|
|
|
|
|
|
|
useIntervalCheckBox.setSelected(designerEnvManager.isUseInterval()); |
|
|
|
|
|
|
|
|
|
|
|
supportCellEditorDefCheckBox.setSelected(designerEnvManager.isSupportCellEditorDef()); |
|
|
|
supportCellEditorDefCheckBox.setSelected(designerEnvManager.isSupportCellEditorDef()); |
|
|
|
|
|
|
|
|
|
|
@ -680,6 +700,7 @@ public class PreferencePane extends BasicPane { |
|
|
|
designerEnvManager.setSaveInterval(this.saveIntervalEditor.getValue()); |
|
|
|
designerEnvManager.setSaveInterval(this.saveIntervalEditor.getValue()); |
|
|
|
designerEnvManager.setVcsEnable(this.vcsEnableCheckBox.isSelected()); |
|
|
|
designerEnvManager.setVcsEnable(this.vcsEnableCheckBox.isSelected()); |
|
|
|
designerEnvManager.setSaveCommit(this.saveCommitCheckBox.isSelected()); |
|
|
|
designerEnvManager.setSaveCommit(this.saveCommitCheckBox.isSelected()); |
|
|
|
|
|
|
|
designerEnvManager.setUseInterval(this.useIntervalCheckBox.isSelected()); |
|
|
|
if (this.autoPushUpdateCheckBox != null) { |
|
|
|
if (this.autoPushUpdateCheckBox != null) { |
|
|
|
designerEnvManager.setAutoPushUpdateEnabled(this.autoPushUpdateCheckBox.isSelected()); |
|
|
|
designerEnvManager.setAutoPushUpdateEnabled(this.autoPushUpdateCheckBox.isSelected()); |
|
|
|
} |
|
|
|
} |
|
|
|