|
|
@ -8,6 +8,7 @@ import com.fr.design.RestartHelper; |
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
import com.fr.design.dialog.BasicDialog; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
|
|
|
|
import com.fr.design.dialog.DialogActionListener; |
|
|
|
import com.fr.design.editor.editor.IntegerEditor; |
|
|
|
import com.fr.design.editor.editor.IntegerEditor; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
@ -31,6 +32,7 @@ import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
import com.fr.design.widget.FRWidgetFactory; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.FRFont; |
|
|
|
import com.fr.general.FRFont; |
|
|
|
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.log.Log4jConfig; |
|
|
|
import com.fr.general.log.Log4jConfig; |
|
|
|
import com.fr.locale.InterProviderFactory; |
|
|
|
import com.fr.locale.InterProviderFactory; |
|
|
@ -79,6 +81,7 @@ public class PreferencePane extends BasicPane { |
|
|
|
private static final int CACHING_DEFAULT = 5; |
|
|
|
private static final int CACHING_DEFAULT = 5; |
|
|
|
private static final int CACHING_GAP = 5; |
|
|
|
private static final int CACHING_GAP = 5; |
|
|
|
private static final int MEMORY_TIP_LABEL_MAX_WIDTH = 230; |
|
|
|
private static final int MEMORY_TIP_LABEL_MAX_WIDTH = 230; |
|
|
|
|
|
|
|
private static final int OFFSET_HEIGHT = 50; |
|
|
|
|
|
|
|
|
|
|
|
private static final String TYPE = "pressed"; |
|
|
|
private static final String TYPE = "pressed"; |
|
|
|
private static final String DISPLAY_TYPE = "+"; |
|
|
|
private static final String DISPLAY_TYPE = "+"; |
|
|
@ -133,11 +136,11 @@ public class PreferencePane extends BasicPane { |
|
|
|
private UIComboBox logLevelComboBox, pageLengthComboBox, reportLengthComboBox; |
|
|
|
private UIComboBox logLevelComboBox, pageLengthComboBox, reportLengthComboBox; |
|
|
|
private UIDictionaryComboBox<Locale> languageComboBox; |
|
|
|
private UIDictionaryComboBox<Locale> languageComboBox; |
|
|
|
private IntegerEditor portEditor; |
|
|
|
private IntegerEditor portEditor; |
|
|
|
private UITextField jdkHomeTextField; |
|
|
|
|
|
|
|
private UICheckBox oracleSpace; |
|
|
|
private UICheckBox oracleSpace; |
|
|
|
private UISpinner cachingTemplateSpinner; |
|
|
|
private UISpinner cachingTemplateSpinner; |
|
|
|
private UICheckBox openDebugComboBox; |
|
|
|
private UICheckBox openDebugComboBox; |
|
|
|
private UICheckBox useOptimizedUPMCheckbox; |
|
|
|
private UICheckBox useOptimizedUPMCheckbox; |
|
|
|
|
|
|
|
private UICheckBox useUniverseDBMCheckbox; |
|
|
|
private UICheckBox joinProductImproveCheckBox; |
|
|
|
private UICheckBox joinProductImproveCheckBox; |
|
|
|
private UICheckBox autoPushUpdateCheckBox; |
|
|
|
private UICheckBox autoPushUpdateCheckBox; |
|
|
|
|
|
|
|
|
|
|
@ -186,16 +189,21 @@ public class PreferencePane extends BasicPane { |
|
|
|
JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Oracle_All_Tables")); |
|
|
|
JPanel oraclePane = FRGUIPaneFactory.createTitledBorderPane("Oracle" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Oracle_All_Tables")); |
|
|
|
oracleSpace = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Show_All_Oracle_Tables")); |
|
|
|
oracleSpace = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Show_All_Oracle_Tables")); |
|
|
|
oraclePane.add(oracleSpace); |
|
|
|
oraclePane.add(oracleSpace); |
|
|
|
//
|
|
|
|
|
|
|
|
// JPanel debuggerPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Basic_Develop_Tools"));
|
|
|
|
|
|
|
|
// openDebugComboBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Open_Debug_Window"));
|
|
|
|
|
|
|
|
// debuggerPane.add(openDebugComboBox, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
// advancePane.add(debuggerPane);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// JPanel upmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Update_Plugin_Manager"));
|
|
|
|
JPanel debuggerPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Basic_Develop_Tools")); |
|
|
|
// useOptimizedUPMCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Use_New_Update_Plugin_Manager"));
|
|
|
|
openDebugComboBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Open_Debug_Window")); |
|
|
|
// upmSelectorPane.add(useOptimizedUPMCheckbox);
|
|
|
|
debuggerPane.add(openDebugComboBox, BorderLayout.CENTER); |
|
|
|
// advancePane.add(upmSelectorPane);
|
|
|
|
advancePane.add(debuggerPane); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel upmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Update_Plugin_Manager")); |
|
|
|
|
|
|
|
useOptimizedUPMCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Use_New_Update_Plugin_Manager")); |
|
|
|
|
|
|
|
upmSelectorPane.add(useOptimizedUPMCheckbox); |
|
|
|
|
|
|
|
advancePane.add(upmSelectorPane); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel dbmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Manager")); |
|
|
|
|
|
|
|
useUniverseDBMCheckbox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Use_Universe_Database_Manager")); |
|
|
|
|
|
|
|
dbmSelectorPane.add(useUniverseDBMCheckbox); |
|
|
|
|
|
|
|
advancePane.add(dbmSelectorPane); |
|
|
|
|
|
|
|
|
|
|
|
JPanel improvePane = FRGUIPaneFactory.createVerticalTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Product_Improve")); |
|
|
|
JPanel improvePane = FRGUIPaneFactory.createVerticalTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Product_Improve")); |
|
|
|
joinProductImproveCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Join_Product_Improve")); |
|
|
|
joinProductImproveCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Join_Product_Improve")); |
|
|
@ -206,10 +214,10 @@ public class PreferencePane extends BasicPane { |
|
|
|
improvePane.add(autoPushUpdateCheckBox); |
|
|
|
improvePane.add(autoPushUpdateCheckBox); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
JPanel spaceUpPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); |
|
|
|
JPanel spaceUpPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
spaceUpPane.add(oraclePane); |
|
|
|
spaceUpPane.add(oraclePane, BorderLayout.NORTH); |
|
|
|
spaceUpPane.add(createMemoryPane()); |
|
|
|
spaceUpPane.add(createMemoryPane(), BorderLayout.CENTER); |
|
|
|
spaceUpPane.add(improvePane); |
|
|
|
spaceUpPane.add(improvePane, BorderLayout.SOUTH); |
|
|
|
advancePane.add(spaceUpPane); |
|
|
|
advancePane.add(spaceUpPane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -226,8 +234,8 @@ public class PreferencePane extends BasicPane { |
|
|
|
enableVcsPanel.add(vcsEnableCheckBox); |
|
|
|
enableVcsPanel.add(vcsEnableCheckBox); |
|
|
|
enableVcsPanel.add(remindVcsLabel); |
|
|
|
enableVcsPanel.add(remindVcsLabel); |
|
|
|
JPanel intervalPanel = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
JPanel intervalPanel = new JPanel(FRGUIPaneFactory.createLeftZeroLayout()); |
|
|
|
UILabel everyLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Every")); |
|
|
|
final UILabel everyLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Every")); |
|
|
|
UILabel delayLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Delay")); |
|
|
|
final UILabel delayLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Delay")); |
|
|
|
intervalPanel.add(useIntervalCheckBox); |
|
|
|
intervalPanel.add(useIntervalCheckBox); |
|
|
|
intervalPanel.add(everyLabel); |
|
|
|
intervalPanel.add(everyLabel); |
|
|
|
intervalPanel.add(saveIntervalEditor); |
|
|
|
intervalPanel.add(saveIntervalEditor); |
|
|
@ -240,10 +248,14 @@ public class PreferencePane extends BasicPane { |
|
|
|
saveCommitCheckBox.setEnabled(true); |
|
|
|
saveCommitCheckBox.setEnabled(true); |
|
|
|
saveIntervalEditor.setEnabled(true); |
|
|
|
saveIntervalEditor.setEnabled(true); |
|
|
|
useIntervalCheckBox.setEnabled(true); |
|
|
|
useIntervalCheckBox.setEnabled(true); |
|
|
|
|
|
|
|
everyLabel.setEnabled(true); |
|
|
|
|
|
|
|
delayLabel.setEnabled(true); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
saveCommitCheckBox.setEnabled(false); |
|
|
|
saveCommitCheckBox.setEnabled(false); |
|
|
|
saveIntervalEditor.setEnabled(false); |
|
|
|
saveIntervalEditor.setEnabled(false); |
|
|
|
useIntervalCheckBox.setEnabled(false); |
|
|
|
useIntervalCheckBox.setEnabled(false); |
|
|
|
|
|
|
|
everyLabel.setEnabled(false); |
|
|
|
|
|
|
|
delayLabel.setEnabled(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -383,10 +395,10 @@ public class PreferencePane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Pagination_Line_Color")); |
|
|
|
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preference_Pagination_Line_Color")); |
|
|
|
|
|
|
|
|
|
|
|
gridLineColorTBButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/foreground.png")); |
|
|
|
gridLineColorTBButton = new UIColorButton(IOUtils.readIcon("/com/fr/design/images/gui/color/foreground.png")); |
|
|
|
gridLineColorTBButton.setEnabled(this.isEnabled()); |
|
|
|
gridLineColorTBButton.setEnabled(this.isEnabled()); |
|
|
|
|
|
|
|
|
|
|
|
paginationLineColorTBButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/foreground.png")); |
|
|
|
paginationLineColorTBButton = new UIColorButton(IOUtils.readIcon("/com/fr/design/images/gui/color/foreground.png")); |
|
|
|
paginationLineColorTBButton.setEnabled(this.isEnabled()); |
|
|
|
paginationLineColorTBButton.setEnabled(this.isEnabled()); |
|
|
|
|
|
|
|
|
|
|
|
JPanel leftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
JPanel leftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
@ -636,8 +648,10 @@ public class PreferencePane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
this.portEditor.setValue(new Integer(designerEnvManager.getEmbedServerPort())); |
|
|
|
this.portEditor.setValue(new Integer(designerEnvManager.getEmbedServerPort())); |
|
|
|
|
|
|
|
|
|
|
|
// openDebugComboBox.setSelected(designerEnvManager.isOpenDebug());
|
|
|
|
openDebugComboBox.setSelected(designerEnvManager.isOpenDebug()); |
|
|
|
// useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM());
|
|
|
|
useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM()); |
|
|
|
|
|
|
|
|
|
|
|
this.oracleSpace.setSelected(designerEnvManager.isOracleSystemSpace()); |
|
|
|
this.oracleSpace.setSelected(designerEnvManager.isOracleSystemSpace()); |
|
|
|
this.cachingTemplateSpinner.setValue(designerEnvManager.getCachingTemplateLimit()); |
|
|
|
this.cachingTemplateSpinner.setValue(designerEnvManager.getCachingTemplateLimit()); |
|
|
@ -702,7 +716,7 @@ public class PreferencePane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
designerEnvManager.setJettyServerPort(portEditor.getValue().intValue()); |
|
|
|
designerEnvManager.setJettyServerPort(portEditor.getValue().intValue()); |
|
|
|
|
|
|
|
|
|
|
|
// designerEnvManager.setOpenDebug(openDebugComboBox.isSelected());
|
|
|
|
designerEnvManager.setOpenDebug(openDebugComboBox.isSelected()); |
|
|
|
|
|
|
|
|
|
|
|
designerEnvManager.setOracleSystemSpace(this.oracleSpace.isSelected()); |
|
|
|
designerEnvManager.setOracleSystemSpace(this.oracleSpace.isSelected()); |
|
|
|
designerEnvManager.setCachingTemplateLimit((int) this.cachingTemplateSpinner.getValue()); |
|
|
|
designerEnvManager.setCachingTemplateLimit((int) this.cachingTemplateSpinner.getValue()); |
|
|
@ -733,17 +747,18 @@ public class PreferencePane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Configurations.update(new Worker() {
|
|
|
|
Configurations.update(new Worker() { |
|
|
|
// @Override
|
|
|
|
@Override |
|
|
|
// public void run() {
|
|
|
|
public void run() { |
|
|
|
// ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected());
|
|
|
|
ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected()); |
|
|
|
// }
|
|
|
|
ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected()); |
|
|
|
//
|
|
|
|
} |
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public Class<? extends Configuration>[] targets() {
|
|
|
|
@Override |
|
|
|
// return new Class[] {ServerPreferenceConfig.class};
|
|
|
|
public Class<? extends Configuration>[] targets() { |
|
|
|
// }
|
|
|
|
return new Class[] {ServerPreferenceConfig.class}; |
|
|
|
// });
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -777,4 +792,9 @@ public class PreferencePane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public BasicDialog showWindow(Window window, DialogActionListener l) { |
|
|
|
|
|
|
|
return showWindowWithCustomSize(window, l, new Dimension(BasicDialog.DEFAULT.width, this.getPreferredSize().height + OFFSET_HEIGHT)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|