编写雷达扫描线有关代码
This commit is contained in:
parent
6da5fb7ebf
commit
6becba7725
|
@ -103,6 +103,8 @@ public class PreferencesViewOptionsTab extends WizardPanel {
|
|||
initialize();
|
||||
}
|
||||
|
||||
|
||||
//设置默认的设置
|
||||
private void defaultViewOptionsButtonActionPerformed() {
|
||||
setAllViewOptionsButtonsEnabled(true);
|
||||
getVisibleScanArcsCheckBox().setSelected(false);
|
||||
|
@ -326,12 +328,13 @@ public class PreferencesViewOptionsTab extends WizardPanel {
|
|||
c.weightx = 1;
|
||||
|
||||
visibleOptionsPanel.add(getVisibleRobotEnergyCheckBox(), c);
|
||||
visibleOptionsPanel.add(getVisibleRobotNameCheckBox(), c);
|
||||
visibleOptionsPanel.add(getVisibleScanArcsCheckBox(), c);
|
||||
visibleOptionsPanel.add(getVisibleExplosionsCheckBox(), c);
|
||||
visibleOptionsPanel.add(getVisibleGroundCheckBox(), c);
|
||||
visibleOptionsPanel.add(getVisibleExplosionDebrisCheckBox(), c);
|
||||
visibleOptionsPanel.add(getVisibleSentryBorderCheckBox(), c);
|
||||
//将扫描线复选框添加到嵌入板中
|
||||
visibleOptionsPanel.add(getVisibleRobotNameCheckBox(), c);
|
||||
|
||||
c.insets = new Insets(10, 0, 0, 10);
|
||||
c.gridwidth = 1;
|
||||
|
@ -430,7 +433,6 @@ public class PreferencesViewOptionsTab extends WizardPanel {
|
|||
getDisplayTpsCheckBox().setSelected(robocodeProperties.getOptionsViewTPS());
|
||||
getVisibleRobotNameCheckBox().setSelected(robocodeProperties.getOptionsViewRobotNames());
|
||||
getVisibleRobotEnergyCheckBox().setSelected(robocodeProperties.getOptionsViewRobotEnergy());
|
||||
getVisibleScanArcsCheckBox().setSelected(robocodeProperties.getOptionsViewScanArcs());
|
||||
getVisibleExplosionsCheckBox().setSelected(robocodeProperties.getOptionsViewExplosions());
|
||||
getVisibleGroundCheckBox().setSelected(robocodeProperties.getOptionsViewGround());
|
||||
getVisibleExplosionDebrisCheckBox().setSelected(robocodeProperties.getOptionsViewExplosionDebris());
|
||||
|
@ -438,6 +440,9 @@ public class PreferencesViewOptionsTab extends WizardPanel {
|
|||
getDesiredTpsTextField().setText("" + robocodeProperties.getOptionsBattleDesiredTPS());
|
||||
getPreventSpeedupWhenMinimizedCheckBox().setSelected(
|
||||
robocodeProperties.getOptionsViewPreventSpeedupWhenMinimized());
|
||||
|
||||
//根据传入的参数设置扫描线是否可见
|
||||
getVisibleScanArcsCheckBox().setSelected(robocodeProperties.getOptionsViewScanArcs());
|
||||
}
|
||||
|
||||
public void storePreferences() {
|
||||
|
@ -447,13 +452,15 @@ public class PreferencesViewOptionsTab extends WizardPanel {
|
|||
props.setOptionsViewTPS(getDisplayTpsCheckBox().isSelected());
|
||||
props.setOptionsViewRobotNames(getVisibleRobotNameCheckBox().isSelected());
|
||||
props.setOptionsViewRobotEnergy(getVisibleRobotEnergyCheckBox().isSelected());
|
||||
props.setOptionsViewScanArcs(getVisibleScanArcsCheckBox().isSelected());
|
||||
props.setOptionsViewExplosions(getVisibleExplosionsCheckBox().isSelected());
|
||||
props.setOptionsViewGround(getVisibleGroundCheckBox().isSelected());
|
||||
props.setOptionsViewExplosionDebris(getVisibleExplosionDebrisCheckBox().isSelected());
|
||||
props.setOptionsViewSentryBorder(getVisibleSentryBorderCheckBox().isSelected());
|
||||
props.setOptionsBattleDesiredTPS(Integer.parseInt(getDesiredTpsTextField().getText()));
|
||||
props.setOptionsViewPreventSpeedupWhenMinimized(getPreventSpeedupWhenMinimizedCheckBox().isSelected());
|
||||
//根据参数设置扫描线是否可见
|
||||
props.setOptionsViewScanArcs(getVisibleScanArcsCheckBox().isSelected());
|
||||
////////////////////
|
||||
properties.saveProperties();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue